Skip to content

Conversation

@02JanDal
Copy link
Contributor

QRegExp was superseeded by QRegularExpression in Qt 5, and moved to the Qt 5 Compatibility module in Qt 6.

This PR replaces the last usages of QRegExp by QRegularExpression. There are some differences in pattern handling between the two, however nothing which affected the patterns in question AFAICT.

@github-actions github-actions bot added this to the 4.0.0 milestone Jan 12, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 12, 2026

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 48b3c4d)

🍎 MacOS Qt6 builds

Download MacOS Qt6 builds of this PR for testing.
This installer is not signed, control+click > open the app to avoid the warning
(Built from commit 48b3c4d)

@nyalldawson nyalldawson reopened this Jan 14, 2026
@uclaros
Copy link
Contributor

uclaros commented Jan 14, 2026

Can you also const thread_local these QRegularExpression instances?

@02JanDal 02JanDal force-pushed the refactor/remove-obsolete-qregexp branch from c8b02e0 to 48b3c4d Compare January 15, 2026 20:52
@02JanDal
Copy link
Contributor Author

@uclaros Done, though could you explain why? I could understand it if they where global static variables and thus could be accessed by multiple threads, but these are local?

@nyalldawson
Copy link
Collaborator

@02JanDal it's a performance boost -- constructing regex is not cheap, so this ensures they are only constructed a single time

@02JanDal
Copy link
Contributor Author

Ah, I see (haven't really used thread_local for performance optimization previously), thanks!

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.

4 participants