Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt5+: Switch from QRegExp to QRegularExpression #301

Merged
merged 1 commit into from
Oct 21, 2022

Conversation

fbriere
Copy link
Collaborator

@fbriere fbriere commented Sep 1, 2022

QRegularExpression was introduced in Qt 5.0 as a successor to
QRegExp, and while it is still supported under Qt 6 (via
Core5Compat), the corresponding QRegExpValidator is not. Hence,
migrating will be required before being able to port to Qt 6 (#297).

While QRegularExpression is not always a drop-in replacement for
QRegExp (see the documentation¹ for details), in our case, it is. Our
use doesn't run into any of the situations listed in the documentation,
while our only instance of exactMatch() uses a pattern that is already
anchored.

¹ https://doc.qt.io/qt-5/qregularexpression.html#notes-for-qregexp-users

`QRegularExpression` was introduced in Qt 5.0 as a successor to
`QRegExp`, and while it is still supported under Qt 6 (via
`Core5Compat`), the corresponding `QRegExpValidator` is not.  Hence,
migrating will be required before being able to port to Qt 6 (LubosD#297).

While `QRegularExpression` is not always a drop-in replacement for
`QRegExp` (see the documentation¹ for details), in our case, it is.  Our
use doesn't run into any of the situations listed in the documentation,
while our only instance of `exactMatch()` uses a pattern that is already
anchored.

 ¹ https://doc.qt.io/qt-5/qregularexpression.html#notes-for-qregexp-users
@LubosD LubosD merged commit c8ae1b7 into LubosD:master Oct 21, 2022
@fbriere fbriere deleted the misc/qt-regexp branch October 21, 2022 13:39
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