mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 13:35:34 +08:00
refs #450 Make disk file saving and loading available in core settings.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "settingscache.h"
|
||||
#include <QStandardPaths>
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
@@ -22,4 +23,20 @@ namespace BlackCore
|
||||
return &cache;
|
||||
}
|
||||
|
||||
const QString &CSettingsCache::persistentStore()
|
||||
{
|
||||
static const QString dir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/org.swift-project/settings/core";
|
||||
return dir;
|
||||
}
|
||||
|
||||
BlackMisc::CStatusMessage CSettingsCache::saveToStore(const QString &keyPrefix) const
|
||||
{
|
||||
return saveToFiles(persistentStore(), keyPrefix);
|
||||
}
|
||||
|
||||
BlackMisc::CStatusMessage CSettingsCache::loadFromStore()
|
||||
{
|
||||
return loadFromFiles(persistentStore());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user