From 1c80d056e4f45b4ee7c4863cd792e83c889513c5 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 7 Apr 2020 17:49:43 +0200 Subject: Port QT_NO_TOOLTIP to QT_CONFIG(tooltip) We remove the QT_NO_TOOLTIP check from qstandarditemmodel.h, because as the 'tooltip' feature is in QtWidgets, we cannot use it properly in QtGui. Also this affects just two non-virtual inline methods, i.e. it has no effect on library size. Task-number: QTBUG-82785 Change-Id: Ic166f14fb1cf3e9dd789573a6b9db6a87fb50e10 Reviewed-by: Tasuku Suzuki Reviewed-by: Kai Koehne --- src/widgets/widgets/qmenu.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/widgets/widgets/qmenu.cpp') diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 86bc3d69be..0aca290484 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -73,7 +73,9 @@ #include "qtoolbutton.h" #endif #include "qpushbutton.h" +#if QT_CONFIG(tooltip) #include "qtooltip.h" +#endif #include #include #include @@ -3029,7 +3031,7 @@ QMenu::event(QEvent *e) if (d->currentAction) d->popupAction(d->currentAction, 0, false); break; -#ifndef QT_NO_TOOLTIP +#if QT_CONFIG(tooltip) case QEvent::ToolTip: if (d->toolTipsVisible) { const QHelpEvent *ev = static_cast(e); @@ -3041,7 +3043,7 @@ QMenu::event(QEvent *e) } } break; -#endif // QT_NO_TOOLTIP +#endif // QT_CONFIG(tooltip) #if QT_CONFIG(whatsthis) case QEvent::QueryWhatsThis: e->setAccepted(d->whatsThis.size()); -- cgit v1.2.3