megacoffee.net Gentoo overlay - legacy mirror
We have moved to Git. This repository is only provided for compatibility with old installations. Learn how to migrate your installation here.
comparison app-misc/qutescoop/files/userdir.patch @ 266:ece4c118e053
[sync] imported eb63403..6e83727 from upstream
commit 6e8372740386620a83b33749bb19fc8f40fc948a
Author: Daniel Neugebauer <dneuge@energiequant.de>
Date: Sat Nov 9 22:29:27 2024 +0100
app-misc/qutescoop: bump to 3.0.0-rc3
author | Migration Sync <gentoo-overlay@megacoffee.net> |
---|---|
date | Sat, 09 Nov 2024 21:45:01 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
265:184de8203bc6 | 266:ece4c118e053 |
---|---|
1 diff --git a/src/Settings.cpp b/src/Settings.cpp | |
2 index 040fa65..4f21092 100644 | |
3 --- a/src/Settings.cpp | |
4 +++ b/src/Settings.cpp | |
5 @@ -1,5 +1,7 @@ | |
6 #include "Settings.h" | |
7 | |
8 +#include <QStandardPaths> | |
9 + | |
10 #include "GuiMessage.h" | |
11 #include "Whazzup.h" | |
12 #include "dialogs/AirportDetails.h" | |
13 @@ -198,6 +200,14 @@ void Settings::importFromFile(QString fileName) { | |
14 * @returns fully qualified path to the 'application data directory'. | |
15 **/ | |
16 QString Settings::dataDirectory(const QString &composeFilePath) { | |
17 + // try local data directory first, use if it exists | |
18 + QString appLocalDataPath = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation); | |
19 + QDir appLocalDataDir(appLocalDataPath); | |
20 + if (appLocalDataDir.exists()) { | |
21 + return QString("%1/%2").arg(appLocalDataPath, composeFilePath); | |
22 + } | |
23 + | |
24 + // fall back to installation directory | |
25 return QString("%1/%2") | |
26 .arg(QCoreApplication::applicationDirPath(), composeFilePath); | |
27 } |