Found during T215, rectify CIdentifier issues

* null/anonymous identifier
* CIdentifier can be linked with QObject and
* CIdentifier reflects name changes of QObject (UI components change name after ctor call)
This commit is contained in:
Klaus Basan
2018-01-02 19:43:16 +01:00
parent 2fab47a5d3
commit 26b5a6ce28
14 changed files with 99 additions and 68 deletions

View File

@@ -1077,8 +1077,8 @@ namespace BlackCore
model.updateMissingParts(aircraft.getModel());
// Use anonymous as originator here, since the remote aircraft provider is ourselves and the call to updateAircraftModel() would
// return without doing anything.
this->updateAircraftModel(callsign, model, CIdentifier::anonymous());
this->updateAircraftNetworkModel(callsign, model, CIdentifier::anonymous());
this->updateAircraftModel(callsign, model, CIdentifier::null());
this->updateAircraftNetworkModel(callsign, model, CIdentifier::null());
}
else
{

View File

@@ -128,7 +128,7 @@ namespace BlackCore
void CContextApplicationProxy::synchronizeLocalSettings()
{
// note this proxy method does not call synchronizeLocalSettings in core
CSettingsCache::instance()->changeValuesFromRemote(this->getAllSettings(), CIdentifier::anonymous());
CSettingsCache::instance()->changeValuesFromRemote(this->getAllSettings(), CIdentifier::null());
}
BlackMisc::CStatusMessage CContextApplicationProxy::saveSettings(const QString &keyPrefix)

View File

@@ -39,7 +39,7 @@ namespace BlackCore
// todo: send weather grid to drivers from here
}
void CWeatherManager::requestWeatherGrid(const CWeatherGrid &weatherGrid, const BlackMisc::CIdentifier &identifier)
void CWeatherManager::requestWeatherGrid(const CWeatherGrid &weatherGrid, const CIdentifier &identifier)
{
WeatherRequest request { identifier, weatherGrid, {} };
m_pendingRequests.append(request);
@@ -48,7 +48,7 @@ namespace BlackCore
}
void CWeatherManager::requestWeatherGrid(const CWeatherGrid &weatherGrid,
const BlackMisc::CSlot<void(const BlackMisc::Weather::CWeatherGrid &)> &callback)
const CSlot<void(const CWeatherGrid &)> &callback)
{
if (m_isWeatherClear)
{
@@ -56,7 +56,7 @@ namespace BlackCore
return;
}
WeatherRequest weatherRequest { CIdentifier::anonymous(), weatherGrid, callback };
WeatherRequest weatherRequest { CIdentifier::null(), weatherGrid, callback };
m_pendingRequests.append(weatherRequest);
// Serialize the requests, since plugins can handle only one at a time