Review report

bitcoin-core/gui-qml: PR #983

2 suggestions

Optional improvements

Link

[suggestion] · The production-engine regression check misses both startup paths

The integration fixture checks the main engine, but the onboarding and startup-error call sites remain outside its network-policy regression coverage.

Location: test/integration/fixture/test_application.cpp:116 (head).

Details and suggested fix

The integration runner always passes -qml_onboarded=1, so normal startup returns before creating the pre-init engine. The fixture also treats an onboarding window as a failure, and no integration case deliberately triggers the startup-error dialog. The unit tests exercise the helpers directly, while the production qmlEngineCreated hook is empty. Consequently, bypassing the blocking factory at either startup call site is not covered by these network assertions, despite the commit message's broader claim. All three production paths use the helpers correctly today. Add startup cases that exercise onboarding and an initialization error through their production call sites and verify the resulting engines' network policy.


Link

[suggestion] · The network-blocking tests omit images embedded in Text markup

The shared helper tests Image and XMLHttpRequest, but not the Text markup image-loading path used by the application's text consumers.

Location: test/test_qmlengine.cpp:55 (head).

Details and suggested fix

VerifyNetworkBlocked waits only for an Image error and an XMLHttpRequest completion. Payment-request labels are displayed through ValueRow and CoreText, which leaves textFormat at AutoText, and AddressLabel explicitly selects RichText. Add a Text case containing an HTTP <img> URL served by the existing local TCP listener, covering AutoText/StyledText and RichText for each helper-created engine. Ensure the text is laid out and the image request is attempted before asserting that no connection arrives. This would protect the markup-loading path against Qt-version differences or future loader changes; the current test gap does not establish a bypass.


Coverage details