summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformmenu.h
diff options
context:
space:
mode:
authorDmitry Shachnev <mitya57@gmail.com>2016-01-22 10:46:05 +0300
committerDmitry Shachnev <mitya57@gmail.com>2016-02-09 16:54:58 +0000
commit488cf78e44947efffcf3ebde62d7fb2d4fbf4345 (patch)
treee8857d0de4d8eb21f57df5a8ed358709f70ef656 /src/gui/kernel/qplatformmenu.h
parentb30edc51535c389bdee9f676c4b5003d37242092 (diff)
dbusmenu: Use proper toggle-type for items that are part of group
To achieve that, add a new virtual setHasExclusiveGroup() method to QPlatformMenuItem class (optional because we don't want to break existing platform themes), call it when converting QActions into platform menu items, and use it when exporting the menu items over D-Bus. Also, send ActionChanged event for actions when their group is changed, so that the platform menus are updated too. Change-Id: I8d951ace8c4097decec2a0154163e3672214effb Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'src/gui/kernel/qplatformmenu.h')
-rw-r--r--src/gui/kernel/qplatformmenu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformmenu.h b/src/gui/kernel/qplatformmenu.h
index 38481b4372..22848fcff6 100644
--- a/src/gui/kernel/qplatformmenu.h
+++ b/src/gui/kernel/qplatformmenu.h
@@ -87,6 +87,7 @@ public:
virtual void setEnabled(bool enabled) = 0;
virtual void setIconSize(int size) = 0;
virtual void setNativeContents(WId item) { Q_UNUSED(item); }
+ virtual void setHasExclusiveGroup(bool hasExclusiveGroup) { Q_UNUSED(hasExclusiveGroup); }
Q_SIGNALS:
void activated();