Review report

bitcoin-core/gui-qml: PR #1060

1 minor finding · 2 suggestions

Findings

Link

[minor] · Command-line signer paths disable manual checks

With -signer, edit-permission guards disable status checks in settings and HWI setup, preventing an in-page retry after connecting a device or repairing the executable's environment.

Location: qml/pages/settings/ExternalSignerSettingsPage.qml:44 (head).

Details and suggested fix

When -signer supplies the executable, canEdit is false. Both check buttons require editable, and the disabled path row also prevents Return from checking. Since this PR removes the settings-page construction refresh, connecting or unlocking a device leaves the earlier status with no check available there. A non-responding command also routes Add wallet to setup, where repairing its environment still cannot enable Check HWI. Going Back and selecting External signer again provides a workaround. Separate permission to check from permission to edit: keep the field and Browse locked, but allow checks of the effective command-line path. Add a QML regression case with a locked path whose check result changes after the page opens.


Optional improvements

Link

[suggestion] · Sync-time translations cannot select additional plural forms

The newly translated sync-time labels choose singular or plural in JavaScript, preventing correct count-dependent translations in languages with more than two plural forms.

Location: qml/controls/utils.js:47 (head).

Details and suggested fix

formatRemainingSyncTime() selects separate singular and plural messages for weeks, days and seconds, then substitutes %1 after translation. Hours and minutes also use fixed-form messages. Translators therefore cannot distinguish counts such as 2–4 and 5+, even though those require different forms in some languages. Use Qt numerus calls such as qsTr("~%n week(s) left", "", weeks) for the full unit names. Keep the existing duration thresholds and abbreviated mixed-unit branches unchanged.


Link

[suggestion] · LinkText scans the full text area to locate one link

Each measurement performs about 7,600 linkAt() calls for a 760×40 sentence, and resizing schedules measurements for both setup links; actual frame cost is unmeasured.

Location: qml/controls/LinkText.qml:58 (head).

Details and suggested fix

measureLinkArea() hit-tests a 2 px grid across the entire item, including plain sentence text. Width, height and text changes schedule this work through Qt.callLater. Although notifications can coalesce, successive resize updates can repeat the full scan on the GUI thread. Use line-layout geometry, such as lineLaidOut, to restrict hit tests to representative rows of each laid-out line rather than sampling the whole area. Preserve the per-line link rectangles and final icon extension covered by the existing single-line and wrapped-link tests.


Coverage details