SG-41003 Fix case insensitive search in PySide6#166
SG-41003 Fix case insensitive search in PySide6#166carlos-villavicencio-adsk wants to merge 6 commits intomasterfrom
Conversation
Codecov Report❌ Patch coverage is 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
julien-lang
left a comment
There was a problem hiding this comment.
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"): |
There was a problem hiding this comment.
I wonder which way is better between this and assissing the Qt version?!
>>> QtCore.__version__
'6.5.8'
>>> QtCore.__version__
'5.15.3'
There was a problem hiding this comment.
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.
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.