Files
DankMaterialShell/core/cmd
Bernardo Gomesandclaude[bot] 16c098d09b fix(doctor): validate QT_QPA_PLATFORMTHEME instead of trusting its presence (#3240)
* fix(doctor): validate QT_QPA_PLATFORMTHEME instead of trusting its presence

dms doctor reported any non-empty QT_QPA_PLATFORMTHEME as healthy, so a
wrong value passed with "All checks passed!" while every Qt app silently
ran without a platform theme: palettes stayed unstyled and QIcon lookups
returned nothing, which is how Quickshell ends up drawing its missing-
icon placeholder for every icon an SNI app such as blueman publishes in
tray menus. The real-world trap is qt6ct-kde — the AUR package name —
set as the theme value; the settings UI toast already documents that
only the qt6ct theme requires the qt6ct-kde package, but the doctor,
the tool meant to catch exactly this, blessed the broken value.

- checkQtPlatformThemePlugin validates both QT_QPA_PLATFORMTHEME and
  QT_QPA_PLATFORMTHEME_QT6 (the latter was not reported at all):
  qt6ct-kde gets a targeted warning naming the fix, and any other value
  has its plugin probed the way the qtengine check does — qmake/qtpaths
  are asked for QT_INSTALL_PLUGINS and the conventional file names are
  looked up, warning with the exact expected path on a miss
- a miss never warns when it cannot be sure: no Qt build tools and the
  version-dependent plasma-integration file name both degrade to info,
  mirroring the qtengine check's no-false-alarm policy
- the plugin-root interrogation moves into qtPluginRoots, shared with
  the qtengine check

On an affected system:

  before: ○ QT_QPA_PLATFORMTHEME · qt6ct-kde
          ✓ All checks passed!

  after:  ○ QT_QPA_PLATFORMTHEME · qt6ct-kde
          ● qt6ct-kde            Package name, not a theme

* fix(doctor): probe qtengine plugin with a bare file name

qtenginePluginFile("", major) returns a path with a directory
component, and qtPluginPath joins platformthemes/ again, so the
qtengine check stat'd
<root>/platformthemes/platformthemes/libqt6engine-plugin.so and warned
"Not found" on every correctly installed system. Pass the bare file
name instead, and pin the resolved path with a regression test that
fails on the double join.

Found in review by claude[bot].

* Update core/cmd/dms/commands_doctor.go

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2026-08-31 21:04:56 -04:00
..