Allow hiding icons in menus

Review Request #5609 - Created Oct. 12, 2010 and submitted

Christoph Feck
The first part of this patch makes the Qt::AA_DontShowIconsInMenus configurable in kdelibs via a KDE config entry.

The second part exposes this config entry in the Styles KCM, just right between the settings to hide icons on buttons or toolbars.

Note that GNOME also has this configuration option.
Hiding the menu icons works with all styles (even pure Qt styles), because Qt itself respects this attribute when setting up the menus.

The only "bug" is a missing dialog informing the user that changing this option only affects applications after restarting (same as Xft font settings or locale options). But before I add that, I want some feedback.
David Faure
So some people don't like the nice shiny icons in menu items? That's sad :-)

Anyway, patch looks good, except for one bug. Feel free to commit if you agree with the suggested change.
This default value surprises me. It basically says "by default, whatever Qt does, it must be wrong, let me toggle it".

I think you meant cg.readEntry("ShowIconsInMenuItems", true), which matches the current default behavior and the default value in the similar KCM code.
  1. It says "use the current Qt value as default". Note the "Dont" in the attribute name.
David Faure
Ah yes, I misread. ok. I see your idea: if the app developer sets this flag and the user does not, then we respect the app's choice.

It just seems unusual that the default value in kdelibs does not exactly match the default value in the KCM, but OK, I don't think Qt would ever change the default value for this, so "true" sounds right as a default-default-value :-)

Green light.