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

@@ -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