Currently there are two different sources of SystemTray items:
- Plasmoids
- Status Notifier
Thi change adds new model that holds both Plasmoids and SNIs.
broulik | |
ngraham | |
nicolasfella |
Plasma |
Currently there are two different sources of SystemTray items:
Thi change adds new model that holds both Plasmoids and SNIs.
Add/disable applets. Start/stop SNI app.
No Linters Available |
No Unit Test Coverage |
Buildable 19670 | |
Build 19688: arc lint + arc unit |
Looks very good in general. A few style nitpicks
applets/systemtray/package/contents/ui/ConfigEntries.qml | ||
---|---|---|
68–72 | You can try doing for (item of systemTrayModel) { ] But I don't know if that will work | |
applets/systemtray/systemtraymodel.cpp | ||
61 | roles.insert(ItemType, ...) should be enough | |
75 | This could be a candidate for std::find_if | |
154 | if (contains) { return stuff } otherStuff() | |
applets/systemtray/systemtraymodel.h | ||
78 | What's the purpose of the *Changed roles? |
applets/systemtray/package/contents/ui/ConfigEntries.qml | ||
---|---|---|
68–72 | Unfortunately model is not iterable. This code will be removed in D22176 anyway. | |
applets/systemtray/systemtraymodel.cpp | ||
61 | I'm using enum class instead of simple enum, so explicit cast is required. | |
75 | It would be nice, but does QStandardItemModel have an iterator? | |
154 | OK, changed. | |
applets/systemtray/systemtraymodel.h | ||
78 | All of these roles are copied from StatusNotifierItemSource. It might be an overkill to support all.
void DBusSystemTrayTask::dataUpdated(const QString &taskName, const Plasma::DataEngine::Data &properties) { // .... if (properties["TitleChanged"].toBool() || becomeValid) { QString title = properties["Title"].toString(); // ... } // ... |
Please make sure it would not bring this bug back: https://phabricator.kde.org/R120:6fcf9a5e03ba573fd0bfe30125f4c739b196a989
I double checked that. If I understand correctly the root cause of BUG 393630 was the use of plasmoid.rootItem - it is not introduced again.