mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-25 07:58:02 +01:00
Merge bitcoin/bitcoin#24132: build: Bump minimum Qt version to 5.11.3
956f7322f6
build: Bump minimum Qt version to 5.11.3 (Hennadii Stepanov)e22d10b936
ci: Switch from bionic to buster (Hennadii Stepanov) Pull request description: 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](http://mirror.centos.org/centos/8/AppStream/x86_64/os/Packages/qt5-qtbase-5.15.2-3.el8.x86_64.rpm) - buster -- [5.11.3](https://packages.debian.org/buster/libqt5core5a) - bullseye -- [5.15.2](https://packages.debian.org/bullseye/libqt5core5a) - _bionic_ -- [5.9.5](https://packages.ubuntu.com/bionic/libqt5core5a) - focal -- [5.12.8](https://packages.ubuntu.com/focal/libqt5core5a) As another Ubuntu LTS is coming soon, it seems unreasonable to stick to Qt 5.9 which support [ended](https://www.qt.io/blog/2017/06/07/renewed-qt-support-services) 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`](https://doc.qt.io/qt-5/qmetaobject.html#invokeMethod-4) - fixed https://bugreports.qt.io/browse/QTBUG-10907 An example of the patch using the functor-overload of `QMetaObject::invokeMethod`: ```diff --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -349,7 +349,7 @@ bool WalletModel::changePassphrase(const SecureString &oldPass, const SecureStri static void NotifyUnload(WalletModel* walletModel) { qDebug() << "NotifyUnload"; - bool invoked = QMetaObject::invokeMethod(walletModel, "unload"); + bool invoked = QMetaObject::invokeMethod(walletModel, &WalletModel::unload); assert(invoked); } ``` 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](https://github.com/bitcoin/bitcoin/issues/22969) branching `23.x` off. ACKs for top commit: MarcoFalke: cr ACK956f7322f6
fanquake: ACK956f7322f6
Tree-SHA512: 3d652bcdcd990ce785ad412ed70234d4f27743895e535a53ed44b35d4afc3052e066c4c84f417e30bc53d0a3dd9ebed62444c57b7c765cb1e9aa687fbf866877
This commit is contained in:
commit
c9ed9927bb
5 changed files with 4 additions and 8 deletions
|
@ -195,7 +195,7 @@ task:
|
|||
FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh"
|
||||
|
||||
task:
|
||||
name: '[previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [bionic]'
|
||||
name: '[previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [buster]'
|
||||
previous_releases_cache:
|
||||
folder: "releases"
|
||||
<< : *GLOBAL_TASK_TEMPLATE
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
export LC_ALL=C.UTF-8
|
||||
|
||||
export CONTAINER_NAME=ci_native_qt5
|
||||
export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic gcc-8 can compile our C++17 and run our functional tests in python3, see doc/dependencies.md
|
||||
export DOCKER_NAME_TAG=debian:buster # Check that buster gcc-8 can compile our C++17 and run our functional tests in python3, see doc/dependencies.md
|
||||
export PACKAGES="gcc-8 g++-8 python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev"
|
||||
export DEP_OPTS="NO_QT=1 NO_UPNP=1 NO_NATPMP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1 CC=gcc-8 CXX=g++-8"
|
||||
export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash
|
||||
|
|
|
@ -1309,7 +1309,7 @@ else
|
|||
BITCOIN_QT_INIT
|
||||
|
||||
dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
|
||||
BITCOIN_QT_CONFIGURE([5.9.5])
|
||||
BITCOIN_QT_CONFIGURE([5.11.3])
|
||||
|
||||
dnl Keep a copy of the original $QT_INCLUDES and use it when invoking qt's moc
|
||||
QT_INCLUDES_UNSUPPRESSED=$QT_INCLUDES
|
||||
|
|
|
@ -20,7 +20,7 @@ These are the dependencies currently used by Bitcoin Core. You can find instruct
|
|||
| PCRE | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) |
|
||||
| Python (tests) | | [3.6](https://www.python.org/downloads) | | | |
|
||||
| qrencode | [3.4.4](https://fukuchi.org/works/qrencode) | | No | | |
|
||||
| Qt | [5.15.2](https://download.qt.io/official_releases/qt/) | [5.9.5](https://github.com/bitcoin/bitcoin/issues/20104) | No | | |
|
||||
| Qt | [5.15.2](https://download.qt.io/official_releases/qt/) | [5.11.3](https://github.com/bitcoin/bitcoin/pull/24132) | No | | |
|
||||
| SQLite | [3.32.1](https://sqlite.org/download.html) | [3.7.17](https://github.com/bitcoin/bitcoin/pull/19077) | | | |
|
||||
| XCB | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) (Linux only) |
|
||||
| systemtap ([tracing](tracing.md))| [4.5](https://sourceware.org/systemtap/ftp/releases/) | | | | |
|
||||
|
|
|
@ -883,11 +883,7 @@ void PolishProgressDialog(QProgressDialog* dialog)
|
|||
|
||||
int TextWidth(const QFontMetrics& fm, const QString& text)
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
|
||||
return fm.horizontalAdvance(text);
|
||||
#else
|
||||
return fm.width(text);
|
||||
#endif
|
||||
}
|
||||
|
||||
void LogQtInfo()
|
||||
|
|
Loading…
Add table
Reference in a new issue