-
Couldn't load subscription status.
- Fork 51
Add cmake, qt6, and bitcoin core submodule #475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
https://doc.qt.io/qt-6/qtquickcontrols-index.html#versions "In Qt 6, both the major and minor versions match, and version numbers may be omitted from imports in QML. If the version is omitted, the latest version will be used."" The old version number for this module in particular resulted in a "not-installed" error
QQueue inherits from QList. In Qt5 size() returned an int: https://doc.qt.io/archives/qt-5.15/qlist.html#size but in Qt6 size() returns a qtsizetype: https://doc.qt.io/qt-6/qlist.html#size
This is setting a property in an Icon which is defined by us in
Icon.qml as a Button with required property color and
icon.color: root.color.
In Qt6, only declared public properties are accessible from outside
the component. Qt5 was more lenient about this.
See bitcoin-core#430 This code was merged into bitcoin/src in the gui-qml repository but should have been either been merged upstream into Bitcoin Core or just implemented in the GUI, which is what we do in this commit.
This is a reversion of 16f77a5 from bitcoin-core#359 which changed code in Bitcoin Core to notify new peers by their type. That code needs to be either merged upstream to Bitcoin Core or otherwise worked-around in gui-qml. Since the actual notification from Bitcoin Core only sends an int of the TOTAL number of connections (not just OUTBOUND) whatever UI there is to display this number to the user is probably now labeled incorrectly.
"legacy GUI" comments added to indicate which helper functions execute the corresponding code in legacy qt/bitcoin.cpp common::InitConfig was created in bitcoin/bitcoin#27150 to de-duplicate a lot of this code. gArgs.GetChainTypeString() was added in bitcoin/bitcoin#27491
for DEFAULT_SCRIPTCHECK_THREADS moved from validation.h in bitcoin/bitcoin#26762
I would have preferred to pull in a tagged release but there is no current release that includes bitcoin/bitcoin#32814 which fixes a critical when building qt on macos.
c2bc9a5 to
4b27183
Compare
cf2a192 to
df83ecf
Compare
df83ecf to
67423ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK
This is a great start. The application appears mostly working. I tested against ubuntu provided Qt 6.4.2 as well as the latest Qt 6.9.1
There are some QML things to fix but I think its best to work on those as follow up PRs
|
On Ubuntu 24.04, the additional |
…odule 67423ba65fe0df1ef901fd6c50b005b80de4b873 build artifacts in CI (Matthew Zipkin) 1091c9f0904779979446313b0b37179d34c26ba8 Update README for qt6 and cmake (Matthew Zipkin) 75738892bd60d296998a4d7a9a898b8e25d9c701 move qml/README to front page (Matthew Zipkin) c01451c4f39f879c413fd760ace9b3db5bb3fd0a build with cmake (Matthew Zipkin) 9020d7545f80cc24d3bd9ee6b8505dc052308ee6 include Bitcoin Core as a git submodule (Matthew Zipkin) 58f8d5a7884ce8cb78f145ec59f9a5b754c61baa CRecipient now takes CTxDestination not CScript (Matthew Zipkin) 7d7f55fe7301689497996631c850e67386e4d545 Use Txid instead of uint256 (Matthew Zipkin) c2ac37d385fd7ebdaeb254365930f4f24591c41a listWalletDir() now returns vector of std::pair (Matthew Zipkin) 08f97b85329cab871597d06993776a968904b8ab remove "watch only" -- no longer possible with descriptor wallets (Matthew Zipkin) b3d78ad631ca5ce0bd643fb95b306bae1868f32a options_model: #include chainstatemanager_args (Matthew Zipkin) 764cb5e478ff76c0dc11c421d6b56bf375346137 update time offset from NodeStateStats (Matthew Zipkin) 3a98d9ffa79c3b2a119f5cc7506dc4e14357ddbb copy qt/main.cpp and remove legacy GUI logic (Matthew Zipkin) a1e1ef8e5c89b306a1cb57ff9ef34a132bff9a63 bitcoin.cpp: rebase node initialization for upstream master (Matthew Zipkin) ee7928aa312c111691e8e90b18cf8df62acae266 Clean up Untranslated strings (Matthew Zipkin) 4a67da8c2bf331a8e6410c3e97a013b166b81f82 temporarily revert PeersNumByType (needs follow-up) (Matthew Zipkin) e0e235b5f73ddca50dd0bbf65602d4936c852c3c nodemodel: copy ProxyAddress methods into qml/ (Matthew Zipkin) 4de5fd60dafcc4d3450e5d0076bd812005a705bf remove UPnP (Matthew Zipkin) 26042dd4f8371389bb150980ced8e16f1e0fed6e use fs::path::utf8string() (Matthew Zipkin) 947e7df15cb771506b51d73d460fa6a885b76047 update QSGRendererInterface strings (Matthew Zipkin) 92b5f03046faa47ec23c4237e44c9906c59568c3 use *CACHE constants from bitcoin core (Matthew Zipkin) 114053743b2ee49ff202d15ab8e429a3fa380b76 use FoundBlock() interface instead of removed getBlockTime() (Matthew Zipkin) 210439df5f7b4a8ec5595021bcf0056f45dea652 icons: copy bitcoin.png into qml/ (Matthew Zipkin) ddc8293fb7a0e0d202be4a4282bef56a28cf50c1 bitcoin.cpp: replace LogPrint with LogDebug (Matthew Zipkin) 7fe66360d1bdb17a3a597c3cfefccdeb77f019cc send: access declared property color (Matthew Zipkin) 6af46c52ffa330582956b41a9f43ad041b2bc824 Qt6 changed RegExpValidator to RegularExpressionValidator (Matthew Zipkin) 655d02f147b25d71b2988f688a0f3f634fa475db QQueue requires cast qtsizetype to int (Matthew Zipkin) 52599cde93c25392dddf0d6b2c2bc214b7270656 explicity capture `this` in lambdas as required by C++11 (Matthew Zipkin) 3643091c381b2ede04b1acbf4ef16132dd645db8 StorageLocations: Qt 6 FileDialog has slightly different properties (Matthew Zipkin) fb278edc3ec8145fffc998eaeb8c6e488d1f4eb0 Use QtQuick.Dialogs default version for Qt6 compatibility (Matthew Zipkin) Pull request description: This PR rebases the QML GUI code on upstream Bitcoin Core master, updates dependencies and build system, and defines a new organizational model for the project which may eventually lead to a separation of the GUI completely from bitcoin/bitcoin. # Code changes in `qml/` Each commit has a link to Qt docs or to a Bitcoin Core PR to explain it. QML code had to be updated to respect API changes and other conflicts: - Upstream master bitcoin/bitcoin - Qt6 # Git submodule Bitcoin core is now included as a git submodule. This is a cleaner model than forking the bitcoin core repo: - Prevent GUI contributors from creating new conflicts with upstream by changing bitcoin core in the forked repo - Garuntee that bitcoin core code is not modified, meaning we don't have to run upstream tests - Simplifies the build instructions and the repo itself to make it easier for front end contributors # Cmake Adds a cmake build system on top of the new submodule+`qml/` pair. We currently still need to compile upstream `qt/` and there is no flag to separate its library from its binary, so the result is that both GUIs will be built, but no command-line daemon, fuzz, tests, or utility binaries: ``` build/bin ├── bitcoin-core-app └── bitcoin-qt ``` **Note:** I'm going with the title "Bitcoin Core App" from the design community and to make even more clear the separation from `bitcoin-qt` # CI I added a very minimal CI to build binaries for macos and ubuntu, and upload the [artifacts](https://github.com/bitcoin-core/gui-qml/actions/runs/16242179284). This is mainly a "does it build?" test but I have downloaded and run both artifacts locally and they do work, given that the right linked libraries are available. Future work can make those artifacts more easily usable by testers. # Future work Obviously there is still a lot to do, but I consider these to be the next major steps: - GUI tests - Tests builds for all supported platforms - Extract `qt/` from upstream and integrate in this repo - Much of that code can probably be abandoned now - The build system can be cleaned up and the legacy binary removed from the output - Extract Qt depends build from upstream and integrate in this repo - After this, the upstream repo will be set up to clear out all GUI code - Figure out guix builds, guix attestations, project release process, and overall degree of separation from Bitcoin Core Top commit has no ACKs. Tree-SHA512: 25046860f1055a9e9d24e5d92ddefac81483f2c78dbc0adc40e69adb85535d719d2c7f976a2bc4b504fcf38288842f4e6b3722bc9d8c6a188a82d031bc690258
This PR rebases the QML GUI code on upstream Bitcoin Core master, updates dependencies and build system, and defines a new organizational model for the project which may eventually lead to a separation of the GUI completely from bitcoin/bitcoin.
Code changes in
qml/Each commit has a link to Qt docs or to a Bitcoin Core PR to explain it. QML code had to be updated to respect API changes and other conflicts:
Git submodule
Bitcoin core is now included as a git submodule. This is a cleaner model than forking the bitcoin core repo:
Cmake
Adds a cmake build system on top of the new submodule+
qml/pair. We currently still need to compile upstreamqt/and there is no flag to separate its library from its binary, so the result is that both GUIs will be built, but no command-line daemon, fuzz, tests, or utility binaries:Note: I'm going with the title "Bitcoin Core App" from the design community and to make even more clear the separation from
bitcoin-qtCI
I added a very minimal CI to build binaries for macos and ubuntu, and upload the artifacts. This is mainly a "does it build?" test but I have downloaded and run both artifacts locally and they do work, given that the right linked libraries are available. Future work can make those artifacts more easily usable by testers.
Future work
Obviously there is still a lot to do, but I consider these to be the next major steps:
qt/from upstream and integrate in this repo