PySide6 Handle QRegExp case sensitivity, FixedString, and Wildcard pattern syntaxes#1075
Open
jonahjnewton wants to merge 2 commits intoshotgunsoftware:masterfrom
Open
PySide6 Handle QRegExp case sensitivity, FixedString, and Wildcard pattern syntaxes#1075jonahjnewton wants to merge 2 commits intoshotgunsoftware:masterfrom
jonahjnewton wants to merge 2 commits intoshotgunsoftware:masterfrom
Conversation
…n QRegExp --> QRegularExpression patch
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1075 +/- ##
==========================================
- Coverage 79.79% 73.50% -6.30%
==========================================
Files 198 198
Lines 20776 20623 -153
==========================================
- Hits 16579 15159 -1420
- Misses 4197 5464 +1267 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ISSUE: The current tk_core releases do not properly handle case sensitivity in the way apps intend in PySide6. Eg. tk-multi-workfiles2 uses
QtCore.Qt.CaseInsensitiveto flag that a QRegExp should be case insensitivehttps://github.com/shotgunsoftware/tk-multi-workfiles2/blob/3e56df0ce651a814e19fc221a3eda09964a4311e/python/tk_multi_workfiles/entity_tree/entity_tree_form.py#L531
SOLUTION: Recognise
QtCore.Qt.CaseInsensitivein the QRegExp to QRegularExpression patcher. Also add pattern syntax handling ofFixedStringusingQRegularExpression.escape()to properly match plain strings andWildcardusingQRegularExpression.wildcardToRegularExpressionto properly expand wildcardsininit`.These changes were made as part of my work at Flying Bark Productions, which my leadership @diegogarciahuerta has generously allowed me to contribute here.