mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 21:13:23 +00:00
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:
parent
7a594e3ec5
commit
6359a98397
1 changed files with 8 additions and 4 deletions
12
qthelper.cpp
12
qthelper.cpp
|
@ -355,11 +355,15 @@ extern "C" const char *system_default_directory(void)
|
||||||
|
|
||||||
if (!*filename) {
|
if (!*filename) {
|
||||||
enum QStandardPaths::StandardLocation location;
|
enum QStandardPaths::StandardLocation location;
|
||||||
#if QT_VERSION >= 0x050400
|
|
||||||
location = QStandardPaths::AppDataLocation;
|
// allegedly once you're on Qt5.4 or later you should use
|
||||||
#else
|
// QStandardPaths::AppDataLocation but on Mac that gives us
|
||||||
|
// paths starting with /Library/...
|
||||||
|
// #if QT_VERSION >= 0x050400
|
||||||
|
// location = QStandardPaths::AppDataLocation;
|
||||||
|
// #else
|
||||||
location = QStandardPaths::DataLocation;
|
location = QStandardPaths::DataLocation;
|
||||||
#endif
|
// #endif
|
||||||
QString name = QStandardPaths::standardLocations(location).first();
|
QString name = QStandardPaths::standardLocations(location).first();
|
||||||
QDir dir(name);
|
QDir dir(name);
|
||||||
dir.mkpath(name);
|
dir.mkpath(name);
|
||||||
|
|
Loading…
Add table
Reference in a new issue