summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/widgets/qmenu.cpp')
-rw-r--r--src/widgets/widgets/qmenu.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index 95bb976566..0b874cb09a 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);
@@ -1327,12 +1327,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())))
@@ -1343,7 +1343,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
@@ -1362,7 +1362,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())
@@ -2971,7 +2971,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())) {
@@ -3233,7 +3233,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;