summaryrefslogtreecommitdiffstats
path: root/src/widgets/accessible
diff options
context:
space:
mode:
authorTasuku Suzuki <tasuku.suzuki@qt.io>2017-04-27 12:43:36 +0900
committerStephan Binner <stephan.binner@basyskom.com>2017-04-30 07:49:32 +0000
commitde76ccb9673eb7dda1c8a66fe4a063b00f36eb59 (patch)
tree2377a44ad206aa8562e1ab2974f7f8376491644e /src/widgets/accessible
parentda1079e51c02505032d044e7b80bff2e4fc7a955 (diff)
Fix warnings with -no-feature-menu
Change-Id: I1e62e3772dbd5f17d9ad69025b23e3726386c2bd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/widgets/accessible')
-rw-r--r--src/widgets/accessible/simplewidgets.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/widgets/accessible/simplewidgets.cpp b/src/widgets/accessible/simplewidgets.cpp
index a53e5eaf30..aa075cad1b 100644
--- a/src/widgets/accessible/simplewidgets.cpp
+++ b/src/widgets/accessible/simplewidgets.cpp
@@ -327,9 +327,8 @@ int QAccessibleToolButton::childCount() const
QAccessible::Role QAccessibleToolButton::role() const
{
- QAbstractButton *ab = button();
-
#ifndef QT_NO_MENU
+ QAbstractButton *ab = button();
QToolButton *tb = qobject_cast<QToolButton*>(ab);
if (!tb->menu())
return tb->isCheckable() ? QAccessible::CheckBox : QAccessible::PushButton;
@@ -347,6 +346,8 @@ QAccessibleInterface *QAccessibleToolButton::child(int index) const
{
return QAccessible::queryAccessibleInterface(toolButton()->menu());
}
+#else
+ Q_UNUSED(index)
#endif
return 0;
}