Skip to content

doctor: fix the qtengine and xdg menu prefix checks - #3757

Merged
bbedward merged 1 commit into
duxlabs-dev:masterfrom
Conava:doctor-qtengine
Oct 11, 2026
Merged

bbedward merged 1 commit into
duxlabs-dev:masterfrom
Conava:doctor-qtengine

Conversation

@Conava

@Conava Conava commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Description

This PR cleans up the dms doctor output for qtengine and fixes a false menu file warning. I added qtengine support in #3019 and messed up its doctor output a bit: it had its own plugin check, so its rows showed up at the end of the Environment section and didn't look like the qt6ct or kde ones.

Changes:

  • qtengine now goes through the same plugin check as the other platform themes, so its rows sit right under QT_QPA_PLATFORMTHEME. The Qt5 plugin is only checked when QT_QPA_PLATFORMTHEME names qtengine, since Qt5 never reads the _QT6 variable.
  • New row for ~/.config/qtengine/config.json, which says whether it points at the DMS color scheme. It warns when the file can't be parsed, because DMS won't overwrite it then and Qt apps stop following the DMS colors.
  • In verbose mode, an unset QT_QPA_PLATFORMTHEME_QT6 now says that Qt6 uses QT_QPA_PLATFORMTHEME instead of just "Not set". This applies to every theme.

Bug I found on the way: the XDG_MENU_PREFIX check only looked in /etc/xdg/menus, so it warned about a missing menu file I had put in ~/.config/menus. That's where the menu spec looks first, and Dolphin finds it there. It now searches the user config dir and every XDG_CONFIG_DIRS entry. I needed that file because uwsm sets XDG_MENU_PREFIX=hyprland-, and no package ships a menu for that prefix.

Validation

  • Tested by hand on Hyprland with qtengine.
  • New tests for the qtengine plugin rows, the config row and the menu file lookup.
  • make fmt, go test ./..., the FreeBSD build and all prek hooks pass.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Screenshots / video

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dlx-docs to document any new behaviors: docs(dms): document the qtengine doctor checks and the uwsm menu prefix dux-docs#166

qtengine had its own plugin check, which printed its rows at the end of
the Environment section instead of under QT_QPA_PLATFORMTHEME, with
different names and messages than qt6ct or kde.

Fold it into the shared platform theme check: the Qt6 plugin is always
checked, the Qt5 plugin too when QT_QPA_PLATFORMTHEME names qtengine and
a Qt5 build tool can be asked. Also add a row for
~/.config/qtengine/config.json, which is what makes Qt apps follow the
DMS colors, and say in verbose mode that an unset
QT_QPA_PLATFORMTHEME_QT6 falls back to QT_QPA_PLATFORMTHEME.

The XDG_MENU_PREFIX check only looked in /etc/xdg/menus, so a menu file
in ~/.config/menus, which the menu spec searches first, was reported as
missing. Search the user config dir and every XDG_CONFIG_DIRS entry.
@hthienloc

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Claude review

No issues found.
Checked: qtengine routing through checkQtPlatformThemePlugin (Qt5/Qt6 major selection, root lookup, plugin file names), QT_QPA_PLATFORMTHEME_QT6 reporting branches, checkQtengineConfig parse behaviour against SyncQtengineConfigAt (empty/null/non-object theme), QtengineColorSchemePath extraction, XDG menu lookup across XDG_CONFIG_HOME and XDG_CONFIG_DIRS, and the new tests. Model: claude-opus-5-5.

@bbedward
bbedward merged commit 6640a94 into duxlabs-dev:master Oct 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants