From 5debbf307be06dcabe8bd9456de6d42e7dde1f70 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 14 Nov 2018 13:13:13 +0100 Subject: [PATCH] Merge #14725: qt: Bump the minimum Qt version to 5.2 2bc3f114d09a9798d166896b0145b69c5ed2d41e Bump the minimum Qt version to 5.2 (Hennadii Stepanov) Pull request description: Refs: - #13478 - https://github.com/bitcoin/bitcoin/issues/13478#issuecomment-438431556 by @MarcoFalke Tree-SHA512: b598a80f25df9c440e0776b373b88a305250582049ab60caee48375f6599c2f6d40ed94b488ff3604ec9fc12c71f440f6881a3fc656c81f99e89dc5bf9ea2f6d (cherry picked from commit 74213fa4d13e53c3811d69a516fc865b79fdd0c7) # Conflicts: # build-aux/m4/bitcoin_qt.m4 # src/qt/dash.cpp # src/qt/guiutil.cpp # src/qt/splashscreen.cpp --- build-aux/m4/bitcoin_qt.m4 | 2 +- src/qt/dash.cpp | 4 +--- src/qt/guiutil.cpp | 13 ++----------- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4 index 061175c7b2..0a6ed6c187 100644 --- a/build-aux/m4/bitcoin_qt.m4 +++ b/build-aux/m4/bitcoin_qt.m4 @@ -291,7 +291,7 @@ AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[ #endif ]], [[ - #if QT_VERSION < 0x050000 + #if QT_VERSION < 0x050200 || QT_VERSION_MAJOR < 5 choke #endif ]])], diff --git a/src/qt/dash.cpp b/src/qt/dash.cpp index 29e9210128..1790978c9e 100644 --- a/src/qt/dash.cpp +++ b/src/qt/dash.cpp @@ -566,14 +566,12 @@ int main(int argc, char *argv[]) // Do not refer to data directory yet, this can be overridden by Intro::pickDataDirectory - /// 1. Basic Qt initialization (not dependent on parameters or configuration) + /// 2. Basic Qt initialization (not dependent on parameters or configuration) Q_INIT_RESOURCE(dash); Q_INIT_RESOURCE(dash_locale); -#if QT_VERSION > 0x050100 // Generate high-dpi pixmaps QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); -#endif #if QT_VERSION >= 0x050600 QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 0ad55eed71..861c069fbd 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -47,6 +47,8 @@ #include #include #include +#include +#include #include #include #include // for Qt::mightBeRichText @@ -54,11 +56,6 @@ #include #include - -#if QT_VERSION >= 0x50200 -#include -#endif - static fs::detail::utf8_codecvt_facet utf8; #if defined(Q_OS_MAC) @@ -150,13 +147,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 an convincing random-looking (but consistent) address