replace QRegExp with QRegularExpression#4289
Conversation
ef03632 to
42d3933
Compare
| // devices that have an equivalent "deviceName" and ### section. | ||
| const QRegularExpression midiDeviceNameRegex("^(.*) MIDI (\\d+)( .*)?$"); | ||
|
|
||
| const QRegularExpression inputRegex("^(.*) in (\\d+)( .*)?$"); |
There was a problem hiding this comment.
Should work, is more efficient, and easier to read:
const QRegularExpression kInputRegex = QStringLiteral("^(.*) in (\\d+)( .*)?$");
Also the naming of constants doesn't comply with our coding style.
| const QRegExp kForbiddenChars = | ||
| QRegExp("[<>:\"\\/|?*\\\\]|(\\.\\.)" | ||
| const QRegularExpression kForbiddenChars = | ||
| QRegularExpression( |
There was a problem hiding this comment.
Simple use QStringLiteral(...) instead of QRegularExpression(...).
42d3933 to
9fc8b6b
Compare
|
I don't know what's going on with GitHub... I didn't merge nor close this PR?? |
|
I'm puzzled by these test failures: |
|
This is really strange, zero changes?! |
|
It looks like my most recent changes were lost?? I cherry-picked a commit from my reflog... |
be01f3b to
b869e36
Compare
|
I think what happened before was that I accidentally amended by commit in this branch to the latest commit in the main branch which confused GitHub. |
|
Any ideas why SearchQueryParserTest.NumericFilterOperators and SearchQueryParserTest.HumanReadableDurationSearchWithOperators are failing? These features seem to work fine using them from the GUI. |
b869e36 to
bc74458
Compare
I am also clueless 🤷 Didn't find any cause for this failure. Probably some undiscovered undefined behavior somewhere in the query parser? |
Fixed: Be-ing#58 |
f565770 to
1288e3e
Compare
1288e3e to
1503762
Compare
1503762 to
03108b4
Compare
QRegEx was removed in Qt6.
03108b4 to
2d4f7d0
Compare
|
Thank you! LGTM |
|
On Gentoo with 5.15.2 git from kde: |
|
That cannot be reproduced on CI or developers' machines so my guess is the problem is Gentoo's packaging somehow. Anyway, if you want to add some |
Should fix a build error:
/var/tmp/portage/media-sound/mixxx-9999/work/mixxx-9999/src/skin/legacy/legacyskin.cpp:8:40: error: variable ‘const QRegularExpression {anonymous}::kMinSizeRegExp’ has initializer but incomplete type
8 | const QRegularExpression kMinSizeRegExp(QStringLiteral("<MinimumSize>(\\d+), *(\\d+)<"));
| ^
/var/tmp/portage/media-sound/mixxx-9999/work/mixxx-9999/src/skin/legacy/legacyskin.cpp:9:37: error: variable ‘const QRegularExpression {anonymous}::kDigitRegex’ has initializer but incomplete type
9 | const QRegularExpression kDigitRegex(QStringLiteral("\\d"));
| ^
/var/tmp/portage/media-sound/mixxx-9999/work/mixxx-9999/src/skin/legacy/legacyskin.cpp: In member function ‘virtual bool mixxx::skin::legacy::LegacySkin::fitsScreenSize(const QScreen&) const’:
/var/tmp/portage/media-sound/mixxx-9999/work/mixxx-9999/src/skin/legacy/legacyskin.cpp:93:33: error: aggregate ‘QRegularExpressionMatch match’ has incomplete type and cannot be defined
93 | QRegularExpressionMatch match;
| ^~~~~
Reported here: mixxxdj#4289 (comment)
QRegExp has been removed in Qt6.