From d0438b3ee8aad3e8e1213aacfd2964afdcef9428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 21 Mar 2019 23:45:48 +0100 Subject: [PATCH] Use a propper path defined by the prefix for resources in QT4 builds --- gpxsee.pro | 1 + src/common/programpaths.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gpxsee.pro b/gpxsee.pro index 4d70424b..85a9a577 100644 --- a/gpxsee.pro +++ b/gpxsee.pro @@ -362,6 +362,7 @@ win32 { unix:!macx { isEmpty(PREFIX):PREFIX = /usr/local + lessThan(QT_MAJOR_VERSION, 5) {DEFINES += PREFIX=\\\"$$PREFIX\\\"} maps.files = pkg/maps/* maps.path = $$PREFIX/share/gpxsee/maps diff --git a/src/common/programpaths.cpp b/src/common/programpaths.cpp index d9023716..1073f1f6 100644 --- a/src/common/programpaths.cpp +++ b/src/common/programpaths.cpp @@ -31,7 +31,7 @@ #else #define USER_DIR QDir::homePath() + QString("/.local/share/") \ + qApp->applicationName() -#define GLOBAL_DIR QString("/usr/share/") + qApp->applicationName() +#define GLOBAL_DIR QString(PREFIX "/share/") + qApp->applicationName() #endif static QString dir(const QString &dirName, bool writable = false)