qml: silence skeleton + todo Main.qml qmllint warnings
Some checks failed
CI / Quality (push) Successful in 5m3s
Release / Linux AppImage (push) Failing after 4m50s

Two warnings, two distinct kinds of fix:

1. `Item { width: 12 }` (skeleton:77) — explicit width on a
   layout-managed Item is undefined behaviour per qmllint. Replaced
   with `Item { Layout.preferredWidth: 12 }`, matching the pattern
   already used at line 85 (`Item { Layout.fillWidth: true }`). Real
   fix, not a suppression.

2. `target: SingleInstance` (skeleton:48, todo/Main.qml:220) — false
   positive. SingleInstance is intentionally a context property set
   by main() before the QML engine boots (see SingleInstance.h
   doc comment), so qmllint can't see it via static analysis.
   Disabled the `unqualified` warning at the call site with an inline
   `// qmllint disable unqualified` directive plus a one-line
   explanation comment above. (Note: the disable directive parses
   every word after `disable` as a category name, so the prose has
   to live on the previous line — found the hard way after qmllint
   complained about the "unknown category" of every English word in
   the explanation.)

Verified `make quality` from framework/skeleton green (qmllint clean
across both targets — `php_qml_bridge_qmllint` and `skeleton_qmllint`
both build with zero warnings).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-03 11:05:17 +02:00
parent e89a1c77c8
commit fcf7dc26cf
2 changed files with 5 additions and 3 deletions

View File

@@ -217,7 +217,8 @@ ApplicationWindow {
}
Connections {
target: SingleInstance
// SingleInstance is a context property set in main(); qmllint can't see it.
target: SingleInstance // qmllint disable unqualified
function onLaunchArgsReceived(args) {
window.requestActivate()
}

View File

@@ -45,7 +45,8 @@ ApplicationWindow {
}
Connections {
target: SingleInstance
// SingleInstance is a context property set in main(); qmllint can't see it.
target: SingleInstance // qmllint disable unqualified
function onLaunchArgsReceived(args) {
window.requestActivate()
log.append("· launch args from peer: " + args.join(" "))
@@ -74,7 +75,7 @@ ApplicationWindow {
}
Label { text: "Backend: " + window._stateName(BackendConnection.connectionState) }
Item { width: 12 }
Item { Layout.preferredWidth: 12 }
Rectangle {
Layout.preferredWidth: 12; Layout.preferredHeight: 12; radius: 6