mrkite / minutor

Mapping for Minecraft
http://seancode.com/minutor
BSD 2-Clause "Simplified" License
278 stars 52 forks source link

QRegExp -> QRegularExpression in most places #367

Closed Kolcha closed 1 year ago

Kolcha commented 1 year ago

QRegExp is deprecated since initial Qt 5 release

the only place that still uses QRegExp is search

EtlamGit commented 1 year ago

As I understand it, QRegularExpression was recommended instead of QRegExp since Qt5. But not deprecated. It is deprecated with Qt6 now.

I still struggle a bit with dropping Qt5.9 support completely. Is there a way to not use QRegularExpression::wildcardToRegularExpression ?

Kolcha commented 1 year ago

with Qt6 QRegExp is completely removed, not even deprecated. it is included only to Qt5Compat library

Is there a way to not use QRegularExpression::wildcardToRegularExpression ?

good question... I see only the option to implement something "handcrafted", but this is maybe only simple if we need to handle simple cases (aka map "*" in pattern to ".*" in regex, and "?" to ".", which is maybe even irrelevant). if some "supported wildcard specification" is here, I can look into this. for now I just replicated the same behavior I was able to "touch" and considered reasonable.

another simple option to implement is just to drop any "glob pattern" support and make "inexact" search just a text search

Kolcha commented 1 year ago

dropped changes in search, left just a "safe" changes