From 0426b57b8d449d955639e4c0c44e5b18b129d156 Mon Sep 17 00:00:00 2001 From: kate Date: Wed, 26 Jan 2022 15:26:50 +0800 Subject: [PATCH] fix: default apps --- mimetype/mimeappmanager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mimetype/mimeappmanager.cpp b/mimetype/mimeappmanager.cpp index b317d61..cad9111 100644 --- a/mimetype/mimeappmanager.cpp +++ b/mimetype/mimeappmanager.cpp @@ -340,12 +340,12 @@ bool MimeAppManager::setDefaultAppForFile(const QString &filePath, const QString KConfig::NoGlobals, QStandardPaths::GenericConfigLocation); KConfigGroup defaultApp(profile, "Default Applications"); - defaultApp.writeXdgListEntry(mimeType.name(), {desktop}); + defaultApp.writeXdgListEntry(mimeType.name(), {value}); KConfigGroup addedApps(profile, "Added Associations"); QStringList apps = addedApps.readXdgListEntry(mimeType.name()); - apps.removeAll(desktop); - apps.prepend(desktop); // make it the preferred app + apps.removeAll(value); + apps.prepend(value); // make it the preferred app addedApps.writeXdgListEntry(mimeType.name(), apps); profile->sync();