Merge #14725: qt: Bump the minimum Qt version to 5.2
2bc3f114d0
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
This commit is contained in:
commit
74213fa4d1
4 changed files with 2 additions and 18 deletions
|
@ -276,7 +276,7 @@ AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
|
||||||
#endif
|
#endif
|
||||||
]],
|
]],
|
||||||
[[
|
[[
|
||||||
#if QT_VERSION < 0x050000 || QT_VERSION_MAJOR < 5
|
#if QT_VERSION < 0x050200 || QT_VERSION_MAJOR < 5
|
||||||
choke
|
choke
|
||||||
#endif
|
#endif
|
||||||
]])],
|
]])],
|
||||||
|
|
|
@ -570,10 +570,8 @@ int main(int argc, char *argv[])
|
||||||
Q_INIT_RESOURCE(bitcoin_locale);
|
Q_INIT_RESOURCE(bitcoin_locale);
|
||||||
|
|
||||||
BitcoinApplication app(*node, argc, argv);
|
BitcoinApplication app(*node, argc, argv);
|
||||||
#if QT_VERSION > 0x050100
|
|
||||||
// Generate high-dpi pixmaps
|
// Generate high-dpi pixmaps
|
||||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
#endif
|
|
||||||
#if QT_VERSION >= 0x050600
|
#if QT_VERSION >= 0x050600
|
||||||
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#include <QDoubleValidator>
|
#include <QDoubleValidator>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QFont>
|
#include <QFont>
|
||||||
|
#include <QFontDatabase>
|
||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
@ -55,11 +56,6 @@
|
||||||
#include <QUrlQuery>
|
#include <QUrlQuery>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
|
|
||||||
|
|
||||||
#if QT_VERSION >= 0x50200
|
|
||||||
#include <QFontDatabase>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MAC)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
@ -82,13 +78,7 @@ QString dateTimeStr(qint64 nTime)
|
||||||
|
|
||||||
QFont fixedPitchFont()
|
QFont fixedPitchFont()
|
||||||
{
|
{
|
||||||
#if QT_VERSION >= 0x50200
|
|
||||||
return QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
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
|
// Just some dummy data to generate a convincing random-looking (but consistent) address
|
||||||
|
|
|
@ -37,9 +37,7 @@ SplashScreen::SplashScreen(interfaces::Node& node, Qt::WindowFlags f, const Netw
|
||||||
|
|
||||||
float fontFactor = 1.0;
|
float fontFactor = 1.0;
|
||||||
float devicePixelRatio = 1.0;
|
float devicePixelRatio = 1.0;
|
||||||
#if QT_VERSION > 0x050100
|
|
||||||
devicePixelRatio = static_cast<QGuiApplication*>(QCoreApplication::instance())->devicePixelRatio();
|
devicePixelRatio = static_cast<QGuiApplication*>(QCoreApplication::instance())->devicePixelRatio();
|
||||||
#endif
|
|
||||||
|
|
||||||
// define text to place
|
// define text to place
|
||||||
QString titleText = tr(PACKAGE_NAME);
|
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);
|
QSize splashSize(480*devicePixelRatio,320*devicePixelRatio);
|
||||||
pixmap = QPixmap(splashSize);
|
pixmap = QPixmap(splashSize);
|
||||||
|
|
||||||
#if QT_VERSION > 0x050100
|
|
||||||
// change to HiDPI if it makes sense
|
// change to HiDPI if it makes sense
|
||||||
pixmap.setDevicePixelRatio(devicePixelRatio);
|
pixmap.setDevicePixelRatio(devicePixelRatio);
|
||||||
#endif
|
|
||||||
|
|
||||||
QPainter pixPaint(&pixmap);
|
QPainter pixPaint(&pixmap);
|
||||||
pixPaint.setPen(QColor(100,100,100));
|
pixPaint.setPen(QColor(100,100,100));
|
||||||
|
|
Loading…
Add table
Reference in a new issue