Support "[!a-x]" like construction while handling wildcards via QRegularExpression

This commit is contained in:
Abs62 2019-03-25 18:10:10 +03:00
parent b61863b8df
commit ade20fc1bf

View file

@ -70,6 +70,11 @@ QString wildcardsToRegexp( const QString & wc_str )
} else {
QString tmp;
tmp += c;
if( i < wclen && wc[ i ] == QLatin1Char( '!' ) )
{
tmp += QLatin1Char( '^' );
++i;
}
while( i < wclen && wc[ i ] != QLatin1Char( ']' ) ) {
if( wc[ i ] == QLatin1Char( '\\' ) )
tmp += QLatin1Char( '\\' );