[KHintsSettings] Update AA_DontShowIconsInMenus at runtime
ClosedPublic

Authored by broulik on Aug 16 2017, 12:15 PM.

Details

Summary

CHANGELOG: Changing the "Show icons in menus" setting will now immediately be applied to running applications

Test Plan

Changed the "Show icons in menus" settings and menu immediately lost all its menu icons. Enabling the setting brought them back.
Follow-up patch will remove the notification about how this applies only to newly started applications.

Diff Detail

Repository
R135 Integration for Qt applications in Plasma
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Aug 16 2017, 12:15 PM
Restricted Application added a project: Plasma. · View Herald TranscriptAug 16 2017, 12:15 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik updated this revision to Diff 18228.Aug 16 2017, 12:23 PM
  • Split into its own function as it's also done in updateQtSettings
broulik updated this revision to Diff 18229.Aug 16 2017, 12:32 PM

Yet another duplicate removed

davidedmundson added inline comments.
src/platformtheme/khintssettings.cpp
357

If I do removeKey("ShowIconsInMenu") rather than explicitly setting it

then call settings changed, this will always remain on whatever it was before; rather than matching what the actual default should be.

broulik added inline comments.Aug 16 2017, 1:10 PM
src/platformtheme/khintssettings.cpp
357

So the default value should be true instead? (This has been a bug before then, though)

broulik updated this revision to Diff 18236.Aug 16 2017, 1:11 PM

Set default to true

It wasn't a bug before because it was using whatever Qt had set as a default value; but that only works when you only have that line once.

davidedmundson accepted this revision.Aug 16 2017, 3:11 PM
This revision is now accepted and ready to land.Aug 16 2017, 3:11 PM
This revision was automatically updated to reflect the committed changes.