mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
refs #887, directories available via CDirectoryUtils/relative paths
* relative cache/settings paths are available relativeFilePath * directories build in CDirectoryUtils * directory comparison in CDirectoryUtils * using CFileUtils to concatenate dir paths * using URL encoded string for normalized directory (as it can be decoded)
This commit is contained in:
@@ -26,7 +26,7 @@ namespace BlackMisc
|
||||
|
||||
const QString &CSettingsCache::persistentStore()
|
||||
{
|
||||
static const QString dir = getCacheRootDirectory() + "/settings/core";
|
||||
static const QString dir = CFileUtils::appendFilePaths(getCacheRootDirectory(), relativeFilePath());
|
||||
return dir;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,13 @@ namespace BlackMisc
|
||||
|
||||
QString CSettingsCache::filenameForKey(const QString &key)
|
||||
{
|
||||
return persistentStore() + "/" + CValueCache::filenameForKey(key);
|
||||
return CFileUtils::appendFilePaths(persistentStore(), CValueCache::filenameForKey(key));
|
||||
}
|
||||
|
||||
const QString CSettingsCache::relativeFilePath()
|
||||
{
|
||||
static const QString p("/settings/core");
|
||||
return p;
|
||||
}
|
||||
|
||||
QStringList CSettingsCache::enumerateStore() const
|
||||
|
||||
Reference in New Issue
Block a user