summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qtooltip.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel/qtooltip.cpp')
-rw-r--r--src/widgets/kernel/qtooltip.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/widgets/kernel/qtooltip.cpp b/src/widgets/kernel/qtooltip.cpp
index 80dc65e2d2..69b62ff7d7 100644
--- a/src/widgets/kernel/qtooltip.cpp
+++ b/src/widgets/kernel/qtooltip.cpp
@@ -127,7 +127,7 @@ public:
~QTipLabel();
static QTipLabel *instance;
- bool eventFilter(QObject *, QEvent *) Q_DECL_OVERRIDE;
+ bool eventFilter(QObject *, QEvent *) override;
QBasicTimer hideTimer, expireTimer;
@@ -143,10 +143,10 @@ public:
static int getTipScreen(const QPoint &pos, QWidget *w);
protected:
- void timerEvent(QTimerEvent *e) Q_DECL_OVERRIDE;
- void paintEvent(QPaintEvent *e) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent *e) override;
+ void paintEvent(QPaintEvent *e) override;
+ void mouseMoveEvent(QMouseEvent *e) override;
+ void resizeEvent(QResizeEvent *e) override;
#ifndef QT_NO_STYLE_STYLESHEET
public slots:
@@ -501,7 +501,10 @@ void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, cons
#ifdef Q_OS_WIN32
// On windows, we can't use the widget as parent otherwise the window will be
// raised when the tooltip will be shown
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
new QTipLabel(text, QApplication::desktop()->screen(QTipLabel::getTipScreen(pos, w)), msecDisplayTime);
+QT_WARNING_POP
#else
new QTipLabel(text, w, msecDisplayTime); // sets QTipLabel::instance to itself
#endif