aboutsummaryrefslogtreecommitdiffstats
path: root/qthelper.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-13 21:12:54 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-13 21:12:54 -0700
commit6359a983970e4fe6623bcb7f63ee9248f06cebf2 (patch)
tree6ed1700682100530e82b2b11192d4ef25a25abc9 /qthelper.cpp
parent7a594e3ec5e66f30a1604d492f3bb1af1259afd7 (diff)
downloadsubsurface-6359a983970e4fe6623bcb7f63ee9248f06cebf2.tar.gz
system_default_directory() is broken with Qt 5.4
So for now just keep using the same function as we use with earlier versions of Qt5 as that seems to work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qthelper.cpp')
-rw-r--r--qthelper.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/qthelper.cpp b/qthelper.cpp
index e25be9c26..39c259992 100644
--- a/qthelper.cpp
+++ b/qthelper.cpp
@@ -355,11 +355,15 @@ extern "C" const char *system_default_directory(void)
if (!*filename) {
enum QStandardPaths::StandardLocation location;
-#if QT_VERSION >= 0x050400
- location = QStandardPaths::AppDataLocation;
-#else
+
+ // allegedly once you're on Qt5.4 or later you should use
+ // QStandardPaths::AppDataLocation but on Mac that gives us
+ // paths starting with /Library/...
+ // #if QT_VERSION >= 0x050400
+ // location = QStandardPaths::AppDataLocation;
+ // #else
location = QStandardPaths::DataLocation;
-#endif
+ // #endif
QString name = QStandardPaths::standardLocations(location).first();
QDir dir(name);
dir.mkpath(name);