Skip to content

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Jan 23, 2022

The current minimum Qt version is 5.9.5 which has been set in #21286.

Distro support:

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.:

An example of the patch using the functor-overload of QMetaObject::invokeMethod:

--- 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 #16348.

This PR is intended to be merged early after branching 23.x off.

@hebasto hebasto marked this pull request as ready for review January 23, 2022 16:07
@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 23, 2022

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #24337 (build: Do not define PROVIDE_FUZZ_MAIN_FUNCTION macro unconditionally by hebasto)
  • #23565 (doc: rewrite dependencies.md by fanquake)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@shaavan
Copy link
Contributor

shaavan commented Jan 24, 2022

I am concept ACK on upgrading the minimum required Qt version to a later version because, as it is mentioned, it makes the code more secure and reliable.

However, I have one question I would like to ask. As you mentioned:

it seems unreasonable to stick to Qt 5.9, which support ended on 2020-05-31

I agree with the reasoning. However, when I checked for the Standard Support for Qt 5.11.3, I noticed it ended on 2019-05-22.
So if we are upgrading the minimum version, why are we choosing the version whose support ended almost two years ago?

@hebasto
Copy link
Member Author

hebasto commented Jan 24, 2022

So if we are upgrading the minimum version, why are we choosing the version whose support ended almost two years ago?

To support recent two Debian versions. No need to force users to upgrade their systems.

However, when I checked for the Standard Support for Qt 5.11.3, I noticed it ended on 2019-05-22.

In particular, Debian 10 packages are still supported.

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

functor-parameter overload of QMetaObject::invokeMethod
fixed https://bugreports.qt.io/browse/QTBUG-10907

~0. If this is all the motivation, that seems fairly weak.

@maflcko
Copy link
Member

maflcko commented Jan 25, 2022

~0. If this is all the motivation, that seems fairly weak.

Not sure what the invokeMethod will change in practice, but when it changes runtime errors into compile time errors (?), then it seems like a fine motivation. With 0.24 it should be fine to drop bionic-qt.

@hebasto
Copy link
Member Author

hebasto commented Feb 5, 2022

@fanquake

functor-parameter overload of QMetaObject::invokeMethod
fixed https://bugreports.qt.io/browse/QTBUG-10907

~0. If this is all the motivation, that seems fairly weak.

@MarcoFalke

~0. If this is all the motivation, that seems fairly weak.

Not sure what the invokeMethod will change in practice, but when it changes runtime errors into compile time errors (?), then it seems like a fine motivation. With 0.24 it should be fine to drop bionic-qt.

PR description has been updated with an example. Also see #16348 by @promag.

This change is a prerequisite for the following bumping Qt minimum
version to 5.11.3. It is required as bionic has Qt 5.9.5.

Effectively, this also changes:
- gcc from 8.4.0 to 8.3.0
- python from 3.6.5 to 3.7.3
@hebasto
Copy link
Member Author

hebasto commented Feb 5, 2022

Updated e39a9da -> 956f732 (pr24132.01 -> pr24132.02):

@maflcko maflcko added this to the 24.0 milestone Feb 6, 2022
@maflcko
Copy link
Member

maflcko commented Feb 6, 2022

cr ACK 956f732

The python3 CI change should be fine, as we still test python3.6 in the bionic nowallet task.

@laanwj
Copy link
Member

laanwj commented Feb 14, 2022

Concept ACK

@DrahtBot
Copy link
Contributor

Guix builds

File commit 8fe6f5a
(master)
commit afe511a
(master and this pull)
SHA256SUMS.part 15fa6ceff410a599... 574e4c1c04af4882...
*-aarch64-linux-gnu-debug.tar.gz 64e903c3ab4a158d... cc0c7e88b2bb3076...
*-aarch64-linux-gnu.tar.gz 687cb2caced5a1d5... f015a3c27d230e05...
*-arm-linux-gnueabihf-debug.tar.gz 278a4bd0ac3706e1... 65792c7b4773dc82...
*-arm-linux-gnueabihf.tar.gz b1c7afb5e8ea8e9d... 7c17daa7d074d204...
*-arm64-apple-darwin.tar.gz ac175d1ead43ec66... 889bec97ecfa4dc2...
*-osx-unsigned.dmg 1e73babee30d4073... 286e4dff542797a5...
*-osx-unsigned.tar.gz 8d8f0a29b9dccc1d... 82a736cab76a82ac...
*-osx64.tar.gz 88222574867e6c1a... 27a50eb04aecaba8...
*-powerpc64-linux-gnu-debug.tar.gz 9877ab4f41cbb5a2... e7f0a930e9aed9bd...
*-powerpc64-linux-gnu.tar.gz a6ab4f51fafc8802... 132a078913e9676a...
*-powerpc64le-linux-gnu-debug.tar.gz ce1958eed5123e00... 45212b9e449df479...
*-powerpc64le-linux-gnu.tar.gz df479c7c8799f5a9... 13aa73fb82c27b28...
*-riscv64-linux-gnu-debug.tar.gz bd591a23d9f5cf73... 115f2a226593957c...
*-riscv64-linux-gnu.tar.gz 78c2f64ad952a8a3... 6f667c38cc77ae6d...
*-x86_64-linux-gnu-debug.tar.gz 5e2bbc5d33779d93... 06143d05287c36f5...
*-x86_64-linux-gnu.tar.gz 469ec6f702d64710... 24928c0e48b78608...
*.tar.gz 1a95f4a3d9e2225b... bf4b4cc342c6192a...
guix_build.log 72a3e57c4499ea20... ab2a9ff51f57d776...
guix_build.log.diff b0e3e66831305c42...

Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK.

Then we can also ditch GUIUtil::ObjectInvoke.

@gruve-p
Copy link
Contributor

gruve-p commented Mar 6, 2022

Concept ACK

@maflcko maflcko requested a review from fanquake March 7, 2022 13:46
Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 956f732

@fanquake fanquake merged commit c9ed992 into bitcoin:master Mar 7, 2022
@hebasto hebasto deleted the 220123-qtmin branch March 7, 2022 15:55
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 7, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Mar 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants