Qt5: Fix some potential issues after using QRegularExpression instead of QRegExp

This commit is contained in:
Abs62 2018-03-12 00:06:09 +03:00
parent 357638b033
commit cbdd6bfe5a
2 changed files with 2 additions and 0 deletions

1
gls.cc
View file

@ -920,6 +920,7 @@ QString & GlsDictionary::filterResource( QString & article )
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
QRegularExpression audioRe( "<\\s*audio\\s+src\\s*=\\s*([\"']+)([^\"']+)([\"'])\\s*>(.*)</audio>",
QRegularExpression::CaseInsensitiveOption
| QRegularExpression::DotMatchesEverythingOption
| QRegularExpression::InvertedGreedinessOption );
#else
QRegExp audioRe( "<\\s*audio\\s+src\\s*=\\s*([\"']+)([^\"']+)([\"'])\\s*>(.*)</audio>", Qt::CaseInsensitive );

View file

@ -564,6 +564,7 @@ string StardictDictionary::handleResource( char type, char const * resource, siz
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
QRegularExpression audioRe( "<\\s*audio\\s*src\\s*=\\s*([\"']+)([^\"']+)([\"'])\\s*>(.*)</audio>",
QRegularExpression::CaseInsensitiveOption
| QRegularExpression::DotMatchesEverythingOption
| QRegularExpression::InvertedGreedinessOption );
#else
QRegExp audioRe( "<\\s*audio\\s*src\\s*=\\s*([\"']+)([^\"']+)([\"'])\\s*>(.*)</audio>", Qt::CaseInsensitive );