fix qt5 build
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
f350918186
commit
83883cadf9
@ -132,7 +132,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