The current minimum Qt version is 5.9.5 which has been set in bitcoin/bitcoin#21286.
Distro support:
- centos 7 – unsupported since bitcoin/bitcoin#23511
- centos 8 – 5.15.2
- buster – 5.11.3
- bullseye – 5.15.2
- bionic – 5.9.5
- focal – 5.12.8
As another Ubuntu LTS is coming soon, it seems unreasonable to stick to Qt 5.9 which support ended on 2020-05-31. Anyway, it’s still possible to build Bitcoin Core GUI with depends on bionic system.
Bumping the minimum Qt version allows to make code safer and more reliable, e.g.:
- functor-parameter overload of
QMetaObject::invokeMethod
- fixed https://bugreports.qt.io/browse/QTBUG-10907
An example of the patch using the functor-overload of QMetaObject::invokeMethod
:
0--- a/src/qt/walletmodel.cpp
1+++ b/src/qt/walletmodel.cpp
2@@ -349,7 +349,7 @@ bool WalletModel::changePassphrase(const SecureString &oldPass, const SecureStri
3 static void NotifyUnload(WalletModel* walletModel)
4 {
5 qDebug() << "NotifyUnload";
6- bool invoked = QMetaObject::invokeMethod(walletModel, "unload");
7+ bool invoked = QMetaObject::invokeMethod(walletModel, &WalletModel::unload);
8 assert(invoked);
9 }
10
It uses the same new syntax as signal-slot connection with compile-time check. Also see bitcoin/bitcoin#16348.
This PR is intended to be merged early after branching 23.x
off.