From 2bc3f114d09a9798d166896b0145b69c5ed2d41e Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 14 Nov 2018 01:32:51 +0200 Subject: [PATCH] Bump the minimum Qt version to 5.2 --- build-aux/m4/bitcoin_qt.m4 | 2 +- src/qt/bitcoin.cpp | 2 -- src/qt/guiutil.cpp | 12 +----------- src/qt/splashscreen.cpp | 4 ---- 4 files changed, 2 insertions(+), 18 deletions(-) diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4 index 05df8621d2..90a2cd9875 100644 --- a/build-aux/m4/bitcoin_qt.m4 +++ b/build-aux/m4/bitcoin_qt.m4 @@ -276,7 +276,7 @@ AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[ #endif ]], [[ - #if QT_VERSION < 0x050000 || QT_VERSION_MAJOR < 5 + #if QT_VERSION < 0x050200 || QT_VERSION_MAJOR < 5 choke #endif ]])], diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 7508f596e6..de236a016f 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -570,10 +570,8 @@ int main(int argc, char *argv[]) Q_INIT_RESOURCE(bitcoin_locale); BitcoinApplication app(*node, argc, argv); -#if QT_VERSION > 0x050100 // Generate high-dpi pixmaps QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); -#endif #if QT_VERSION >= 0x050600 QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index b1cd2f77d0..0e9aca21b1 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -55,11 +56,6 @@ #include #include - -#if QT_VERSION >= 0x50200 -#include -#endif - #if defined(Q_OS_MAC) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" @@ -82,13 +78,7 @@ QString dateTimeStr(qint64 nTime) QFont fixedPitchFont() { -#if QT_VERSION >= 0x50200 return QFontDatabase::systemFont(QFontDatabase::FixedFont); -#else - QFont font("Monospace"); - font.setStyleHint(QFont::Monospace); - return font; -#endif } // Just some dummy data to generate a convincing random-looking (but consistent) address diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp index b6235e91f7..df38285d08 100644 --- a/src/qt/splashscreen.cpp +++ b/src/qt/splashscreen.cpp @@ -37,9 +37,7 @@ SplashScreen::SplashScreen(interfaces::Node& node, Qt::WindowFlags f, const Netw float fontFactor = 1.0; float devicePixelRatio = 1.0; -#if QT_VERSION > 0x050100 devicePixelRatio = static_cast(QCoreApplication::instance())->devicePixelRatio(); -#endif // define text to place QString titleText = tr(PACKAGE_NAME); @@ -53,10 +51,8 @@ SplashScreen::SplashScreen(interfaces::Node& node, Qt::WindowFlags f, const Netw QSize splashSize(480*devicePixelRatio,320*devicePixelRatio); pixmap = QPixmap(splashSize); -#if QT_VERSION > 0x050100 // change to HiDPI if it makes sense pixmap.setDevicePixelRatio(devicePixelRatio); -#endif QPainter pixPaint(&pixmap); pixPaint.setPen(QColor(100,100,100));