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

[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: https://phabricator.kde.org/D21434
parent 960931fe
......@@ -34,11 +34,11 @@ Kirigami.Page {
Component.onCompleted: {
kcm.sourcesModel.load();
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) {
appConfiguration.configureEvents(kcm.initialEventId);
......
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