From b1a9a7794f51dd214e884fe331c5d1009972a48e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 5 Nov 2018 11:31:19 +0100 Subject: Add setter for property QStyleHints::showShortcutsInContextMenus Add a tri-state setter logic similar to the other properties. Fixes: QTBUG-71471 Change-Id: Iddb5be18a037634a53ad8725bddb91c12fb33fed Reviewed-by: Shawn Rutledge --- src/gui/kernel/qstylehints.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gui/kernel/qstylehints.h') diff --git a/src/gui/kernel/qstylehints.h b/src/gui/kernel/qstylehints.h index 7b0683e9b1..9091db9624 100644 --- a/src/gui/kernel/qstylehints.h +++ b/src/gui/kernel/qstylehints.h @@ -64,7 +64,7 @@ class Q_GUI_EXPORT QStyleHints : public QObject Q_PROPERTY(bool setFocusOnTouchRelease READ setFocusOnTouchRelease STORED false CONSTANT FINAL) Q_PROPERTY(bool showIsFullScreen READ showIsFullScreen STORED false CONSTANT FINAL) Q_PROPERTY(bool showIsMaximized READ showIsMaximized STORED false CONSTANT FINAL) - Q_PROPERTY(bool showShortcutsInContextMenus READ showShortcutsInContextMenus STORED false CONSTANT FINAL) + Q_PROPERTY(bool showShortcutsInContextMenus READ showShortcutsInContextMenus WRITE setShowShortcutsInContextMenus NOTIFY showShortcutsInContextMenusChanged FINAL) Q_PROPERTY(int startDragDistance READ startDragDistance NOTIFY startDragDistanceChanged FINAL) Q_PROPERTY(int startDragTime READ startDragTime NOTIFY startDragTimeChanged FINAL) Q_PROPERTY(int startDragVelocity READ startDragVelocity STORED false CONSTANT FINAL) @@ -93,6 +93,7 @@ public: bool showIsFullScreen() const; bool showIsMaximized() const; bool showShortcutsInContextMenus() const; + void setShowShortcutsInContextMenus(bool showShortcutsInContextMenus); int passwordMaskDelay() const; QChar passwordMaskCharacter() const; qreal fontSmoothingGamma() const; @@ -117,6 +118,7 @@ Q_SIGNALS: void startDragTimeChanged(int startDragTime); void tabFocusBehaviorChanged(Qt::TabFocusBehavior tabFocusBehavior); void useHoverEffectsChanged(bool useHoverEffects); + void showShortcutsInContextMenusChanged(bool); void wheelScrollLinesChanged(int scrollLines); void mouseQuickSelectionThresholdChanged(int threshold); -- cgit v1.2.3