From: Jean-Marc Lasgouttes Date: Sun, 5 Mar 2023 20:54:08 +0000 (+0100) Subject: QDesktopWidget is not required in Qt5, the Qt6 code works X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e2e1fd6ea9347a27cac86886d47682dbb901d083;p=features.git QDesktopWidget is not required in Qt5, the Qt6 code works --- diff --git a/src/frontends/qt/GuiApplication.cpp b/src/frontends/qt/GuiApplication.cpp index 5750df9250..f8a3e76075 100644 --- a/src/frontends/qt/GuiApplication.cpp +++ b/src/frontends/qt/GuiApplication.cpp @@ -89,9 +89,6 @@ #include #include #include -#if QT_VERSION < 0x060000 -#include -#endif #include #include #include @@ -2638,11 +2635,7 @@ void GuiApplication::createView(QString const & geometry_arg, bool autoShow, // Negative displacements must be interpreted as distances // from the right or bottom screen borders. if (sx == '-' || sy == '-') { -#if QT_VERSION < 0x060000 - QRect rec = QApplication::desktop()->screenGeometry(); -#else QRect rec = QGuiApplication::primaryScreen()->geometry(); -#endif if (sx == '-') x += rec.width() - w - framewidth; if (sy == '-') diff --git a/src/frontends/qt/IconPalette.cpp b/src/frontends/qt/IconPalette.cpp index a3ed7b2500..7a5b1f3333 100644 --- a/src/frontends/qt/IconPalette.cpp +++ b/src/frontends/qt/IconPalette.cpp @@ -19,17 +19,13 @@ #include #include #include -#if QT_VERSION < 0x060000 -#include -#endif #include +#include #include #include #include #include -#if QT_VERSION >= 0x060000 #include -#endif namespace lyx { namespace frontend { @@ -181,11 +177,7 @@ void IconPalette::showEvent(QShowEvent * /*event*/) voffset -= parheight; } -#if QT_VERSION < 0x060000 - QRect const screen = qApp->desktop()->availableGeometry(this); -#else QRect const screen = window()->windowHandle()->screen()->availableGeometry(); -#endif QPoint const gpos = parentWidget()->mapToGlobal( parentWidget()->geometry().bottomLeft());