diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2020-06-05 09:24:37 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2020-06-06 20:25:49 +0200 |
commit | 45b0f1be686cfba8dcecb9be5c875cae59c69276 (patch) | |
tree | 363dfd46575d147206267d854ce14747157f432e /src/widgets/kernel/qtooltip.cpp | |
parent | aa81b90738ce9faee5e433617c8bd243cb238729 (diff) |
Remove winrt
Macros and the await helper function from qfunctions_winrt(_p).h are
needed in other Qt modules which use UWP APIs on desktop windows.
Task-number: QTBUG-84434
Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets/kernel/qtooltip.cpp')
-rw-r--r-- | src/widgets/kernel/qtooltip.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/widgets/kernel/qtooltip.cpp b/src/widgets/kernel/qtooltip.cpp index ca5025ef8f..e90158cf83 100644 --- a/src/widgets/kernel/qtooltip.cpp +++ b/src/widgets/kernel/qtooltip.cpp @@ -217,11 +217,7 @@ void QTipLabel::reuseTip(const QString &text, int msecDisplayTime, const QPoint void QTipLabel::updateSize(const QPoint &pos) { -#ifndef Q_OS_WINRT - // ### The code below does not always work well on WinRT - // (e.g COIN fails an auto test - tst_QToolTip::qtbug64550_stylesheet - QTBUG-72652) d_func()->setScreenForPoint(pos); -#endif // Ensure that we get correct sizeHints by placing this window on the right screen. QFontMetrics fm(font()); QSize extra(1, 0); @@ -230,8 +226,7 @@ void QTipLabel::updateSize(const QPoint &pos) ++extra.rheight(); setWordWrap(Qt::mightBeRichText(text())); QSize sh = sizeHint(); - // ### When the above WinRT code is fixed, windowhandle should be used to find the screen. - QScreen *screen = QGuiApplication::screenAt(pos); + QScreen *screen = windowHandle() ? windowHandle()->screen() : QGuiApplication::screenAt(pos); if (!screen) screen = QGuiApplication::primaryScreen(); if (screen) { |