From be2ecff97cdb4370d2adb78ad0a45ea200c5c5c4 Mon Sep 17 00:00:00 2001 From: Trial97 Date: Fri, 31 May 2024 19:30:10 +0300 Subject: [PATCH] fix qt5 build Signed-off-by: Trial97 (cherry picked from commit 83883cadf9dd4e71db257821e0c46ef6421021eb) --- launcher/ui/dialogs/NewInstanceDialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/launcher/ui/dialogs/NewInstanceDialog.cpp b/launcher/ui/dialogs/NewInstanceDialog.cpp index 72f0be010..de811e05f 100644 --- a/launcher/ui/dialogs/NewInstanceDialog.cpp +++ b/launcher/ui/dialogs/NewInstanceDialog.cpp @@ -129,7 +129,11 @@ NewInstanceDialog::NewInstanceDialog(const QString& initialGroup, if (APPLICATION->settings()->get("NewInstanceGeometry").isValid()) { restoreGeometry(QByteArray::fromBase64(APPLICATION->settings()->get("NewInstanceGeometry").toByteArray())); } else { +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) auto screen = parent->screen(); +#else + auto screen = QGuiApplication::primaryScreen(); +#endif auto geometry = screen->availableSize(); resize(width(), qMin(geometry.height() - 50, 710)); }