mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
Renamings and adjustments of developer flag
This commit is contained in:
@@ -73,7 +73,7 @@ namespace BlackCore
|
||||
m_analyzer(new CAirspaceAnalyzer(ownAircraftProvider, this, network, this))
|
||||
{
|
||||
this->setObjectName("CAirspaceMonitor");
|
||||
m_enableReverseLookupMsgs = sApp->isRunningInDeveloperEnvironment();
|
||||
m_enableReverseLookupMsgs = sApp->isDeveloperFlagSet();
|
||||
|
||||
connect(m_network, &INetwork::atcPositionUpdate, this, &CAirspaceMonitor::onAtcPositionUpdate);
|
||||
connect(m_network, &INetwork::atisReplyReceived, this, &CAirspaceMonitor::onAtisReceived);
|
||||
|
||||
@@ -472,12 +472,12 @@ namespace BlackCore
|
||||
|
||||
const QString &CApplication::versionStringDetailed() const
|
||||
{
|
||||
if (this->isRunningInDeveloperEnvironment() && CBuildConfig::isLocalDeveloperDebugBuild())
|
||||
if (this->isDeveloperFlagSet() && CBuildConfig::isLocalDeveloperDebugBuild())
|
||||
{
|
||||
static const QString s(CBuildConfig::getVersionString() + " [dev,DEVDBG]");
|
||||
return s;
|
||||
}
|
||||
if (isRunningInDeveloperEnvironment())
|
||||
if (isDeveloperFlagSet())
|
||||
{
|
||||
static const QString s(CBuildConfig::getVersionString() + " [dev]");
|
||||
return s;
|
||||
@@ -504,12 +504,17 @@ namespace BlackCore
|
||||
|
||||
bool CApplication::initIsRunningInDeveloperEnvironment() const
|
||||
{
|
||||
//
|
||||
// assumption: restricted distributions are development versions
|
||||
//
|
||||
|
||||
if (this->getApplicationInfo().isSampleOrUnitTest()) { return true; }
|
||||
if (CBuildConfig::isLocalDeveloperDebugBuild()) { return true; }
|
||||
|
||||
const CDistribution d(this->getOwnDistribution());
|
||||
const bool canSetDeveloperEnv = CBuildConfig::isLocalDeveloperDebugBuild() || d.isRestricted();
|
||||
if (canSetDeveloperEnv && this->isSet(m_cmdDevelopment)) { return true; }
|
||||
if (d.isRestricted() && this->isSet(m_cmdDevelopment)) { return true; }
|
||||
|
||||
// we can globally set a dev.flag
|
||||
if (this->isSetupAvailable())
|
||||
{
|
||||
// assume value from setup
|
||||
@@ -560,7 +565,7 @@ namespace BlackCore
|
||||
boolToYesNo(CBuildConfig::isLocalDeveloperDebugBuild()) %
|
||||
separator %
|
||||
QStringLiteral("dev.env.: ") %
|
||||
boolToYesNo(this->isRunningInDeveloperEnvironment()) %
|
||||
boolToYesNo(this->isDeveloperFlagSet()) %
|
||||
separator %
|
||||
QStringLiteral("distribution: ") %
|
||||
this->getOwnDistribution().toQString(true) %
|
||||
@@ -1208,7 +1213,7 @@ namespace BlackCore
|
||||
}
|
||||
|
||||
// dev.
|
||||
m_devEnv = this->initIsRunningInDeveloperEnvironment();
|
||||
m_devFlag = this->initIsRunningInDeveloperEnvironment();
|
||||
|
||||
// Hookin, other parsing
|
||||
if (!this->parsingHookIn()) { return false; }
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace BlackCore
|
||||
|
||||
//! Global setup
|
||||
//! \threadsafe
|
||||
BlackCore::Data::CGlobalSetup getGlobalSetup() const;
|
||||
Data::CGlobalSetup getGlobalSetup() const;
|
||||
|
||||
//! Update info
|
||||
//! \threadsafe
|
||||
@@ -177,8 +177,8 @@ namespace BlackCore
|
||||
//! swift info string
|
||||
const char *swiftVersionChar();
|
||||
|
||||
//! Running in dev.environment?
|
||||
bool isRunningInDeveloperEnvironment() const { return m_devEnv; }
|
||||
//! Running with dev.flag?
|
||||
bool isDeveloperFlagSet() const { return m_devFlag; }
|
||||
|
||||
//! Signal startup automatically or individually
|
||||
void setSignalStartupAutomatically(bool enabled) { m_signalStartup = enabled; }
|
||||
@@ -316,7 +316,7 @@ namespace BlackCore
|
||||
//! Init web data services and start them
|
||||
//! \sa webDataServicesStarted
|
||||
//! \remark requires setup loaded
|
||||
BlackMisc::CStatusMessageList useWebDataServices(const CWebReaderFlags::WebReader webReader, const BlackCore::Db::CDatabaseReaderConfigList &dbReaderConfig);
|
||||
BlackMisc::CStatusMessageList useWebDataServices(const CWebReaderFlags::WebReader webReader, const Db::CDatabaseReaderConfigList &dbReaderConfig);
|
||||
|
||||
//! Get the facade
|
||||
CCoreFacade *getCoreFacade() { return m_coreFacade.data(); }
|
||||
@@ -361,7 +361,7 @@ namespace BlackCore
|
||||
|
||||
//! Access to setup reader
|
||||
//! \remark supposed to be used only in special cases
|
||||
BlackCore::CSetupReader *getSetupReader() const;
|
||||
CSetupReader *getSetupReader() const;
|
||||
|
||||
//! Setup already synchronized
|
||||
bool isSetupAvailable() const;
|
||||
@@ -615,7 +615,7 @@ namespace BlackCore
|
||||
bool m_useContexts = false; //!< use contexts
|
||||
bool m_useWebData = false; //!< use web data
|
||||
bool m_signalStartup = true; //!< signal startup automatically
|
||||
bool m_devEnv = false; //!< dev. environment
|
||||
bool m_devFlag = false; //!< dev. environment
|
||||
bool m_saveSettingsOnShutdown = true; //!< saving all settings on shutdown
|
||||
|
||||
// -------------- crashpad -----------------
|
||||
@@ -625,7 +625,7 @@ namespace BlackCore
|
||||
#ifdef BLACK_USE_CRASHPAD
|
||||
std::unique_ptr<crashpad::CrashpadClient> m_crashpadClient;
|
||||
std::unique_ptr<crashpad::CrashReportDatabase> m_crashReportDatabase;
|
||||
BlackMisc::CSettingReadOnly<BlackCore::Application::TCrashDumpUploadEnabled> m_crashDumpUploadEnabled { this, &CApplication::crashDumpUploadEnabledChanged };
|
||||
BlackMisc::CSettingReadOnly<Application::TCrashDumpUploadEnabled> m_crashDumpUploadEnabled { this, &CApplication::crashDumpUploadEnabledChanged };
|
||||
#endif
|
||||
};
|
||||
} // namespace
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace BlackCore
|
||||
void simulatorStatusChanged(int status);
|
||||
|
||||
//! Simulator plugin loaded / unloaded (default info)
|
||||
void simulatorPluginChanged(BlackMisc::Simulation::CSimulatorPluginInfo info);
|
||||
void simulatorPluginChanged(const BlackMisc::Simulation::CSimulatorPluginInfo &info);
|
||||
|
||||
//! Render restrictions have been changed
|
||||
void renderRestrictionsChanged(bool restricted, bool enabled, int maxAircraft, const BlackMisc::PhysicalQuantities::CLength &maxRenderedDistance);
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace BlackCore
|
||||
this->setObjectName("CContextSimulator");
|
||||
CContextSimulator::registerHelp();
|
||||
|
||||
m_enableMatchingMessages = sApp->isRunningInDeveloperEnvironment();
|
||||
m_enableMatchingMessages = sApp->isDeveloperFlagSet();
|
||||
m_plugins->collectPlugins();
|
||||
this->restoreSimulatorPlugins();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user