Set QtQuickControls theme in QPT
ClosedPublic

Authored by davidedmundson on Sep 22 2017, 10:58 AM.

Details

Summary

Currently we set QT_QUICK_CONTROLS_STYLE in startkde.

This causes problems as we're setting vars that meddle with other
developers setups. Especially if they're using QGuiApplication which
will instantly crash when using the desktop theme.

By moving the setting inside the QPT we can:

  • only affect QApplications
  • only affect apps that are desktopSettingsAware

If this env is already explicitly set by someone else, that has
precedence.

Also if this ever does move from being an env variable, we will probably
want to add the code here.

BUG: 384466
BUG: 384481

Test Plan

Unset env
Ran systemsettings5 the scrollbar was the correct colour

Diff Detail

Repository
R135 Integration for Qt applications in Plasma
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: Plasma. · View Herald TranscriptSep 22 2017, 10:58 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
gladhorn accepted this revision.Sep 22 2017, 11:47 AM
gladhorn added a subscriber: gladhorn.

It would be very nice if things didn't crash when using qguiapplication and the style, but I guess that's unrelated to this patch.

This revision is now accepted and ready to land.Sep 22 2017, 11:47 AM
This revision was automatically updated to reflect the committed changes.