Skip to content

SG-41003 Fix case insensitive search in PySide6#166

Open
carlos-villavicencio-adsk wants to merge 6 commits intomasterfrom
ticket/SG-41003_case_insensitive_search
Open

SG-41003 Fix case insensitive search in PySide6#166
carlos-villavicencio-adsk wants to merge 6 commits intomasterfrom
ticket/SG-41003_case_insensitive_search

Conversation

@carlos-villavicencio-adsk
Copy link
Contributor

This pull request refactors how case-insensitive regular expressions are created and used for search filtering in both the entity tree and file list forms. The main goal is to ensure compatibility across PySide2 and PySide6 by centralizing the logic for creating the appropriate regex object. This reduces code duplication and addresses issues with case sensitivity handling in different Qt bindings.

@codecov
Copy link

codecov bot commented Feb 2, 2026

Codecov Report

❌ Patch coverage is 69.23077% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 31.86%. Comparing base (a6af1b2) to head (23bf6ca).

Files with missing lines Patch % Lines
...tk_multi_workfiles/entity_tree/entity_tree_form.py 0.00% 1 Missing ⚠️
...hon/tk_multi_workfiles/file_list/file_list_form.py 66.66% 1 Missing ⚠️
python/tk_multi_workfiles/file_model.py 66.66% 1 Missing ⚠️
python/tk_multi_workfiles/util.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #166      +/-   ##
==========================================
+ Coverage   31.82%   31.86%   +0.04%     
==========================================
  Files          68       68              
  Lines        7652     7658       +6     
==========================================
+ Hits         2435     2440       +5     
- Misses       5217     5218       +1     
Flag Coverage Δ
Linux 31.86% <69.23%> (+0.04%) ⬆️
Python-3.10 31.86% <69.23%> (+0.04%) ⬆️
Python-3.11 31.86% <69.23%> (+0.04%) ⬆️
Python-3.9 31.86% <69.23%> (+0.04%) ⬆️
Windows 18.69% <69.23%> (+0.05%) ⬆️
macOS 31.86% <69.23%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@carlos-villavicencio-adsk carlos-villavicencio-adsk requested a review from a team February 2, 2026 19:22
Copy link
Member

@julien-lang julien-lang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just one comment.

Also, are there any other repositories impacted by the same code?

:returns: A QRegExp or QRegularExpression configured for case-insensitive matching
"""
# Check if QRegularExpression is available (PySide6)
if hasattr(QtCore, "QRegularExpression"):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder which way is better between this and assissing the Qt version?!

>>> QtCore.__version__
'6.5.8'

>>> QtCore.__version__
'5.15.3'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, I think the proposed way is more stable than assuming the Qt version fixed to 5 or 6. Even when we have higher versions, we can still rely on this condition until it gets cleaned by maintenance.

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.

2 participants