Skip to content

Commit

Permalink
Bump the minimum Qt version to 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Nov 13, 2018
1 parent 8c59bb8 commit 2bc3f11
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 18 deletions.
2 changes: 1 addition & 1 deletion build-aux/m4/bitcoin_qt.m4
Expand Up @@ -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
]])],
Expand Down
2 changes: 0 additions & 2 deletions src/qt/bitcoin.cpp
Expand Up @@ -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
Expand Down
12 changes: 1 addition & 11 deletions src/qt/guiutil.cpp
Expand Up @@ -47,6 +47,7 @@
#include <QDoubleValidator>
#include <QFileDialog>
#include <QFont>
#include <QFontDatabase>
#include <QKeyEvent>
#include <QLineEdit>
#include <QSettings>
Expand All @@ -55,11 +56,6 @@
#include <QUrlQuery>
#include <QMouseEvent>


#if QT_VERSION >= 0x50200
#include <QFontDatabase>
#endif

#if defined(Q_OS_MAC)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
Expand All @@ -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
Expand Down
4 changes: 0 additions & 4 deletions src/qt/splashscreen.cpp
Expand Up @@ -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<QGuiApplication*>(QCoreApplication::instance())->devicePixelRatio();
#endif

// define text to place
QString titleText = tr(PACKAGE_NAME);
Expand All @@ -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));
Expand Down

0 comments on commit 2bc3f11

Please sign in to comment.