Changeset View
Changeset View
Standalone View
Standalone View
applets/systemtray/package/contents/ui/items/ItemLoader.qml
Show All 24 Lines | 22 | Loader { | |||
---|---|---|---|---|---|
25 | property var itemModel: model | 25 | property var itemModel: model | ||
26 | 26 | | |||
27 | source: { | 27 | source: { | ||
28 | if (model.itemType === "Plasmoid" && model.hasApplet) { | 28 | if (model.itemType === "Plasmoid" && model.hasApplet) { | ||
29 | return "PlasmoidItem.qml" | 29 | return "PlasmoidItem.qml" | ||
30 | } else if (model.itemType === "StatusNotifier") { | 30 | } else if (model.itemType === "StatusNotifier") { | ||
31 | return "StatusNotifierItem.qml" | 31 | return "StatusNotifierItem.qml" | ||
32 | } | 32 | } | ||
33 | console.warn("ItemLoader: Illegal State! Cannot determine source!") | ||||
ngraham: "Illegal" is one of those scary words we try not to use, even in console spew. Consider… | |||||
Old habits from Java world (IllegalStateException), I will change that. kmaterka: Old habits from Java world (IllegalStateException), I will change that. | |||||
33 | return "" | 34 | return "" | ||
34 | } | 35 | } | ||
35 | } | 36 | } |
"Illegal" is one of those scary words we try not to use, even in console spew. Consider changing this to "Invalid."