summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index f292eac7..0e112873 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -309,16 +309,17 @@ int main(int argc, char *argv[])
QFile instanceFile(application.applicationDirPath() + "/INSTANCE");
if (instanceFile.open(QIODevice::ReadOnly)) {
instanceID = instanceFile.readAll().trimmed();
- }
+ }
- QString dataPath = instanceID.isEmpty() ? application.applicationDirPath()
- : QDir::fromNativeSeparators(
+ QString dataPath =
+ instanceID.isEmpty() ? application.applicationDirPath()
+ : QDir::fromNativeSeparators(
#if QT_VERSION >= 0x050000
- QStandardPaths::writableLocation(QStandardPaths::DataLocation)
+ QStandardPaths::writableLocation(QStandardPaths::DataLocation)
#else
- QDesktopServices::storageLocation(QDesktopServices::DataLocation)
+ QDesktopServices::storageLocation(QDesktopServices::DataLocation)
#endif
- ) + "/" + instanceID;
+ );
application.setProperty("dataPath", dataPath);
#if QT_VERSION >= 0x050000