File 0001-Install-colors-file-into-app-specific-directory.patch of Package kolourpaint
From d35991d3d9b94c829c0d27835f8a49b85a810b91 Mon Sep 17 00:00:00 2001
From: Nicolas Fella <nicolas.fella@gmx.de>
Date: Mon, 14 Jul 2025 00:22:06 +0200
Subject: [PATCH] Install colors file into app-specific directory
Kolourpain-specific data should not go into a generically named global config dir
BUG: 507007
---
CMakeLists.txt | 2 +-
lgpl/generic/kpColorCollection.cpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc5f6917..89c5a920 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -368,7 +368,7 @@ endif()
install(PROGRAMS org.kde.kolourpaint.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES org.kde.kolourpaint.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
-install(DIRECTORY colors DESTINATION ${KDE_INSTALL_CONFDIR})
+install(DIRECTORY colors DESTINATION ${KDE_INSTALL_DATADIR}/kolourpaint)
if(BUILD_DOC)
add_subdirectory(doc)
diff --git a/lgpl/generic/kpColorCollection.cpp b/lgpl/generic/kpColorCollection.cpp
index aac45e75..70f25cb5 100644
--- a/lgpl/generic/kpColorCollection.cpp
+++ b/lgpl/generic/kpColorCollection.cpp
@@ -80,7 +80,7 @@ QStringList kpColorCollection::installedCollections()
{
QStringList paletteList;
- QStringList paths = QStandardPaths::locateAll(QStandardPaths::GenericConfigLocation, QStringLiteral("colors"), QStandardPaths::LocateDirectory);
+ QStringList paths = QStandardPaths::locateAll(QStandardPaths::AppDataLocation, QStringLiteral("colors"), QStandardPaths::LocateDirectory);
for (const auto &path : paths) {
paletteList.append(QDir(path).entryList(QStringList(), QDir::Files));
}
@@ -206,7 +206,7 @@ bool kpColorCollection::openKDE(const QString &name, QWidget *parent)
return false;
}
- QString filename = QStandardPaths::locate(QStandardPaths::GenericConfigLocation, QStringLiteral("colors/") + name);
+ QString filename = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("colors/") + name);
if (filename.isEmpty()) {
#if DEBUG_KP_COLOR_COLLECTION
qCDebug(kpLogColorCollection) << "could not find file";
--
2.50.1