mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 23:34:06 +00:00
Qt5: Fix some potential issues after using QRegularExpression instead of QRegExp
This commit is contained in:
parent
357638b033
commit
cbdd6bfe5a
1
gls.cc
1
gls.cc
|
@ -920,6 +920,7 @@ QString & GlsDictionary::filterResource( QString & article )
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||||
QRegularExpression audioRe( "<\\s*audio\\s+src\\s*=\\s*([\"']+)([^\"']+)([\"'])\\s*>(.*)</audio>",
|
QRegularExpression audioRe( "<\\s*audio\\s+src\\s*=\\s*([\"']+)([^\"']+)([\"'])\\s*>(.*)</audio>",
|
||||||
QRegularExpression::CaseInsensitiveOption
|
QRegularExpression::CaseInsensitiveOption
|
||||||
|
| QRegularExpression::DotMatchesEverythingOption
|
||||||
| QRegularExpression::InvertedGreedinessOption );
|
| QRegularExpression::InvertedGreedinessOption );
|
||||||
#else
|
#else
|
||||||
QRegExp audioRe( "<\\s*audio\\s+src\\s*=\\s*([\"']+)([^\"']+)([\"'])\\s*>(.*)</audio>", Qt::CaseInsensitive );
|
QRegExp audioRe( "<\\s*audio\\s+src\\s*=\\s*([\"']+)([^\"']+)([\"'])\\s*>(.*)</audio>", Qt::CaseInsensitive );
|
||||||
|
|
|
@ -564,6 +564,7 @@ string StardictDictionary::handleResource( char type, char const * resource, siz
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||||
QRegularExpression audioRe( "<\\s*audio\\s*src\\s*=\\s*([\"']+)([^\"']+)([\"'])\\s*>(.*)</audio>",
|
QRegularExpression audioRe( "<\\s*audio\\s*src\\s*=\\s*([\"']+)([^\"']+)([\"'])\\s*>(.*)</audio>",
|
||||||
QRegularExpression::CaseInsensitiveOption
|
QRegularExpression::CaseInsensitiveOption
|
||||||
|
| QRegularExpression::DotMatchesEverythingOption
|
||||||
| QRegularExpression::InvertedGreedinessOption );
|
| QRegularExpression::InvertedGreedinessOption );
|
||||||
#else
|
#else
|
||||||
QRegExp audioRe( "<\\s*audio\\s*src\\s*=\\s*([\"']+)([^\"']+)([\"'])\\s*>(.*)</audio>", Qt::CaseInsensitive );
|
QRegExp audioRe( "<\\s*audio\\s*src\\s*=\\s*([\"']+)([^\"']+)([\"'])\\s*>(.*)</audio>", Qt::CaseInsensitive );
|
||||||
|
|
Loading…
Reference in a new issue