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
parent
2457b1381b
commit
be45ada035
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue