mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-04 00:45:46 +08:00
refs #884 Fixed some settings usage in CApplication.
This commit is contained in:
@@ -485,7 +485,11 @@ namespace BlackCore
|
|||||||
|
|
||||||
QStringList CApplication::getAllUnsavedSettings() const
|
QStringList CApplication::getAllUnsavedSettings() const
|
||||||
{
|
{
|
||||||
return CSettingsCache::instance()->getAllUnsavedKeys();
|
if (this->supportsContexts())
|
||||||
|
{
|
||||||
|
return this->getIContextApplication()->getUnsavedSettingsKeys();
|
||||||
|
}
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
CStatusMessage CApplication::saveSettingsByKey(const QStringList &keys)
|
CStatusMessage CApplication::saveSettingsByKey(const QStringList &keys)
|
||||||
@@ -495,10 +499,10 @@ namespace BlackCore
|
|||||||
{
|
{
|
||||||
return this->getIContextApplication()->saveSettingsByKey(keys);
|
return this->getIContextApplication()->saveSettingsByKey(keys);
|
||||||
}
|
}
|
||||||
else
|
//! \todo If contexts have shut down then we already missed the opportunity to save settings.
|
||||||
{
|
//! Saving without contexts is not safe.
|
||||||
return CSettingsCache::instance()->saveToStore(keys);
|
BLACK_VERIFY(false);
|
||||||
}
|
return CSettingsCache::instance()->saveToStore(keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CApplication::getTemporaryDirectory() const
|
QString CApplication::getTemporaryDirectory() const
|
||||||
|
|||||||
Reference in New Issue
Block a user