mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-29 20:55:42 +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();
|
const QSet<CSimulatorInfo> simSet = sims.asSingleSimulatorSet();
|
||||||
for (const CSimulatorInfo &singleInfo : simSet)
|
for (const CSimulatorInfo &singleInfo : simSet)
|
||||||
{
|
{
|
||||||
|
if (this->isShuttingDown()) { return; }
|
||||||
CAircraftModelList simModels = cache.getSynchronizedCachedModels(singleInfo);
|
CAircraftModelList simModels = cache.getSynchronizedCachedModels(singleInfo);
|
||||||
if (simModels.isEmpty()) { continue; }
|
if (simModels.isEmpty()) { continue; }
|
||||||
const CAircraftModelList dbModelsForSim = dbModels.matchesSimulator(singleInfo);
|
const CAircraftModelList dbModelsForSim = dbModels.matchesSimulator(singleInfo);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace BlackGui
|
|||||||
CDataSettingsComponent::~CDataSettingsComponent()
|
CDataSettingsComponent::~CDataSettingsComponent()
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
void CDataSettingsComponent::setBackgroundUpdater(CBackgroundDataUpdater *updater)
|
void CDataSettingsComponent::setBackgroundUpdater(const CBackgroundDataUpdater *updater)
|
||||||
{
|
{
|
||||||
ui->comp_ModelSettings->setBackgroundUpdater(updater);
|
ui->comp_ModelSettings->setBackgroundUpdater(updater);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace BlackGui
|
|||||||
virtual ~CDataSettingsComponent();
|
virtual ~CDataSettingsComponent();
|
||||||
|
|
||||||
//! Background updater
|
//! Background updater
|
||||||
void setBackgroundUpdater(BlackCore::Db::CBackgroundDataUpdater *updater);
|
void setBackgroundUpdater(const BlackCore::Db::CBackgroundDataUpdater *updater);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QScopedPointer<Ui::CDataSettingsComponent> ui;
|
QScopedPointer<Ui::CDataSettingsComponent> ui;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ namespace BlackGui
|
|||||||
return ok ? secs : -1;
|
return ok ? secs : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSettingsModelComponent::setBackgroundUpdater(BlackCore::Db::CBackgroundDataUpdater *updater)
|
void CSettingsModelComponent::setBackgroundUpdater(const BlackCore::Db::CBackgroundDataUpdater *updater)
|
||||||
{
|
{
|
||||||
m_updater = updater;
|
m_updater = updater;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,12 +39,12 @@ namespace BlackGui
|
|||||||
int getBackgroundUpdaterIntervallSecs() const;
|
int getBackgroundUpdaterIntervallSecs() const;
|
||||||
|
|
||||||
//! Updater (the updater this setting is for)
|
//! Updater (the updater this setting is for)
|
||||||
void setBackgroundUpdater(BlackCore::Db::CBackgroundDataUpdater *updater);
|
void setBackgroundUpdater(const BlackCore::Db::CBackgroundDataUpdater *updater);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QScopedPointer<Ui::CSettingsModelComponent> ui;
|
QScopedPointer<Ui::CSettingsModelComponent> ui;
|
||||||
BlackMisc::CSetting<BlackGui::Settings::TBackgroundConsolidation> m_consolidationSetting { this, &CSettingsModelComponent::cacheChanged }; //!< consolidation time
|
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
|
//! Consolidation time entered
|
||||||
void consolidationEntered();
|
void consolidationEntered();
|
||||||
|
|||||||
Reference in New Issue
Block a user