Depends on D19389.
Details
Diff Detail
- Repository
- R119 Plasma Desktop
- Branch
- master
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 10420 Build 10438: arc lint + arc unit
applets/kicker/plugin/systemmodel.cpp | ||
---|---|---|
57 β | (On Diff #55372) | qDeleteAll(m_entries) |
applets/kicker/package/contents/ui/ItemGridDelegate.qml | ||
---|---|---|
33 | QVariant() evaluates to false, and not all models implement this role to return true by default. Hence the check for an explicit false. The alternative would be to patch all the models. |
applets/kicker/package/contents/ui/ItemGridDelegate.qml | ||
---|---|---|
33 | so model.enabled you want it to resolve to true? This will be hard to read to anyone who isn't you. How about model.hasOwnProperty("enabled") && model.enabled? Or typeof model.enabled === "undefined" || model.enabled |
applets/kicker/plugin/systementry.cpp | ||
---|---|---|
26 | QSharedPointer :P | |
applets/kicker/plugin/systemmodel.cpp | ||
42 | range-for gives you values already, no need for values() | |
45 | Just capture entry into the lambda | |
46 | static_cast, also everywhere else | |
applets/kickoff/package/contents/ui/KickoffItem.qml | ||
31 | This means we now show all logout options and only disable them if not supported? |
applets/kickoff/package/contents/ui/KickoffItem.qml | ||
---|---|---|
31 | Yep. |
applets/kicker/package/contents/ui/ItemGridDelegate.qml | ||
---|---|---|
33 | For the record (so someone doesn't copy this idea), model.hasOwnProperty() wouldn't work to catch unimplemented roles in a model. I'll do another approach you might like better. |
Do some cleanups suggested by Kai.
Invert the enabled state role to please Aleix' eyes.
applets/kicker/plugin/systementry.cpp | ||
---|---|---|
26 | Personally I tend to prefer just readable, explicit code for simple cases. |
Personally I tend to prefer just readable, explicit code for simple cases.
Now the timing of my comment becomes awkward :/
applets/kicker/plugin/systementry.cpp | ||
---|---|---|
86 β | (On Diff #55372) | you increment this on every refresh, only decrement once in the destructor refresh is potentially called multiple times in the object's lifespan refresh is called from the constructor so we may as well do it all there |