mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
Support "[!a-x]" like construction while handling wildcards via QRegularExpression
This commit is contained in:
parent
b61863b8df
commit
ade20fc1bf
|
@ -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( '\\' );
|
||||
|
|
Loading…
Reference in a new issue