Skip to content

[#890] Port ProfileLoaderExceptionsDialog to Qt - #896

Merged
eoyilmaz merged 2 commits into
developfrom
890-qt-profile-loader-exceptions-dialog-port
Jul 20, 2026
Merged

[#890] Port ProfileLoaderExceptionsDialog to Qt#896
eoyilmaz merged 2 commits into
developfrom
890-qt-profile-loader-exceptions-dialog-port

Conversation

@eoyilmaz

Copy link
Copy Markdown
Owner

Summary

  • Ports ProfileLoaderExceptionsDialog to Qt (DisplayCAL/ui/tools/profile_loader_exceptions.py): lets the user manage per-executable profile-loader exceptions (disable loading, or force a gamma-ramp reset, while a given executable is running).
  • Columns 0/1 (enabled, reset) use native Qt checkboxes instead of wx's custom CustomCellBoolRenderer icon-swap cells; a legend below the table reuses the real apply-profiles-reset icon (normal/disabled) so the disable-vs-reset distinction still reads the same as the wx dialog.
  • Adds QtProfileLoader.set_exceptions(), mirroring wx's TaskBarIcon.set_exceptions, and wires the apply-profiles tray's "Exceptions" menu item to it, replacing the disabled "Not yet available in the Qt build" placeholder.
  • Fixes a latent bug found while porting (present in the original wx dialog too): editing a row via Browse to point at a different executable left the old exception silently orphaned in the internal dict -- gone from the visible table, but still written out to profile_loader.exceptions config on OK.
  • Bumps version to 3.10.0.dev56.

Closes #890

Test plan

  • pytest tests/test_ui_profile_loader_exceptions.py -- 10 passed, covering population/sorting, checkbox toggling, selection-driven button state, delete (button + keyboard shortcut), known-app rejection, add-new, add-existing de-dup, and the browse-edit stale-entry fix
  • pytest tests/ -k "qt or ui_" -- 1025 passed, 2 skipped (no regressions)
  • ruff check on the added/modified source files -- clean
  • Manually launched the dialog on-screen (non-offscreen QApplication) with sample exception data and drove Add/Browse/Delete/checkbox toggling by hand before confirming Cancel closes without persisting

….0.dev56

Adds DisplayCAL/ui/tools/profile_loader_exceptions.py, a Qt port of
profile_loader.ProfileLoaderExceptionsDialog, and wires the apply-profiles
tray's "Exceptions" menu item to it via QtProfileLoader.set_exceptions()
(mirroring wx's TaskBarIcon.set_exceptions), replacing the disabled
placeholder action.

The Qt table uses native checkboxes for the enabled/reset columns instead of
wx's custom icon-swap grid renderer, with a legend below reusing the real
apply-profiles-reset icon (normal/disabled) to keep the disable-vs-reset
distinction readable.
The sample paths used forward-slash literals (e.g. "/apps/bar/bar.exe"),
which round-trip fine through posixpath but not through ntpath on Windows:
os.path.join() always inserts a backslash, so a path rebuilt from
dirname()/basename() picked up a mixed separator and stopped matching its
own dict key, and os.path.normpath() converts a leading "/" to "\", so
QFileDialog-mocked paths no longer matched their expected keys either.

Paths are now built with os.path.join() throughout, so they stay
self-consistent (and match what normpath()/dirname()/basename() produce)
on whichever platform the test runs on.
@eoyilmaz
eoyilmaz merged commit 7312604 into develop Jul 20, 2026
41 of 45 checks passed
@eoyilmaz
eoyilmaz deleted the 890-qt-profile-loader-exceptions-dialog-port branch July 20, 2026 16:05
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.

[Qt] Port ProfileLoaderExceptionsDialog and wire up the apply-profiles tray's "Exceptions" menu item

1 participant