Instantiate NodeModel in qml#38
Closed
promag wants to merge 5 commits into
Closed
Conversation
Closed
3d58d92 to
54924fc
Compare
hebasto
reviewed
Oct 2, 2021
Member
hebasto
left a comment
There was a problem hiding this comment.
I think the "qml: Update block tip in the gui thread" commit (54924fc) is valuable by its own as NodeModel::setBlockTipHeight emits the blockTipHeightChanged signal. Maybe put it in its own PR?
Also is it worth to assert(QThread::currentThread() == thread()); in each function which emits signals?
hebasto
reviewed
Oct 2, 2021
Comment on lines
+25
to
+42
| NodeModel { | ||
| id: node_model | ||
| } |
Member
There was a problem hiding this comment.
Does instantiating an object in QML have performance penalties comparing to instantiating it in C++ code?
54924fc to
c257c92
Compare
c257c92 to
cf8a278
Compare
hebasto
added a commit
that referenced
this pull request
Oct 25, 2022
eca5252 qml: Update block tip in the gui thread (João Barbosa) Pull request description: This takes commit cf8a278 from #38 and rebases it over changes on master; namely that we've dropped `GUIUtil::ObjectInvoke` in favor of `QMetaObject::invokeMethod`. This avoids non-thread-safe errors. I ran into a segfault here while running some data intensive monkey-code related to blocks, this change prevented it. I'm not going to actually use the code that caused the segfault, just to illustrate that this is useful here anyways. [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/177) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/177) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip?branch=pull/177) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/177) ACKs for top commit: hebasto: ACK eca5252, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 9faf9b486af15f29ace20c9cb55ba65f3e20d23f4b7dc58908589f9a104b47cebe575a2a88935ed5f1a2fafc8bc41088084f28803990db64715e235da4c6461f
johnny9
pushed a commit
to johnny9/bitcoin-core-app
that referenced
this pull request
Jul 4, 2025
a8a7291 qml: Update block tip in the gui thread (João Barbosa) Pull request description: This takes commit bitcoin-core/gui-qml@cf8a278 from bitcoin-core/gui-qml#38 and rebases it over changes on master; namely that we've dropped `GUIUtil::ObjectInvoke` in favor of `QMetaObject::invokeMethod`. This avoids non-thread-safe errors. I ran into a segfault here while running some data intensive monkey-code related to blocks, this change prevented it. I'm not going to actually use the code that caused the segfault, just to illustrate that this is useful here anyways. [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/177) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/177) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip?branch=pull/177) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/177) ACKs for top commit: hebasto: ACK a8a7291, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 9faf9b486af15f29ace20c9cb55ba65f3e20d23f4b7dc58908589f9a104b47cebe575a2a88935ed5f1a2fafc8bc41088084f28803990db64715e235da4c6461f
tx-signer450
added a commit
to tx-signer450/gui-qml
that referenced
this pull request
Oct 20, 2025
a8a7291f744c0dc8c2bc9cf51766a4216b802fb9 qml: Update block tip in the gui thread (João Barbosa) Pull request description: This takes commit bitcoin-core/gui-qml@cf8a278 from bitcoin-core/gui-qml#38 and rebases it over changes on master; namely that we've dropped `GUIUtil::ObjectInvoke` in favor of `QMetaObject::invokeMethod`. This avoids non-thread-safe errors. I ran into a segfault here while running some data intensive monkey-code related to blocks, this change prevented it. I'm not going to actually use the code that caused the segfault, just to illustrate that this is useful here anyways. [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/177) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/177) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip?branch=pull/177) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/177) ACKs for top commit: hebasto: ACK a8a7291f744c0dc8c2bc9cf51766a4216b802fb9, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 9faf9b486af15f29ace20c9cb55ba65f3e20d23f4b7dc58908589f9a104b47cebe575a2a88935ed5f1a2fafc8bc41088084f28803990db64715e235da4c6461f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #37, this change moves
NodeModelinstantiation to QML. It is instanced only whenInitExecutoris ready.The QML engine is specialized in order to provide access to
interfaces::Nodeinstance and possible others.A nice follow-up is to improve how
InitExecutoris exposed in QML.