refs #559, adjustments cache/settings moved

This commit is contained in:
Klaus Basan
2015-12-18 03:25:03 +01:00
parent 070ba8f158
commit 3ac32fa58e
42 changed files with 87 additions and 98 deletions

View File

@@ -12,7 +12,7 @@
#include "blackcore/contextapplicationproxy.h"
#include "blackcore/contextapplicationempty.h"
#include "blackcore/inputmanager.h"
#include "blackcore/settingscache.h"
#include "blackmisc/settingscache.h"
#include "blackmisc/statusmessage.h"
#include "blackmisc/loghandler.h"
#include "blackmisc/logmessage.h"

View File

@@ -10,7 +10,7 @@
#include "contextapplicationimpl.h"
#include "contextruntime.h"
#include "inputmanager.h"
#include "settingscache.h"
#include "blackmisc/settingscache.h"
#include "blackmisc/logmessage.h"
#include "blackmisc/loghandler.h"
#include <QtMsgHandler>

View File

@@ -9,7 +9,7 @@
#include "blackcore/contextapplicationproxy.h"
#include "blackcore/inputmanager.h"
#include "blackcore/settingscache.h"
#include "blackmisc/settingscache.h"
#include "blackmisc/blackmiscfreefunctions.h"
#include "blackmisc/loghandler.h"
#include "blackmisc/identifierlist.h"

View File

@@ -169,7 +169,7 @@ namespace BlackCore
QHash<BlackMisc::Aviation::CComSystem::ComUnit, QSharedPointer<IVoiceChannel>> m_voiceChannelMapping;
// settings
CSetting<BlackCore::Settings::Audio::AudioSettings> m_audioSettings { this };
BlackMisc::CSetting<BlackCore::Settings::Audio::AudioSettings> m_audioSettings { this };
};
} // namespace

View File

@@ -145,7 +145,7 @@ namespace BlackCore
QString m_voiceRoom2UrlOverride; //!< overridden voice room url
mutable QReadWriteLock m_lockAircraft; //!< lock aircraft
CSetting<Settings::Network::CurrentTrafficServer> m_currentNetworkServer { this };
BlackMisc::CSetting<Settings::Network::CurrentTrafficServer> m_currentNetworkServer { this };
//! Init my very own aircraft with some defaults, before overridden by simulator
void initOwnAircraft();

View File

@@ -151,7 +151,7 @@ namespace BlackCore
private:
bool m_init = false; //!< flag
CSetting<Settings::Network::DBusServerAddress> m_dbusServerAddress { this };
BlackMisc::CSetting<Settings::Network::DBusServerAddress> m_dbusServerAddress { this };
// DBus
BlackMisc::CDBusServer *m_dbusServer = nullptr;

View File

@@ -13,7 +13,7 @@
#define BLACKCORE_DATA_AIRCRAFTMODELS_H
#include "blackcore/blackcoreexport.h"
#include "blackcore/datacache.h"
#include "blackmisc/datacache.h"
#include "blackmisc/simulation/aircraftmodellist.h"
#include "blackmisc/variant.h"
@@ -22,7 +22,7 @@ namespace BlackCore
namespace Data
{
//! Trait for own simulator models
struct OwnSimulatorAircraftModels : public BlackCore::CDataTrait<BlackMisc::Simulation::CAircraftModelList>
struct OwnSimulatorAircraftModels : public BlackMisc::CDataTrait<BlackMisc::Simulation::CAircraftModelList>
{
//! Key in data cache
static const char *key() { return "simulator/models"; }
@@ -36,7 +36,7 @@ namespace BlackCore
};
//! Trait for vPilot derived models
struct VPilotAircraftModels : public BlackCore::CDataTrait<BlackMisc::Simulation::CAircraftModelList>
struct VPilotAircraftModels : public BlackMisc::CDataTrait<BlackMisc::Simulation::CAircraftModelList>
{
//! Key in data cache
static const char *key() { return "vpilot/models"; }

View File

@@ -13,7 +13,7 @@
#define BLACKCORE_DATA_AUTHENTICATEDUSER_H
#include "blackcore/blackcoreexport.h"
#include "blackcore/datacache.h"
#include "blackmisc/datacache.h"
#include "blackmisc/network/authenticateduser.h"
namespace BlackCore
@@ -21,7 +21,7 @@ namespace BlackCore
namespace Data
{
//! Trait for for global setup data
struct AuthenticatedUser : public BlackCore::CDataTrait<BlackMisc::Network::CAuthenticatedUser>
struct AuthenticatedUser : public BlackMisc::CDataTrait<BlackMisc::Network::CAuthenticatedUser>
{
//! Key in data cache
static const char *key() { return "readers/global/user"; }

View File

@@ -13,7 +13,7 @@
#define BLACKCORE_DATA_GLOBALSETUP_H
#include "blackcore/blackcoreexport.h"
#include "blackcore/datacache.h"
#include "blackmisc/datacache.h"
#include "blackmisc/network/serverlist.h"
#include "blackmisc/network/urllist.h"
#include "blackmisc/valueobject.h"
@@ -149,7 +149,7 @@ namespace BlackCore
};
//! Trait for global setup data
struct GlobalSetup : public BlackCore::CDataTrait<CGlobalSetup>
struct GlobalSetup : public BlackMisc::CDataTrait<CGlobalSetup>
{
//! Key in data cache
static const char *key() { return "readers/setup"; }

View File

@@ -13,7 +13,7 @@
#define BLACKCORE_DATA_UPDATEINFO_H
#include "blackcore/blackcoreexport.h"
#include "blackcore/datacache.h"
#include "blackmisc/datacache.h"
#include "blackmisc/network/urllist.h"
#include "blackmisc/valueobject.h"
#include "blackmisc/variant.h"
@@ -103,7 +103,7 @@ namespace BlackCore
};
//! Trait for global setup data
struct UpdateInfo : public BlackCore::CDataTrait<CUpdateInfo>
struct UpdateInfo : public BlackMisc::CDataTrait<CUpdateInfo>
{
//! Key in data cache
static const char *key() { return "readers/updateinfo"; }

View File

@@ -59,8 +59,8 @@ namespace BlackCore
void ps_userChanged();
private:
CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< data cache
BlackCore::CData<BlackCore::Data::AuthenticatedUser> m_user {this, &CDatabaseAuthenticationService::ps_userChanged};
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< data cache
BlackMisc::CData<BlackCore::Data::AuthenticatedUser> m_user {this, &CDatabaseAuthenticationService::ps_userChanged};
QNetworkAccessManager *m_networkManager = nullptr;
bool m_shutdown = false;

View File

@@ -43,11 +43,11 @@ namespace BlackCore
void ps_postResponse(QNetworkReply *nwReplyPtr);
private:
CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< data cache
BlackMisc::Network::CUrl m_modelUrl;
QNetworkAccessManager *m_networkManager = nullptr;
QNetworkReply *m_pendingReply = nullptr;
bool m_shutdown = false;
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< data cache
BlackMisc::Network::CUrl m_modelUrl;
QNetworkAccessManager *m_networkManager = nullptr;
QNetworkReply *m_pendingReply = nullptr;
bool m_shutdown = false;
//! URL model web service
static BlackMisc::Network::CUrl getModelWriteUrl(const BlackMisc::Network::CUrl &baseUrl);

View File

@@ -134,7 +134,7 @@ namespace BlackCore
mutable QReadWriteLock m_lockAircraft;
mutable QReadWriteLock m_lockCountry;
BlackCore::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
//! Base URL
BlackMisc::Network::CUrl getBaseUrl() const;

View File

@@ -132,7 +132,7 @@ namespace BlackCore
BlackMisc::Input::CHotkeyCombination m_lastCombination;
BlackMisc::Input::CHotkeyCombination m_capturedCombination;
BlackCore::CSetting<BlackCore::Settings::Application::ActionHotkeys> m_actionHotkeys { this, &CInputManager::ps_changeHotkeySettings };
BlackMisc::CSetting<BlackCore::Settings::Application::ActionHotkeys> m_actionHotkeys { this, &CInputManager::ps_changeHotkeySettings };
};
}

View File

@@ -133,7 +133,7 @@ namespace BlackCore
mutable QReadWriteLock m_lockLivery;
mutable QReadWriteLock m_lockModels;
BlackCore::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
//! Base URL
BlackMisc::Network::CUrl getBaseUrl() const;

View File

@@ -181,7 +181,7 @@ namespace BlackCore
static int const c_updateIntervalMsec = 5000;
static int const c_logoffTimeoutSec = 5;
CSetting<Settings::Network::WireTextCodec> m_fsdTextCodecSetting { this };
BlackMisc::CSetting<Settings::Network::WireTextCodec> m_fsdTextCodecSetting { this };
QTextCodec *m_fsdTextCodec = nullptr;
BlackMisc::Aviation::CAircraftParts m_sentAircraftConfig;

View File

@@ -12,7 +12,7 @@
#ifndef BLACKCORE_SETTINGS_APPLICATION_H
#define BLACKCORE_SETTINGS_APPLICATION_H
#include "blackcore/settingscache.h"
#include "blackmisc/settingscache.h"
#include "blackmisc/input/actionhotkeylist.h"
namespace BlackCore
@@ -22,12 +22,12 @@ namespace BlackCore
namespace Application
{
//! User configured hotkeys
struct ActionHotkeys : public CSettingTrait<BlackMisc::Input::CActionHotkeyList>
struct ActionHotkeys : public BlackMisc::CSettingTrait<BlackMisc::Input::CActionHotkeyList>
{
//! \copydoc BlackCore::CSettingTrait::key
//! \copydoc BlackMisc::CSettingTrait::key
static const char *key() { return "application/actionhotkeys"; }
//! \copydoc BlackCore::CSettingTrait::isValid
//! \copydoc BlackMisc::CSettingTrait::isValid
static bool isValid(const BlackMisc::Input::CActionHotkeyList &value)
{
for (const auto &actionHotkey : value)
@@ -39,8 +39,8 @@ namespace BlackCore
return true;
}
};
}
}
}
} // ns
} // ns
} // ns
#endif

View File

@@ -12,7 +12,7 @@
#ifndef BLACKCORE_SETTINGS_AUDIO_H
#define BLACKCORE_SETTINGS_AUDIO_H
#include "blackcore/settingscache.h"
#include "blackmisc/settingscache.h"
#include "blackmisc/audio/settings/settingsaudio.h"
namespace BlackCore
@@ -22,15 +22,15 @@ namespace BlackCore
namespace Audio
{
//! Name of text codec to use with text in FSD protocol
struct AudioSettings : public CSettingTrait<BlackMisc::Audio::Settings::CSettingsAudio>
struct AudioSettings : public BlackMisc::CSettingTrait<BlackMisc::Audio::Settings::CSettingsAudio>
{
//! \copydoc BlackCore::CSettingTrait::key
//! \copydoc BlackMisc::CSettingTrait::key
static const char *key() { return "audio/setup"; }
//! \copydoc BlackCore::CSettingTrait::defaultValue
//! \copydoc BlackMisc::CSettingTrait::defaultValue
static const BlackMisc::Audio::Settings::CSettingsAudio &defaultValue() { static const BlackMisc::Audio::Settings::CSettingsAudio a; return a; }
//! \copydoc BlackCore::CSettingTrait::isValid
//! \copydoc BlackMisc::CSettingTrait::isValid
static bool isValid(const BlackMisc::Audio::Settings::CSettingsAudio &value) { Q_UNUSED(value); return true; }
};

View File

@@ -12,7 +12,7 @@
#ifndef BLACKCORE_SETTINGS_NETWORK_H
#define BLACKCORE_SETTINGS_NETWORK_H
#include "blackcore/settingscache.h"
#include "blackmisc/settingscache.h"
#include "blackmisc/network/serverlist.h"
#include <QTextCodec>
@@ -23,32 +23,32 @@ namespace BlackCore
namespace Network
{
//! Name of text codec to use with text in FSD protocol
struct WireTextCodec : public CSettingTrait<QString>
struct WireTextCodec : public BlackMisc::CSettingTrait<QString>
{
//! \copydoc BlackCore::CSettingTrait::key
//! \copydoc BlackMisc::CSettingTrait::key
static const char *key() { return "network/wiretextcodec"; }
//! \copydoc BlackCore::CSettingTrait::defaultValue
//! \copydoc BlackMisc::CSettingTrait::defaultValue
static const QString &defaultValue() { static const QString dv("latin1"); return dv; }
//! \copydoc BlackCore::CSettingTrait::isValid
//! \copydoc BlackMisc::CSettingTrait::isValid
static bool isValid(const QString &value) { return QTextCodec::codecForName(qPrintable(value)); }
};
//! Virtual air traffic servers
struct TrafficServers : public CSettingTrait<BlackMisc::Network::CServerList>
struct TrafficServers : public BlackMisc::CSettingTrait<BlackMisc::Network::CServerList>
{
//! \copydoc BlackCore::CSettingTrait::key
//! \copydoc BlackMisc::CSettingTrait::key
static const char *key() { return "network/trafficservers"; }
};
//! Currently selected virtual air traffic server
struct CurrentTrafficServer : public CSettingTrait<BlackMisc::Network::CServer>
struct CurrentTrafficServer : public BlackMisc::CSettingTrait<BlackMisc::Network::CServer>
{
//! \copydoc BlackCore::CSettingTrait::key
//! \copydoc BlackMisc::CSettingTrait::key
static const char *key() { return "network/currenttrafficserver"; }
//! \copydoc BlackCore::CSettingTrait::defaultValue
//! \copydoc BlackMisc::CSettingTrait::defaultValue
static const BlackMisc::Network::CServer &defaultValue()
{
using namespace BlackMisc::Network;
@@ -58,12 +58,12 @@ namespace BlackCore
};
//! DBus server address
struct DBusServerAddress : public CSettingTrait<QString>
struct DBusServerAddress : public BlackMisc::CSettingTrait<QString>
{
//! \copydoc BlackCore::CSettingTrait::key
//! \copydoc BlackMisc::CSettingTrait::key
static const char *key() { return "network/dbusserver"; }
//! \copydoc BlackCore::CSettingTrait::defaultValue
//! \copydoc BlackMisc::CSettingTrait::defaultValue
static const QString &defaultValue() { static const QString dv("session"); return dv; }
};
} // ns

View File

@@ -1,11 +0,0 @@
/* Copyright (C) 2013 VATSIM Community / contributors
* 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/. */
#ifndef BLACKCORE_SETTINGSALLCLASSES_H
#define BLACKCORE_SETTINGSALLCLASSES_H
#include "blackmisc/settingsblackmiscclasses.h"
#endif // guard

View File

@@ -70,8 +70,8 @@ namespace BlackCore
QNetworkAccessManager *m_networkManagerUpdateInfo = nullptr;
BlackMisc::LockFree<BlackMisc::Network::CFailoverUrlList> m_bootstrapUrls;
BlackMisc::LockFree<BlackMisc::Network::CFailoverUrlList> m_updateInfoUrls;
CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< data cache setup
CData<BlackCore::Data::UpdateInfo> m_updateInfo {this}; //!< data cache update info
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< data cache setup
BlackMisc::CData<BlackCore::Data::UpdateInfo> m_updateInfo {this}; //!< data cache update info
//! Constructor
explicit CSetupReader(QObject *owner);

View File

@@ -56,7 +56,7 @@ namespace BlackCore
void ps_read();
private:
BlackCore::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
QNetworkAccessManager *m_networkManager = nullptr;
};
}

View File

@@ -130,7 +130,7 @@ namespace BlackCore
BlackMisc::Aviation::CAtcStationList m_atcStations;
BlackMisc::Simulation::CSimulatedAircraftList m_aircraft;
QMap<BlackMisc::Aviation::CCallsign, BlackMisc::Network::CVoiceCapabilities> m_voiceCapabilities;
BlackCore::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
//! Split line and assign values to their corresponding attribute names
static const QMap<QString, QString> clientPartsToMap(const QString &currentLine, const QStringList &clientSectionAttributes);

View File

@@ -72,7 +72,7 @@ namespace BlackCore
QNetworkAccessManager *m_networkManager = nullptr;
BlackMisc::Weather::CMetarDecoder m_metarDecoder;
BlackMisc::Weather::CMetarSet m_metars;
BlackCore::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
};
}
#endif // guard

View File

@@ -285,7 +285,7 @@ namespace BlackCore
CWebReaderFlags::WebReader m_readerFlags = CWebReaderFlags::WebReaderFlag::None; //!< which readers are available
int m_autoReadAfterSetupMs = -1; //!< directly read all known readers after setup was syncronized
bool m_initialRead = false; //!< Initial read conducted
BlackCore::CData<BlackCore::Data::GlobalSetup> m_setup {this, &CWebDataServices::ps_setupChanged}; //!< setup cache
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this, &CWebDataServices::ps_setupChanged}; //!< setup cache
// for reading XML and VATSIM data files
CVatsimBookingReader *m_vatsimBookingReader = nullptr;

View File

@@ -73,7 +73,7 @@ namespace BlackGui
void initAudioDeviceLists();
QScopedPointer<Ui::CAudioSetupComponent> ui;
BlackCore::CSetting<BlackCore::Settings::Audio::AudioSettings> m_audioSettings { this, &CAudioSetupComponent::ps_reloadSettings };
BlackMisc::CSetting<BlackCore::Settings::Audio::AudioSettings> m_audioSettings { this, &CAudioSetupComponent::ps_reloadSettings };
};
} // namespace

View File

@@ -43,7 +43,7 @@ namespace BlackGui
private:
QScopedPointer<Ui::CDbDebugDatabaseSetup> ui;
BlackCore::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< data cache
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< data cache
};
} // ns
} // ns

View File

@@ -40,8 +40,8 @@ namespace BlackGui
private:
QScopedPointer<Ui::CDbLoginComponent> ui;
BlackCore::CData<BlackCore::Data::GlobalSetup> m_setup {this, &CDbLoginComponent::ps_setupChanged}; //!< data cache
BlackCore::CDatabaseAuthenticationService m_loginService {this}; //!< login service
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this, &CDbLoginComponent::ps_setupChanged}; //!< data cache
BlackCore::CDatabaseAuthenticationService m_loginService {this}; //!< login service
//! Overlay messages
void displayOverlayMessages(const BlackMisc::CStatusMessageList &msgs);

View File

@@ -164,10 +164,10 @@ namespace BlackGui
private:
QScopedPointer<Ui::CDbMappingComponent> ui;
BlackMisc::Simulation::FsCommon::CVPilotRulesReader m_vPilotReader; //!< read vPilot rules
BlackCore::CData<BlackCore::Data::VPilotAircraftModels> m_cachedVPilotModels { this, &CDbMappingComponent::ps_onVPilotCacheChanged }; //!< cache for latest vPilot rules
BlackMisc::CData<BlackCore::Data::VPilotAircraftModels> m_cachedVPilotModels { this, &CDbMappingComponent::ps_onVPilotCacheChanged }; //!< cache for latest vPilot rules
std::unique_ptr<BlackMisc::Simulation::IAircraftModelLoader> m_modelLoader; //!< read own aircraft models
BlackCore::CData<BlackCore::Data::OwnSimulatorAircraftModels> m_cachedOwnModels { this }; //!< cache for latest models
BlackCore::CData<BlackCore::Data::AuthenticatedUser> m_user {this, &CDbMappingComponent::ps_userChanged};
BlackMisc::CData<BlackCore::Data::OwnSimulatorAircraftModels> m_cachedOwnModels { this }; //!< cache for latest models
BlackMisc::CData<BlackCore::Data::AuthenticatedUser> m_user {this, &CDbMappingComponent::ps_userChanged};
bool m_vPilot1stInit = true;
bool m_withVPilot = false;

View File

@@ -147,8 +147,8 @@ namespace BlackGui
QScopedPointer<Ui::CLoginComponent> ui;
const int LogoffIntervalSeconds = 10;
QTimer *m_logoffCountdownTimer { nullptr };
BlackCore::CSetting<BlackCore::Settings::Network::TrafficServers> m_otherTrafficNetworkServers { this, &CLoginComponent::ps_reloadSettings };
BlackCore::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
BlackMisc::CSetting<BlackCore::Settings::Network::TrafficServers> m_otherTrafficNetworkServers { this, &CLoginComponent::ps_reloadSettings };
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
};
} // namespace

View File

@@ -54,7 +54,7 @@ namespace BlackGui
QScopedPointer<Ui::CSettingsHotkeyComponent> ui;
BlackGui::Models::CActionHotkeyListModel m_model;
BlackCore::CSetting<BlackCore::Settings::Application::ActionHotkeys> m_actionHotkeys { this };
BlackMisc::CSetting<BlackCore::Settings::Application::ActionHotkeys> m_actionHotkeys { this };
BlackCore::CActionBind m_action { "/Test/Message", this, &CSettingsHotkeyComponent::ps_hotkeySlot };
void ps_hotkeySlot(bool keyDown);

View File

@@ -51,8 +51,8 @@ namespace BlackGui
private:
QScopedPointer<Ui::CSettingsNetworkServersComponent> ui;
BlackCore::CSetting<BlackCore::Settings::Network::TrafficServers> m_trafficNetworkServers { this, &CSettingsNetworkServersComponent::ps_reloadSettings };
BlackCore::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
BlackMisc::CSetting<BlackCore::Settings::Network::TrafficServers> m_trafficNetworkServers { this, &CSettingsNetworkServersComponent::ps_reloadSettings };
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
};
} // ns
} // ns

View File

@@ -13,7 +13,7 @@
#define BLACKSIMPLUGIN_SIMULATOR_FSX_CONFIG_H
#include "blackgui/pluginconfig.h"
#include "blackcore/settingscache.h"
#include "blackmisc/settingscache.h"
namespace BlackSimPlugin
{

View File

@@ -214,7 +214,7 @@ namespace BlackSimPlugin
private:
QDBusConnection m_conn { "default" };
QDBusServiceWatcher *m_watcher { nullptr };
BlackCore::CSetting<XBusServer> m_xbusServerSetting { this, &CSimulatorXPlaneListener::ps_xbusServerSettingChanged };
BlackMisc::CSetting<XBusServer> m_xbusServerSetting { this, &CSimulatorXPlaneListener::ps_xbusServerSettingChanged };
};

View File

@@ -13,7 +13,7 @@
#define BLACKSIMPLUGIN_SIMULATOR_XPLANE_CONFIG_H
#include "blackgui/pluginconfig.h"
#include "blackcore/settingscache.h"
#include "blackmisc/settingscache.h"
namespace BlackSimPlugin
{
@@ -23,12 +23,12 @@ namespace BlackSimPlugin
/*!
* Setting for XBus.
*/
struct XBusServer : public BlackCore::CSettingTrait<QString>
struct XBusServer : public BlackMisc::CSettingTrait<QString>
{
//! \copydoc BlackCore::CSetting::key
//! \copydoc BlackMisc::CSetting::key
static const char *key() { return "xbus/server"; }
//! \copydoc BlackCore::CSetting::defaultValue
//! \copydoc BlackMisc::CSetting::defaultValue
static QString defaultValue() { return QStringLiteral("session"); }
};

View File

@@ -48,7 +48,7 @@ namespace BlackSimPlugin
private:
QScopedPointer<Ui::CSimulatorXPlaneConfigWindow> ui;
BlackCore::CSetting<XBusServer> m_xbusServerSetting { this };
BlackMisc::CSetting<XBusServer> m_xbusServerSetting { this };
};
}

View File

@@ -73,8 +73,8 @@ private:
QScopedPointer<Ui::CSwiftData> ui;
BlackGui::CManagedStatusBar m_statusBar;
BlackCore::CWebDataServices *m_webDataReader = nullptr;
BlackCore::CData<BlackCore::Data::GlobalSetup> m_setup {this, &CSwiftData::ps_setupChanged}; //!< setup cache
BlackCore::CData<BlackCore::Data::UpdateInfo> m_updateInfo { this }; //!< download / version data
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this, &CSwiftData::ps_setupChanged}; //!< setup cache
BlackMisc::CData<BlackCore::Data::UpdateInfo> m_updateInfo { this }; //!< download / version data
};
#endif // guard

View File

@@ -13,8 +13,8 @@
#include "blackgui/components/datainfoareacomponent.h"
#include "blackgui/components/logcomponent.h"
#include "blackgui/stylesheetutility.h"
#include "blackcore/datacache.h"
#include "blackcore/settingscache.h"
#include "blackmisc/datacache.h"
#include "blackmisc/settingscache.h"
#include "blackcore/webdataservices.h"
#include "blackmisc/statusmessagelist.h"
#include "blackmisc/logmessage.h"

View File

@@ -113,7 +113,7 @@ private:
bool m_init = false;
BlackGui::CManagedStatusBar m_statusBar;
BlackMisc::CLogSubscriber m_logSubscriber { this, &SwiftGuiStd::ps_displayStatusMessageInGui };
BlackCore::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
// contexts
bool m_coreAvailable = false;

View File

@@ -9,8 +9,8 @@
#include "swiftguistd.h"
#include "ui_swiftguistd.h"
#include "blackcore/datacache.h"
#include "blackcore/settingscache.h"
#include "blackmisc/datacache.h"
#include "blackmisc/settingscache.h"
#include "blackgui/stylesheetutility.h"
#include "blackgui/components/settingscomponent.h"
#include "blackgui/components/logcomponent.h"

View File

@@ -60,11 +60,11 @@ protected:
private:
QScopedPointer<Ui::CSwiftLauncher> ui;
BlackCore::CData<BlackCore::Data::GlobalSetup> m_setup { this, &CSwiftLauncher::ps_changedCache }; //!< setup cache
BlackCore::CData<BlackCore::Data::UpdateInfo> m_updateInfo { this, &CSwiftLauncher::ps_changedCache }; //!< version cache
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup { this, &CSwiftLauncher::ps_changedCache }; //!< setup cache
BlackMisc::CData<BlackCore::Data::UpdateInfo> m_updateInfo { this, &CSwiftLauncher::ps_changedCache }; //!< version cache
QString m_executable;
QStringList m_executableArgs;
BlackCore::CSetting<BlackCore::Settings::Network::DBusServerAddress> m_dbusServerAddress { this };
BlackMisc::CSetting<BlackCore::Settings::Network::DBusServerAddress> m_dbusServerAddress { this };
//! Get core mode
GuiModes::CoreMode getCoreMode() const;

View File

@@ -40,7 +40,7 @@ namespace BlackCoreTest
private:
BlackCore::CIcaoDataReader m_icaoReader;
BlackCore::CModelDataReader m_modelReader;
BlackCore::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
//! Test if server is available
static bool pingServer(const BlackMisc::Network::CUrl &url);