Skip to content

Commit 2bc3f11

Browse files
committed
Bump the minimum Qt version to 5.2
1 parent 8c59bb8 commit 2bc3f11

File tree

4 files changed

+2
-18
lines changed

4 files changed

+2
-18
lines changed

build-aux/m4/bitcoin_qt.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
276276
#endif
277277
]],
278278
[[
279-
#if QT_VERSION < 0x050000 || QT_VERSION_MAJOR < 5
279+
#if QT_VERSION < 0x050200 || QT_VERSION_MAJOR < 5
280280
choke
281281
#endif
282282
]])],

src/qt/bitcoin.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,10 +570,8 @@ int main(int argc, char *argv[])
570570
Q_INIT_RESOURCE(bitcoin_locale);
571571

572572
BitcoinApplication app(*node, argc, argv);
573-
#if QT_VERSION > 0x050100
574573
// Generate high-dpi pixmaps
575574
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
576-
#endif
577575
#if QT_VERSION >= 0x050600
578576
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
579577
#endif

src/qt/guiutil.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include <QDoubleValidator>
4848
#include <QFileDialog>
4949
#include <QFont>
50+
#include <QFontDatabase>
5051
#include <QKeyEvent>
5152
#include <QLineEdit>
5253
#include <QSettings>
@@ -55,11 +56,6 @@
5556
#include <QUrlQuery>
5657
#include <QMouseEvent>
5758

58-
59-
#if QT_VERSION >= 0x50200
60-
#include <QFontDatabase>
61-
#endif
62-
6359
#if defined(Q_OS_MAC)
6460
#pragma GCC diagnostic push
6561
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
@@ -82,13 +78,7 @@ QString dateTimeStr(qint64 nTime)
8278

8379
QFont fixedPitchFont()
8480
{
85-
#if QT_VERSION >= 0x50200
8681
return QFontDatabase::systemFont(QFontDatabase::FixedFont);
87-
#else
88-
QFont font("Monospace");
89-
font.setStyleHint(QFont::Monospace);
90-
return font;
91-
#endif
9282
}
9383

9484
// Just some dummy data to generate a convincing random-looking (but consistent) address

src/qt/splashscreen.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ SplashScreen::SplashScreen(interfaces::Node& node, Qt::WindowFlags f, const Netw
3737

3838
float fontFactor = 1.0;
3939
float devicePixelRatio = 1.0;
40-
#if QT_VERSION > 0x050100
4140
devicePixelRatio = static_cast<QGuiApplication*>(QCoreApplication::instance())->devicePixelRatio();
42-
#endif
4341

4442
// define text to place
4543
QString titleText = tr(PACKAGE_NAME);
@@ -53,10 +51,8 @@ SplashScreen::SplashScreen(interfaces::Node& node, Qt::WindowFlags f, const Netw
5351
QSize splashSize(480*devicePixelRatio,320*devicePixelRatio);
5452
pixmap = QPixmap(splashSize);
5553

56-
#if QT_VERSION > 0x050100
5754
// change to HiDPI if it makes sense
5855
pixmap.setDevicePixelRatio(devicePixelRatio);
59-
#endif
6056

6157
QPainter pixPaint(&pixmap);
6258
pixPaint.setPen(QColor(100,100,100));

0 commit comments

Comments
 (0)