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.
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app-misc/qutescoop/files/userdir.patch Sat Nov 09 21:45:01 2024 +0000 @@ -0,0 +1,27 @@ +diff --git a/src/Settings.cpp b/src/Settings.cpp +index 040fa65..4f21092 100644 +--- a/src/Settings.cpp ++++ b/src/Settings.cpp +@@ -1,5 +1,7 @@ + #include "Settings.h" + ++#include <QStandardPaths> ++ + #include "GuiMessage.h" + #include "Whazzup.h" + #include "dialogs/AirportDetails.h" +@@ -198,6 +200,14 @@ void Settings::importFromFile(QString fileName) { + * @returns fully qualified path to the 'application data directory'. + **/ + QString Settings::dataDirectory(const QString &composeFilePath) { ++ // try local data directory first, use if it exists ++ QString appLocalDataPath = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation); ++ QDir appLocalDataDir(appLocalDataPath); ++ if (appLocalDataDir.exists()) { ++ return QString("%1/%2").arg(appLocalDataPath, composeFilePath); ++ } ++ ++ // fall back to installation directory + return QString("%1/%2") + .arg(QCoreApplication::applicationDirPath(), composeFilePath); + }