diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-04-07 17:49:43 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-04-21 20:35:29 +0200 |
commit | 1c80d056e4f45b4ee7c4863cd792e83c889513c5 (patch) | |
tree | fce424d5dcc18710bd88a479ec48c443209a1115 /src/widgets/kernel/qwidget.cpp | |
parent | fbb7c98e91ec9a0a253864d7621ee7ec73b1a480 (diff) |
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 <tasuku.suzuki@kdab.com>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 4e391bf4ae..8afacb9dab 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -64,7 +64,9 @@ #include <qpa/qplatformwindow.h> #include "private/qwidgetwindow_p.h" #include "qpainter.h" +#if QT_CONFIG(tooltip) #include "qtooltip.h" +#endif #if QT_CONFIG(whatsthis) #include "qwhatsthis.h" #endif @@ -147,7 +149,7 @@ QWidgetPrivate::QWidgetPrivate(int version) #if !defined(QT_NO_IM) , imHints(Qt::ImhNone) #endif -#ifndef QT_NO_TOOLTIP +#if QT_CONFIG(tooltip) , toolTipDuration(-1) #endif , directFontResolveMask(0) @@ -8972,7 +8974,7 @@ bool QWidget::event(QEvent *event) } } break; -#ifndef QT_NO_TOOLTIP +#if QT_CONFIG(tooltip) case QEvent::ToolTip: if (!d->toolTip.isEmpty()) QToolTip::showText(static_cast<QHelpEvent*>(event)->globalPos(), d->toolTip, this, QRect(), d->toolTipDuration); @@ -11237,7 +11239,7 @@ void QWidgetPrivate::setWindowModified_helper() } } -#ifndef QT_NO_TOOLTIP +#if QT_CONFIG(tooltip) /*! \property QWidget::toolTip @@ -11294,7 +11296,7 @@ int QWidget::toolTipDuration() const return d->toolTipDuration; } -#endif // QT_NO_TOOLTIP +#endif // QT_CONFIG(tooltip) #if QT_CONFIG(statustip) |