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.
view app-misc/qutescoop/files/userdir.patch @ 267:3ea8643fd217
[sync] imported 6e83727..5f8a98e from upstream
commit 5f8a98e9c4086d481e1bcfdfac5553aba0f65087
Author: Daniel Neugebauer <dneuge@energiequant.de>
Date: Thu Jan 2 12:53:32 2025 +0100
media-sound/yabridge-bin: added 5.1.1
commit 9c160cb6e5ae191039168b1f93a1a190460e0218
Author: Daniel Neugebauer <dneuge@energiequant.de>
Date: Thu Jan 2 11:31:20 2025 +0100
media-libs/mlt-7.24.0-r1: restored from official portage tree as it is needed by kde-apps/kdenlive:23.08.5 (pulled in by kde-apps/kdemultimedia-meta for KDE 5)
author | Migration Sync <gentoo-overlay@megacoffee.net> |
---|---|
date | Thu, 02 Jan 2025 12:00:01 +0000 |
parents | ece4c118e053 |
children |
line wrap: on
line source
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); }