QGuiApplications will crash if the QtQuickControls style (either 1 or 2) is set to desktop, so make sure to unset it in that case.
Details
- Reviewers
davidedmundson - Group Reviewers
Plasma
Login to Plasma session, make sure that QT_QUICK_CONTROLS_STYLE=org.kde.desktop and QT_QUICK_CONTROLS_1_STYLE=/whatever/Desktop, check that Minuet, KAlgebra Mobile and the mapviewer example from QtLocation run correctly and don't crash anymore
Diff Detail
- Repository
- R135 Integration for Qt applications in Plasma
- Lint
Lint Skipped - Unit
Unit Tests Skipped
I don't see why we should be unsetting anything if a user has explicitly gone out of their way to set it.
We're not doing it from startkde anymore.
This change would also fix the crashes if the style was set in startkde as it used to, does it make sense to revert the change or you prefer to leave it where it is?
We shouldn't. It doesn't gain us anything.
More importantly, the one thing this patch doesn't cover is apps that don't have desktopSettingsAware set as they'll never load the qpt.
Edit: given were doing this in c++in process, maybe can we just call
https://doc.qt.io/qt-5/qquickstyle.html#setStyle
Instead of messing about with environment variables?
Indeed, replacing the qputenv line with QQuickStyle::setStyle(QLatin1String("org.kde.desktop")) fixes the inheritance problem: minuet doesn't crash anymore and systemsettings is correctly themed. Unfortunately QQC1 (such as kalgebramobile) still crash, is there something equivalent for QQC1?
Opened D7953 for the QQuickStyle approach. Keeping this open in case the new dependency is not acceptable for 5.11 at this stage.