summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qmenubar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/widgets/qmenubar.cpp')
-rw-r--r--src/widgets/widgets/qmenubar.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp
index c16b2a5ac1..552409a4ed 100644
--- a/src/widgets/widgets/qmenubar.cpp
+++ b/src/widgets/widgets/qmenubar.cpp
@@ -52,7 +52,9 @@
#include <qmainwindow.h>
#include <qtoolbar.h>
#include <qtoolbutton.h>
+#if QT_CONFIG(whatsthis)
#include <qwhatsthis.h>
+#endif
#include <qpa/qplatformtheme.h>
#include "private/qguiapplication_p.h"
#include "qpa/qplatformintegration.h"
@@ -376,7 +378,7 @@ void QMenuBarPrivate::setCurrentAction(QAction *action, bool popup, bool activat
q->update(actionRect(currentAction));
popupState = popup;
-#ifndef QT_NO_STATUSTIP
+#if QT_CONFIG(statustip)
QAction *previousAction = currentAction;
#endif
currentAction = action;
@@ -385,7 +387,7 @@ void QMenuBarPrivate::setCurrentAction(QAction *action, bool popup, bool activat
if(popup)
popupAction(action, activateFirst);
q->update(actionRect(action));
-#ifndef QT_NO_STATUSTIP
+#if QT_CONFIG(statustip)
} else if (previousAction) {
QString empty;
QStatusTipEvent tip(empty);
@@ -1013,7 +1015,7 @@ void QMenuBar::mousePressEvent(QMouseEvent *e)
QAction *action = d->actionAt(e->pos());
if (!action || !d->isVisible(action) || !action->isEnabled()) {
d->setCurrentAction(0);
-#ifndef QT_NO_WHATSTHIS
+#if QT_CONFIG(whatsthis)
if (QWhatsThis::inWhatsThisMode())
QWhatsThis::showText(e->globalPos(), d->whatsThis, this);
#endif
@@ -1432,7 +1434,7 @@ bool QMenuBar::event(QEvent *e)
}
break;
#endif
-#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())) {