fix qt5 build
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
(cherry picked from commit 83883cadf9
)
This commit is contained in:
parent
a053a4040c
commit
be2ecff97c
@ -129,7 +129,11 @@ NewInstanceDialog::NewInstanceDialog(const QString& initialGroup,
|
|||||||
if (APPLICATION->settings()->get("NewInstanceGeometry").isValid()) {
|
if (APPLICATION->settings()->get("NewInstanceGeometry").isValid()) {
|
||||||
restoreGeometry(QByteArray::fromBase64(APPLICATION->settings()->get("NewInstanceGeometry").toByteArray()));
|
restoreGeometry(QByteArray::fromBase64(APPLICATION->settings()->get("NewInstanceGeometry").toByteArray()));
|
||||||
} else {
|
} else {
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||||
auto screen = parent->screen();
|
auto screen = parent->screen();
|
||||||
|
#else
|
||||||
|
auto screen = QGuiApplication::primaryScreen();
|
||||||
|
#endif
|
||||||
auto geometry = screen->availableSize();
|
auto geometry = screen->availableSize();
|
||||||
resize(width(), qMin(geometry.height() - 50, 710));
|
resize(width(), qMin(geometry.height() - 50, 710));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user