mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +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
|
||||
{
|
||||
return CSettingsCache::instance()->getAllUnsavedKeys();
|
||||
if (this->supportsContexts())
|
||||
{
|
||||
return this->getIContextApplication()->getUnsavedSettingsKeys();
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
CStatusMessage CApplication::saveSettingsByKey(const QStringList &keys)
|
||||
@@ -495,10 +499,10 @@ namespace BlackCore
|
||||
{
|
||||
return this->getIContextApplication()->saveSettingsByKey(keys);
|
||||
}
|
||||
else
|
||||
{
|
||||
return CSettingsCache::instance()->saveToStore(keys);
|
||||
}
|
||||
//! \todo If contexts have shut down then we already missed the opportunity to save settings.
|
||||
//! Saving without contexts is not safe.
|
||||
BLACK_VERIFY(false);
|
||||
return CSettingsCache::instance()->saveToStore(keys);
|
||||
}
|
||||
|
||||
QString CApplication::getTemporaryDirectory() const
|
||||
|
||||
Reference in New Issue
Block a user