Sophie

Sophie

distrib > Mageia > 9 > armv7hl > by-pkgid > 5df1446760b4cdf882d503227d829702 > files > 7

kdebase4-runtime-17.08.3-12.mga9.src.rpm

From a571a8a04760ee339f744c79a446d9ae3e7b8181 Mon Sep 17 00:00:00 2001
From: Luc Menut <lmenut@mageia.org>
Date: Sat, 18 Oct 2014 18:50:33 +0200
Subject: [PATCH 1/4] Write into mimeapps.list in XDG_CONFIG_HOME, as per
 mime-apps spec

http://standards.freedesktop.org/mime-apps-spec/mime-apps-spec-1.0.1.html#file
---
 kcontrol/componentchooser/componentchooserfilemanager.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kcontrol/componentchooser/componentchooserfilemanager.cpp b/kcontrol/componentchooser/componentchooserfilemanager.cpp
index 4c730b0..7f282d9 100644
--- a/kcontrol/componentchooser/componentchooserfilemanager.cpp
+++ b/kcontrol/componentchooser/componentchooserfilemanager.cpp
@@ -26,6 +26,7 @@
 #include <kopenwithdialog.h>
 #include <kglobalsettings.h>
 #include <kconfiggroup.h>
+#include <kstandarddirs.h>
 
 CfgFileManager::CfgFileManager(QWidget *parent)
     : QWidget(parent), Ui::FileManagerConfig_UI(),CfgPlugin()
@@ -85,7 +86,7 @@ void CfgFileManager::save(KConfig *)
     kDebug() << storageId;
     if (!storageId.isEmpty()) {
         // This is taken from filetypes/mimetypedata.cpp
-        KSharedConfig::Ptr profile = KSharedConfig::openConfig("mimeapps.list", KConfig::NoGlobals, "xdgdata-apps");
+        KSharedConfig::Ptr profile = KSharedConfig::openConfig(KGlobal::dirs()->localxdgconfdir() + QLatin1String("mimeapps.list"), KConfig::SimpleConfig);
         if (!profile->isConfigWritable(true)) // warn user if mimeapps.list is root-owned (#155126/#94504)
             return;
         KConfigGroup addedApps(profile, "Added Associations");
-- 
2.1.2