From 0f8bbbbfc2af8d74bcfaa73e3c9fd40539d430c4 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Tue, 19 Dec 2017 03:14:42 +0100 Subject: [PATCH] Ref T210, adjusting classes to use new functions --- src/blackcore/context/contextnetworkimpl.cpp | 2 +- src/blackcore/setupreader.cpp | 2 +- src/blackcore/vatsim/networkvatlib.cpp | 2 +- src/blackgui/components/logincomponent.cpp | 2 +- src/blackgui/components/mappingcomponent.cpp | 2 +- src/blackgui/components/settingscomponent.cpp | 2 +- src/blackgui/components/settingsnetworkserverscomponent.cpp | 2 +- src/blackgui/loginmodebuttons.cpp | 2 +- src/blackmisc/simulation/fscommon/fscommonutil.cpp | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/blackcore/context/contextnetworkimpl.cpp b/src/blackcore/context/contextnetworkimpl.cpp index 7f75a4f01..7c598168a 100644 --- a/src/blackcore/context/contextnetworkimpl.cpp +++ b/src/blackcore/context/contextnetworkimpl.cpp @@ -185,7 +185,7 @@ namespace BlackCore m_network->presetServer(server); // Fall back to observer mode, if no simulator is available or not simulating - if (CBuildConfig::isStableBranch() && !this->getIContextSimulator()->isSimulatorSimulating()) + if (!CBuildConfig::isLocalDeveloperDebugBuild() && !this->getIContextSimulator()->isSimulatorSimulating()) { CLogMessage(this).info("No simulator connected or connected simulator not simulating. Falling back to observer mode"); mode = INetwork::LoginAsObserver; diff --git a/src/blackcore/setupreader.cpp b/src/blackcore/setupreader.cpp index c11ddbbb1..8e5e45534 100644 --- a/src/blackcore/setupreader.cpp +++ b/src/blackcore/setupreader.cpp @@ -42,7 +42,7 @@ namespace BlackCore { { "url", "bootstrapurl" }, QCoreApplication::translate("application", "Bootstrap URL, e.g. https://datastore.swift-project.org/shared"), - "bootstrapurl", (sApp->isUnitTest()) ? unitTestBootstrapUrl() : "" + "bootstrapurl", (sApp->getApplicationInfo().isUnitTest()) ? unitTestBootstrapUrl() : "" }, m_cmdBootstrapMode { { "bmode", "bootstrapmode" }, diff --git a/src/blackcore/vatsim/networkvatlib.cpp b/src/blackcore/vatsim/networkvatlib.cpp index 273460134..e5d5b8e7b 100644 --- a/src/blackcore/vatsim/networkvatlib.cpp +++ b/src/blackcore/vatsim/networkvatlib.cpp @@ -718,7 +718,7 @@ namespace BlackCore }; // only in not officially shipped versions - return (CBuildConfig::isStableBranch() && !CBuildConfig::isDevBranch()) ? e : opts; + return (CBuildConfig::isLocalDeveloperDebugBuild()) ? opts : e; } bool CNetworkVatlib::getCmdLineClientIdAndKey(int &id, QString &key) diff --git a/src/blackgui/components/logincomponent.cpp b/src/blackgui/components/logincomponent.cpp index c9f93540c..3add26429 100644 --- a/src/blackgui/components/logincomponent.cpp +++ b/src/blackgui/components/logincomponent.cpp @@ -157,7 +157,7 @@ namespace BlackGui CServerList otherServers(m_otherTrafficNetworkServers.getThreadLocal()); // add a testserver when no servers can be loaded - if (otherServers.isEmpty() && (sGui->isRunningInDeveloperEnvironment() || CBuildConfig::isDevBranch())) + if (otherServers.isEmpty() && sGui->isRunningInDeveloperEnvironment()) { otherServers.push_back(sGui->getGlobalSetup().getFsdTestServersPlusHardcodedServers()); CLogMessage(this).info("Added servers for testing"); diff --git a/src/blackgui/components/mappingcomponent.cpp b/src/blackgui/components/mappingcomponent.cpp index 7892c1ec2..e3a8829b6 100644 --- a/src/blackgui/components/mappingcomponent.cpp +++ b/src/blackgui/components/mappingcomponent.cpp @@ -265,7 +265,7 @@ namespace BlackGui bool changed = false; if (aircraftFromBackend.getModelString() != modelString) { - CAircraftModelList models = sGui->getIContextSimulator()->getModelSetModelsStartingWith(modelString); + const CAircraftModelList models = sGui->getIContextSimulator()->getModelSetModelsStartingWith(modelString); if (models.isEmpty()) { CLogMessage(this).validationError("No model for title: %1") << modelString; diff --git a/src/blackgui/components/settingscomponent.cpp b/src/blackgui/components/settingscomponent.cpp index 0d535405c..4a077ea93 100644 --- a/src/blackgui/components/settingscomponent.cpp +++ b/src/blackgui/components/settingscomponent.cpp @@ -47,7 +47,7 @@ namespace BlackGui this->tabBar()->setExpanding(false); this->tabBar()->setUsesScrollButtons(true); this->setCurrentIndex(0); // 1st tab - ui->comp_DataLoadOverview->showVisibleDbRefreshButtons(CBuildConfig::isDebugBuild() || CBuildConfig::isDevBranch()); + ui->comp_DataLoadOverview->showVisibleDbRefreshButtons(CBuildConfig::isDebugBuild() || sGui->isRunningInDeveloperEnvironment()); ui->comp_DataLoadOverview->showVisibleLoadAllButtons(false, false); connect(ui->comp_SettingsGuiGeneral, &CSettingsGuiComponent::changedWindowsOpacity, this, &CSettingsComponent::changedWindowsOpacity); diff --git a/src/blackgui/components/settingsnetworkserverscomponent.cpp b/src/blackgui/components/settingsnetworkserverscomponent.cpp index b68cdb844..a4eaa8c97 100644 --- a/src/blackgui/components/settingsnetworkserverscomponent.cpp +++ b/src/blackgui/components/settingsnetworkserverscomponent.cpp @@ -60,7 +60,7 @@ namespace BlackGui // add swift test servers in case we have no servers: // this is debug/bootstrap feature we can continue to test when something goes wrong - if (serverList.isEmpty() && (CBuildConfig::isDevBranch() || sGui->isRunningInDeveloperEnvironment())) + if (serverList.isEmpty() && (sGui->isRunningInDeveloperEnvironment())) { serverList.push_back(sGui->getGlobalSetup().getFsdTestServersPlusHardcodedServers()); } diff --git a/src/blackgui/loginmodebuttons.cpp b/src/blackgui/loginmodebuttons.cpp index d400640ec..72c13fc26 100644 --- a/src/blackgui/loginmodebuttons.cpp +++ b/src/blackgui/loginmodebuttons.cpp @@ -74,7 +74,7 @@ namespace BlackGui void CLoginModeButtons::configureLoginModes() { - if (CBuildConfig::isStableBranch() && !sGui->getIContextSimulator()->isSimulatorSimulating()) + if (!sGui->isRunningInDeveloperEnvironment() && !sGui->getIContextSimulator()->isSimulatorSimulating()) { // Disable pilot login modes ui->rb_LoginNormal->setEnabled(false); diff --git a/src/blackmisc/simulation/fscommon/fscommonutil.cpp b/src/blackmisc/simulation/fscommon/fscommonutil.cpp index 89a05801a..7ca8cad10 100644 --- a/src/blackmisc/simulation/fscommon/fscommonutil.cpp +++ b/src/blackmisc/simulation/fscommon/fscommonutil.cpp @@ -72,7 +72,7 @@ namespace BlackMisc "C:/Program Files (x86)/Microsoft Games/Microsoft Flight Simulator X", "C:/FSX" }); - if (!CBuildConfig::isStableBranch()) + if (CBuildConfig::isLocalDeveloperDebugBuild()) { // developer directories someDefaultDirs.push_back("P:/FSX (MSI)");