Raise minimum supported Qt version to 5.12

This commit is contained in:
Vladimir Golovnev (Glassez) 2021-02-18 11:51:00 +03:00
parent 6139d0d65a
commit f022458383
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7
20 changed files with 42 additions and 148 deletions

View file

@ -235,7 +235,7 @@ int main(int argc, char *argv[])
// 3. https://bugreports.qt.io/browse/QTBUG-46015
qputenv("QT_BEARER_POLL_TIMEOUT", QByteArray::number(-1));
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) && !defined(DISABLE_GUI)
#if !defined(DISABLE_GUI)
// this is the default in Qt6
app->setAttribute(Qt::AA_DisableWindowContextHelpButton);
#endif
@ -381,11 +381,7 @@ void showSplashScreen()
const QString version = QBT_VERSION;
painter.setPen(QPen(Qt::white));
painter.setFont(QFont("Arial", 22, QFont::Black));
#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
painter.drawText(224 - painter.fontMetrics().horizontalAdvance(version), 270, version);
#else
painter.drawText(224 - painter.fontMetrics().width(version), 270, version);
#endif
QSplashScreen *splash = new QSplashScreen(splashImg);
splash->show();
QTimer::singleShot(1500, splash, &QObject::deleteLater);