Commit 85359e1d authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Notifications KCM] Try both model indices

We prefer applicatons over services, however, when configuring a KDE application we get passed both an application and a service.
That application might be NoDisplay and then we end up not finding an index and event configuration files.

Differential Revision:
parent 960931fe
......@@ -34,11 +34,11 @@ Kirigami.Page {
Component.onCompleted: {
if (kcm.initialDesktopEntry) {
appConfiguration.rootIndex = kcm.sourcesModel.persistentIndexForDesktopEntry(kcm.initialDesktopEntry);
} else if (kcm.initialNotifyRcName) {
appConfiguration.rootIndex = kcm.sourcesModel.persistentIndexForNotifyRcName(kcm.initialNotifyRcName);
var idx = kcm.sourcesModel.persistentIndexForDesktopEntry(kcm.initialDesktopEntry);
if (!idx.valid) {
idx = kcm.sourcesModel.persistentIndexForNotifyRcName(kcm.initialNotifyRcName);
appConfiguration.rootIndex = idx;
if (kcm.initialEventId && kcm.initialNotifyRcName) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment