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>
This commit is contained in:
Dirk Hohndel 2015-06-13 21:12:54 -07:00
parent 7a594e3ec5
commit 6359a98397

View file

@ -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);