Repository navigation
fix: load and colour correctly on Qt 6.12 - #9
Open
salmun-nister wants to merge 2 commits into
Open
salmun-nister wants to merge 2 commits into
salmun-nister wants to merge 2 commits into
Conversation
Qt 6.12 treats an existing qmldir as the definitive type namespace for the directory. With only the VesselService singleton declared, Radar.qml could no longer resolve OfflineMap, DetailMap, RadarLabels or ShipModel, so the whole widget failed to load: Widget.qml:453: Type Radar unavailable Radar.qml:194: RadarLabels is not a type List every component file, matching how qs.Commons declares its singletons and types.
Qt 6.12 registers a C++ Color type (QQuickColor) from QtQuick, which shadows the qs.Commons Color singleton for unqualified references. Every Color.accent, Color.muted and Color.foreground binding therefore resolved to undefined: Widget.qml:239: Unable to assign [undefined] to QColor Import qs.Commons as Commons and qualify the palette references, as the shell's own surfaces already do. Also point the theme-change Connections at Commons.Color so it keeps its accentChanged/backgroundChanged handlers.
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.
Fix the widget on Qt 6.12: declare components in
qmldirand qualify the paletteFixes #8
Problem
Since Qt 6.12 (Omarchy 4.5) the widget does not load, and once it does, its
colours are
undefined. Both are compatibility breaks introduced by 6.12; thesame tree was fine on 6.11.2.
Changes
1.
qmldirdeclares the widget's components (0b21337)Qt 6.12 treats an existing
qmldiras the type namespace for its directory, sofiles it does not list are no longer implicitly available. Only the
VesselServicesingleton was listed, which brokeRadar.qml(itsOfflineMap,DetailMap,RadarLabelsandShipModelchildren) and therefore the wholewidget:
Every component file is now listed, matching how
qs.Commons/qmldirdeclaresits types.
2. Palette references are qualified (
7a1507a)QtQuick in 6.12 registers a C++
Colortype (QQuickColor) which shadows theqs.CommonsColorsingleton for unqualified references in the same file, soColor.accent,Color.mutedandColor.foregroundall evaluated toundefined:All 110 references across the 13 QML files now read
Commons.Color.…, withimport qs.Commons as Commonsadded, which is what the shell's own surfacesalready do. The theme-change
Connectionselement targetsCommons.Coloraswell, so it keeps its
accentChanged/backgroundChangedhandlers.Verification
qmllint *.qml— cleanomarchy plugin validate .— exit 0./tests/run— unchanged; the change is QML-onlyomarchy-restart-shellproduces zero log lines for the plugin (previously ~1,800 failures), the bar
icon renders, and the panel opens, draws the radar and receives AIS traffic
Commons.Coloris the same singleton, andthe extra
qmldirentries only make types that already resolved implicitlyexplicit
Notes for review
fixes only.
qmllintandomarchy plugin validateboth pass against the unfixed tree, soneither would have caught this. A headless load of
Widget.qmlin CI would.