summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qmenu.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-07-04 15:19:36 +0200
committerLiang Qi <liang.qi@qt.io>2017-07-04 16:05:53 +0200
commitc2b224a758ce7e6dcf3748444fa8e29ab81904be (patch)
tree277cb99bf054190c935579142506caa4ec9861dd /src/widgets/widgets/qmenu.cpp
parent10de063ff12cdba07b4620182aced8ed05ee3505 (diff)
parenteaee1209f0ead5be786e81db8aee604ccfea85b0 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: src/corelib/io/qprocess_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/util/util.pri tests/auto/corelib/thread/qthread/qthread.pro tests/auto/corelib/thread/qthread/tst_qthread.cpp Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
Diffstat (limited to 'src/widgets/widgets/qmenu.cpp')
-rw-r--r--src/widgets/widgets/qmenu.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index bdcc4afff3..1b8409dba2 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -59,7 +59,7 @@
#ifndef QT_NO_EFFECTS
# include <private/qeffects_p.h>
#endif
-#ifndef QT_NO_WHATSTHIS
+#if QT_CONFIG(whatsthis)
# include <qwhatsthis.h>
#endif
@@ -187,7 +187,7 @@ private:
void QMenuPrivate::init()
{
Q_Q(QMenu);
-#ifndef QT_NO_WHATSTHIS
+#if QT_CONFIG(whatsthis)
q->setAttribute(Qt::WA_CustomWhatsThis);
#endif
q->setAttribute(Qt::WA_X11NetWmWindowTypePopupMenu);
@@ -663,7 +663,7 @@ void QMenuPrivate::setCurrentAction(QAction *action, int popup, SelectionReason
}
}
}
-#ifndef QT_NO_STATUSTIP
+#if QT_CONFIG(statustip)
} else if (previousAction) {
previousAction->d_func()->showStatusText(topCausedWidget(), QString());
#endif
@@ -1333,12 +1333,12 @@ void QMenuPrivate::activateCausedStack(const QVector<QPointer<QWidget> > &caused
void QMenuPrivate::activateAction(QAction *action, QAction::ActionEvent action_e, bool self)
{
Q_Q(QMenu);
-#ifndef QT_NO_WHATSTHIS
+#if QT_CONFIG(whatsthis)
bool inWhatsThisMode = QWhatsThis::inWhatsThisMode();
#endif
if (!action || !q->isEnabled()
|| (action_e == QAction::Trigger
-#ifndef QT_NO_WHATSTHIS
+#if QT_CONFIG(whatsthis)
&& !inWhatsThisMode
#endif
&& (action->isSeparator() ||!action->isEnabled())))
@@ -1349,7 +1349,7 @@ void QMenuPrivate::activateAction(QAction *action, QAction::ActionEvent action_e
*/
const QVector<QPointer<QWidget> > causedStack = calcCausedStack();
if (action_e == QAction::Trigger) {
-#ifndef QT_NO_WHATSTHIS
+#if QT_CONFIG(whatsthis)
if (!inWhatsThisMode)
actionAboutToTrigger = action;
#endif
@@ -1368,7 +1368,7 @@ void QMenuPrivate::activateAction(QAction *action, QAction::ActionEvent action_e
}
}
-#ifndef QT_NO_WHATSTHIS
+#if QT_CONFIG(whatsthis)
if (inWhatsThisMode) {
QString s = action->whatsThis();
if (s.isEmpty())
@@ -2805,7 +2805,7 @@ void QMenu::paintEvent(QPaintEvent *e)
style()->drawControl(QStyle::CE_MenuEmptyArea, &menuOpt, &p, this);
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
/*!
\reimp
*/
@@ -2979,7 +2979,7 @@ QMenu::event(QEvent *e)
}
break;
#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_WHATSTHIS
+#if QT_CONFIG(whatsthis)
case QEvent::QueryWhatsThis:
e->setAccepted(d->whatsThis.size());
if (QAction *action = d->actionAt(static_cast<QHelpEvent*>(e)->pos())) {
@@ -3241,7 +3241,7 @@ void QMenu::keyPressEvent(QKeyEvent *e)
key_consumed = true;
break; }
-#ifndef QT_NO_WHATSTHIS
+#if QT_CONFIG(whatsthis)
case Qt::Key_F1:
if (!d->currentAction || d->currentAction->whatsThis().isNull())
break;