diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2021-09-24 08:18:12 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2021-09-24 13:58:34 +0200 |
commit | 8248d4cd6021614461ae79adcd447d4c35e9fa96 (patch) | |
tree | 06a51e2f022aed4711e8300583de1556d194e333 /vcl/qt5 | |
parent | fd5b28d4bfef32a6bd63d963d16753c7ef985ec5 (diff) |
qt5: Replace use of deprecated QDesktopWidget in Qt5System
Change-Id: Id6ba8dfcf2f966f0e2e224990dec0309cd4d27d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122551
Tested-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/qt5')
-rw-r--r-- | vcl/qt5/Qt5System.cxx | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/vcl/qt5/Qt5System.cxx b/vcl/qt5/Qt5System.cxx index d769f7118ea5..e787ea0cab2b 100644 --- a/vcl/qt5/Qt5System.cxx +++ b/vcl/qt5/Qt5System.cxx @@ -7,26 +7,18 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <QtWidgets/QApplication> -#include <QtWidgets/QDesktopWidget> +#include <QtGui/QGuiApplication> +#include <QtGui/QScreen> -#include <string.h> #include <tools/gen.hxx> #include <Qt5System.hxx> #include <Qt5Tools.hxx> -unsigned int Qt5System::GetDisplayScreenCount() -{ - SAL_WNODEPRECATED_DECLARATIONS_PUSH - return QApplication::desktop()->screenCount(); - SAL_WNODEPRECATED_DECLARATIONS_POP -} +unsigned int Qt5System::GetDisplayScreenCount() { return QGuiApplication::screens().size(); } tools::Rectangle Qt5System::GetDisplayScreenPosSizePixel(unsigned int nScreen) { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - QRect qRect = QApplication::desktop()->screenGeometry(nScreen); - SAL_WNODEPRECATED_DECLARATIONS_POP + QRect qRect = QGuiApplication::screens().at(nScreen)->geometry(); return toRectangle(scaledQRect(qRect, qApp->devicePixelRatio())); } |