Bug 350779

Summary: krunner forgets enabled categories, when switching KDE regional settings to another language
Product: [Plasma] krunner Reporter: Vytautas <vylu>
Component: generalAssignee: Kai Uwe Broulik <kde>
Status: RESOLVED FIXED    
Severity: normal CC: kdeu
Priority: NOR    
Version First Reported In: 5.5.3   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Vytautas 2015-07-30 06:33:51 UTC
krunner stores enabled categories in krunnerrc file in KDE local language. If someone changes language in KDE regional settings, on next startup krunner unmarks all categories, which has another name in new language. 

For example, category "Windows" in Lithuanian language is "Langai". If I change language in KDE regional settings from Lithuanian to English, o next run krunner disables "Windows" category. But "Audio" category, which has the same name in Lithuanian also, stays enabled.
Comment 1 Vishesh Handa 2015-08-01 16:12:44 UTC
Ah crap. Confirmed.
Comment 2 Vytautas 2016-01-22 09:00:38 UTC
Still not fixed on plasma 5.5.3
Comment 3 Kai Uwe Broulik 2016-07-04 16:30:17 UTC
Thanks! I was already wondering why it seemingly randomly forgot the enabled catgegories. Will investigate.
Comment 4 Kai Uwe Broulik 2016-07-04 16:34:50 UTC
Crap. This is a fundamental thing in krunner itself, ie. a runner can provide a category (which is already i18n'd) and then the runner manager saves that. Not sure if that's fixable :/
Comment 5 Vytautas 2016-07-05 09:52:13 UTC
Doesn't have categories some kind of ID, general (unique) category name or something? Using human readable caption as key is absolutely wrong.
Comment 6 Marco Martin 2016-09-29 11:06:29 UTC
Git commit 44866deb0261662eafde10fd750def25c17aef91 by Marco Martin.
Committed on 29/09/2016 at 11:06.
Pushed by mart into branch 'master'.

use KPluginSelector to enable runners

Summary:
the configuration dialog for enabling runners by category
was a neat idea but had several problems, gave by it
reinventing the wheel too much.
when changing the locale, the enabled categories list was resetted
due to categories being localized. it was also pretty
difficult to disable a particular plugin as you would have to
know what categoriesyou have to disable.

this approach is more basic, but reusing a common implementation,
we avoid some bugs and misbehaviors.

Test Plan: ran on an existing krunnerrc with different sets of categories enabled, tested krunner and its kcm with it, all expected runner plugins were used both in the kcm and while searching with krunner

Reviewers: broulik, #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D2872

M  +13   -244  kcms/runners/kcm.cpp
M  +2    -26   kcms/runners/kcm.h

http://commits.kde.org/plasma-desktop/44866deb0261662eafde10fd750def25c17aef91
Comment 7 Kai Uwe Broulik 2018-07-20 12:33:16 UTC
*** Bug 374519 has been marked as a duplicate of this bug. ***