Commit 5ecf266f authored by David Faure's avatar David Faure
Browse files

Port from QStandardPaths::DataLocation to QStandardPaths::AppDataLocation

They are the same on Linux (but DataLocation is deprecated). On Windows this enables the use of the roaming path.

NO_CHANGELOG
parent a3667142
...@@ -100,7 +100,7 @@ QString LayoutMemoryPersister::getLayoutMapAsString() ...@@ -100,7 +100,7 @@ QString LayoutMemoryPersister::getLayoutMapAsString()
bool LayoutMemoryPersister::save() bool LayoutMemoryPersister::save()
{ {
QFileInfo fileInfo(QStandardPaths::writableLocation(QStandardPaths::DataLocation) + REL_SESSION_FILE_PATH); QFileInfo fileInfo(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + REL_SESSION_FILE_PATH);
QDir baseDir(fileInfo.absoluteDir()); QDir baseDir(fileInfo.absoluteDir());
if( ! baseDir.exists() ) { if( ! baseDir.exists() ) {
...@@ -115,7 +115,7 @@ bool LayoutMemoryPersister::save() ...@@ -115,7 +115,7 @@ bool LayoutMemoryPersister::save()
bool LayoutMemoryPersister::restore() bool LayoutMemoryPersister::restore()
{ {
QFile file(QStandardPaths::writableLocation(QStandardPaths::DataLocation) + REL_SESSION_FILE_PATH); QFile file(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + REL_SESSION_FILE_PATH);
if (!file.exists()) { if (!file.exists()) {
return false; return false;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment