Repository navigation
fix(kde): plasmoid hidden on Plasma 6 — XHR file:// reads are blocked in Qt 6 - #15
Merged
Merged
Conversation
Qt 6 blocks XMLHttpRequest reads of file:// URLs unless
QML_XHR_ALLOW_FILE_READ=1 is set, which plasmashell does not set. The
XHR completed silently with empty responseText, so the plasmoid fell
back to { present: false }, set HiddenStatus, and hid itself even with
a controller connected; the lighting config tab failed the same way and
always showed "no controller connected".
Replace both XHR readers with a Plasma5Support.DataSource on the
executable engine polling `cat` of the state file — the same mechanism
writeConfig() already uses, so no new dependency. The engine's built-in
interval also replaces the manual Timer. A missing state file (daemon
stopped) exits non-zero with empty stdout, which maps to the existing
{ present: false } fallback.
Reported on Reddit r/Gamesir by a Plasma user after the KDE frontend
release.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
A Plasma user reported (on r/Gamesir) that the plasmoid hides itself even with a controller connected, and the Lighting config tab always shows "no controller connected".
Root cause:
readState()inmain.qmlandreadMode()inConfigLighting.qmlread the daemon state file withXMLHttpRequeston afile://URL. Qt 6 blocks XHR local-file reads unlessQML_XHR_ALLOW_FILE_READ=1is set, which plasmashell does not set. The XHR completes silently with emptyresponseText, the catch falls back to{ present: false }, andapplyStatus()setsHiddenStatus.Reproduced on Qt 6.9.2:
Fix
Replace both XHR readers with a
Plasma5Support.DataSource(executableengine) pollingcatof the state file — the same mechanismwriteConfig()already uses, so this adds no new dependency. The engine's built-inintervalreplaces the manualTimer. Noteplasma5supportis a Plasma 6 component (the ported DataEngine framework), despite the name.Testing
qml6repro confirms the XHR block on Qt 6.9.2 and that the env var is the only way to lift it.qmllintpasses on both files (only pre-existing warnings).qml6harness running the exactonNewDatahandler: file present → ActiveStatus with mode parsed; file missing → HiddenStatus; corrupt JSON → HiddenStatus.cat '<path>' 2>/dev/nullverified for both present and missing state file.🤖 Generated with Claude Code