Skip to content

Knotify implementation to reload plugins/Runner configurations

Alexander Lohnau requested to merge (removed):knotify_implementation into master

This is the counterpart of plasma/plasma-desktop!18 (merged) and fixes BUG 421426.

To test this in KRunner/the plasmoid you have to enable the watcher in the milou project:

RunnerResultsModel::RunnerResultsModel(QObject *parent)
     : QAbstractItemModel(parent)
     , m_manager(new RunnerManager(this))
 {
+       m_manager->enableKNotifyPluginWatcher();

This also works when you edit the config with the notify flag, example of doing this inside of a runner:

auto cfg = config();
cfg.writeEntry("test", "test", KConfig::Notify);
cfg.sync();

With the counterpart you can enable/disable a plugin in the runners KCM and the runners get reloaded when you click apply.

Info: I intentionally didn't enable this by default, because for example the Kickoff fronted doesn't need this feature (the runners are whitelisted and don't depend on the config).

Edited by Alexander Lohnau

Merge request reports

Loading