mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Background updater can be const, only needed "readonly" for UI
This commit is contained in:
committed by
Mathew Sutcliffe
parent
6a17465633
commit
a1e16ea162
@@ -169,6 +169,7 @@ namespace BlackCore
|
||||
const QSet<CSimulatorInfo> simSet = sims.asSingleSimulatorSet();
|
||||
for (const CSimulatorInfo &singleInfo : simSet)
|
||||
{
|
||||
if (this->isShuttingDown()) { return; }
|
||||
CAircraftModelList simModels = cache.getSynchronizedCachedModels(singleInfo);
|
||||
if (simModels.isEmpty()) { continue; }
|
||||
const CAircraftModelList dbModelsForSim = dbModels.matchesSimulator(singleInfo);
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace BlackGui
|
||||
CDataSettingsComponent::~CDataSettingsComponent()
|
||||
{ }
|
||||
|
||||
void CDataSettingsComponent::setBackgroundUpdater(CBackgroundDataUpdater *updater)
|
||||
void CDataSettingsComponent::setBackgroundUpdater(const CBackgroundDataUpdater *updater)
|
||||
{
|
||||
ui->comp_ModelSettings->setBackgroundUpdater(updater);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace BlackGui
|
||||
virtual ~CDataSettingsComponent();
|
||||
|
||||
//! Background updater
|
||||
void setBackgroundUpdater(BlackCore::Db::CBackgroundDataUpdater *updater);
|
||||
void setBackgroundUpdater(const BlackCore::Db::CBackgroundDataUpdater *updater);
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CDataSettingsComponent> ui;
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace BlackGui
|
||||
return ok ? secs : -1;
|
||||
}
|
||||
|
||||
void CSettingsModelComponent::setBackgroundUpdater(BlackCore::Db::CBackgroundDataUpdater *updater)
|
||||
void CSettingsModelComponent::setBackgroundUpdater(const BlackCore::Db::CBackgroundDataUpdater *updater)
|
||||
{
|
||||
m_updater = updater;
|
||||
}
|
||||
|
||||
@@ -39,12 +39,12 @@ namespace BlackGui
|
||||
int getBackgroundUpdaterIntervallSecs() const;
|
||||
|
||||
//! Updater (the updater this setting is for)
|
||||
void setBackgroundUpdater(BlackCore::Db::CBackgroundDataUpdater *updater);
|
||||
void setBackgroundUpdater(const BlackCore::Db::CBackgroundDataUpdater *updater);
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CSettingsModelComponent> ui;
|
||||
BlackMisc::CSetting<BlackGui::Settings::TBackgroundConsolidation> m_consolidationSetting { this, &CSettingsModelComponent::cacheChanged }; //!< consolidation time
|
||||
BlackCore::Db::CBackgroundDataUpdater *m_updater = nullptr; //!< externally (i.e. other component) provided existing updater
|
||||
const BlackCore::Db::CBackgroundDataUpdater *m_updater = nullptr; //!< externally (i.e. other component) provided existing updater
|
||||
|
||||
//! Consolidation time entered
|
||||
void consolidationEntered();
|
||||
|
||||
Reference in New Issue
Block a user