From 93dcc43af36ea21773467ce5ff304b3e9b079900 Mon Sep 17 00:00:00 2001 From: Yuriy Puchkov Date: Mon, 22 Feb 2021 17:59:54 +0200 Subject: [PATCH] Code refactoring - CaptureWidget: 'screenGeometry' is deprecated (cherry picked from commit 6adf0b053f41003314b59b8f2e472cd56a280b23) --- src/widgets/capture/capturewidget.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/widgets/capture/capturewidget.cpp b/src/widgets/capture/capturewidget.cpp index 59f1178a..48d8c0aa 100644 --- a/src/widgets/capture/capturewidget.cpp +++ b/src/widgets/capture/capturewidget.cpp @@ -661,9 +661,7 @@ void CaptureWidget::wheelEvent(QWheelEvent* e) m_context.thickness += thicknessOffset; m_context.thickness = qBound(0, m_context.thickness, 100); QPoint topLeft = - qApp->desktop() - ->screenGeometry(qApp->desktop()->screenNumber(QCursor::pos())) - .topLeft(); + QGuiAppCurrentScreen().currentScreen()->geometry().topLeft(); int offset = m_notifierBox->width() / 4; m_notifierBox->move(mapFromGlobal(topLeft) + QPoint(offset, offset)); m_notifierBox->showMessage(QString::number(m_context.thickness));