The style is global per engine, there's no need to set it for every applet created as the engines are shared.
Since this entire thing is just a hack, just setting a dynamic property to identify that we've set a style is valid imho.
Also turn it into a plain QtObject since we don't need a fully-fledged Item.
Details
Details
- Reviewers
davidedmundson - Group Reviewers
Plasma - Commits
- R242:3ad4798ca683: [AppletQuickItem] Only set QtQuick Controls 1 style once per engine
Verified that a QtQuick Controls 1 Button still uses the Plasma theme.
Saves like 16 ms for me.
Diff Detail
Diff Detail
- Repository
- R242 Plasma Framework (Library)
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
Personally I would just kill the whole thing.
- All Plasma code all uses Plasma Components not QQC so this has zero effect. It was for an idea that didn't really materialise
- It gives an obscure ASAN warning on freeing "o", that I don't know how to fix
- This isn't going to work with QQC2
src/plasmaquick/appletquickitem.cpp | ||
---|---|---|
496 | if you were to do this: and you have the cleanup done for you. |
Comment Actions
actually it did materialise, and has nothing to do with plasmacomponents:
- if you use normal QQC1 in a plasmoid, it will have the plasma theme, so it is supported (and you can't be sure it is actually not used, especially in stuff from the store)
- if you use the same component in a config dialog, it will use the QStyle theme
then.. this thing cannot work anymore for qqc2 as their theming approach is completely different, but is a future problem.
Comment Actions
Ping. (Stupid Phab doesn't move this thing to the top in search result because it'd ooooold)