From 7afa55fa99eb4a22be0b9999283120d7c6a86220 Mon Sep 17 00:00:00 2001 From: Beatriz Rizental Date: Tue, 31 Oct 2023 14:34:06 +0100 Subject: [PATCH] Remove mocconstants.cpp from QML tests That was not necessary and also was colliding with the constants.cpp brought in by mozillavpn_environment --- tests/qml/CMakeLists.txt | 1 - tests/qml/mocconstants.cpp | 40 -------------------------------------- 2 files changed, 41 deletions(-) delete mode 100644 tests/qml/mocconstants.cpp diff --git a/tests/qml/CMakeLists.txt b/tests/qml/CMakeLists.txt index 54c2fbbe31..cc88d2981b 100644 --- a/tests/qml/CMakeLists.txt +++ b/tests/qml/CMakeLists.txt @@ -258,7 +258,6 @@ target_sources(qml_tests PRIVATE helper.cpp helper.h main.cpp - mocconstants.cpp moccontroller.cpp mocmozillavpn.cpp ) diff --git a/tests/qml/mocconstants.cpp b/tests/qml/mocconstants.cpp deleted file mode 100644 index 071c118e31..0000000000 --- a/tests/qml/mocconstants.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include - -#include "constants.h" - -namespace { -bool s_productionMode = true; -} // namespace - -bool Constants::inProduction() { return s_productionMode; } - -const QString& Constants::getStagingServerAddress() { - static QString stagingServerAddress = Constants::API_STAGING_URL; - return stagingServerAddress; -} - -void Constants::setVersionOverride(const QString& versionOverride) { - Q_UNUSED(versionOverride); -} - -QString Constants::apiBaseUrl() { return Constants::API_STAGING_URL; } - -QString Constants::apiUrl(ApiEndpoint) { return "something here"; } - -void Constants::setStaging() { s_productionMode = false; } - -QString Constants::versionString() { - return QStringLiteral("QMLTest_AppVersion"); -} - -QString Constants::buildNumber() { return QStringLiteral("QMLTest_BuildID"); } - -QString Constants::envOrDefault(const QString& name, - const QString& defaultValue) { - Q_UNUSED(name); - return defaultValue; -}