Changeset View
Changeset View
Standalone View
Standalone View
kcms/notifications/package/contents/ui/SourcesPage.qml
Show All 34 Lines | 34 | Component.onCompleted: { | |||
---|---|---|---|---|---|
35 | kcm.sourcesModel.load(); | 35 | kcm.sourcesModel.load(); | ||
36 | 36 | | |||
37 | var idx = kcm.sourcesModel.persistentIndexForDesktopEntry(kcm.initialDesktopEntry); | 37 | var idx = kcm.sourcesModel.persistentIndexForDesktopEntry(kcm.initialDesktopEntry); | ||
38 | if (!idx.valid) { | 38 | if (!idx.valid) { | ||
39 | idx = kcm.sourcesModel.persistentIndexForNotifyRcName(kcm.initialNotifyRcName); | 39 | idx = kcm.sourcesModel.persistentIndexForNotifyRcName(kcm.initialNotifyRcName); | ||
40 | } | 40 | } | ||
41 | appConfiguration.rootIndex = idx; | 41 | appConfiguration.rootIndex = idx; | ||
42 | 42 | | |||
43 | // In Component.onCompleted we might not be assigned a window yet | ||||
44 | // which we need to make the events config dialog transient to it | ||||
45 | Qt.callLater(function() { | ||||
43 | if (kcm.initialEventId && kcm.initialNotifyRcName) { | 46 | if (kcm.initialEventId && kcm.initialNotifyRcName) { | ||
44 | appConfiguration.configureEvents(kcm.initialEventId); | 47 | appConfiguration.configureEvents(kcm.initialEventId); | ||
45 | } | 48 | } | ||
46 | 49 | | |||
47 | kcm.initialDesktopEntry = ""; | 50 | kcm.initialDesktopEntry = ""; | ||
48 | kcm.initialNotifyRcName = ""; | 51 | kcm.initialNotifyRcName = ""; | ||
49 | kcm.initialEventId = ""; | 52 | kcm.initialEventId = ""; | ||
53 | }); | ||||
50 | } | 54 | } | ||
51 | 55 | | |||
52 | Binding { | 56 | Binding { | ||
53 | target: kcm.filteredModel | 57 | target: kcm.filteredModel | ||
54 | property: "query" | 58 | property: "query" | ||
55 | value: searchField.text | 59 | value: searchField.text | ||
56 | } | 60 | } | ||
57 | 61 | | |||
▲ Show 20 Lines • Show All 162 Lines • Show Last 20 Lines |