diff options
-rw-r--r-- | qthelper.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/qthelper.cpp b/qthelper.cpp index c591f90dd..b26bdf467 100644 --- a/qthelper.cpp +++ b/qthelper.cpp @@ -304,7 +304,13 @@ extern "C" const char *system_default_directory(void) static char filename[PATH_MAX]; if (!*filename) { - QString name = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation).first(); + enum QStandardPaths::StandardLocation location; +#if QT_VERSION >= 0x050400 + location = QStandardPaths::AppDataLocation; +#else + location = QStandardPaths::DataLocation; +#endif + QString name = QStandardPaths::standardLocations(location).first(); QDir dir(name); dir.mkpath(name); // Why no "dir.encodeName()"? Crazy Qt |