QToolTip: replace deprecated QDesktopWidget::screenGeometry()

QDesktopWidget::screenGeometry() was deprecated in 5.11 and replaced
by QScreen::geometry()

Change-Id: I23f5b6a4ed6b76cf558cd8d3ad49bc8029c16f61
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
bb10
Christian Ehrlicher 2018-03-24 20:57:05 +01:00
parent 2457b1381b
commit be45ada035
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ void QTipLabel::updateSize(const QPoint &pos)
++extra.rheight();
QSize sh = sizeHint();
if (wordWrap()) {
const QRect screenRect = QApplication::desktop()->screenGeometry(pos);
const QRect screenRect = QGuiApplication::screenAt(pos)->geometry();
if (sh.width() > screenRect.width()) {
// Try to use widely accepted 75chars max length or 80% of the screen width else.
// See https://en.wikipedia.org/wiki/Line_length