Skip to content

Commit

Permalink
chore: adapt Qt6 QRegularExpression option
Browse files Browse the repository at this point in the history
* Remove Qt version check for QRegularExpression options
* Use QRegularExpression::CaseInsensitiveOption consistently
* Remove Qt5 specific Qt::CaseInsensitive option

Log: adapt Qt6 QRegularExpression option
  • Loading branch information
wyu71 authored and deepin-bot[bot] committed Jan 9, 2025
1 parent f88dc5e commit 9232c6c
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -752,13 +752,8 @@ MetaCond::MetaCond(const QString &text, QList<SemanticWorkerPrivate::QueryFuncti
m_isTrue = false;
}

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
static QRegularExpression reg("META_TYPEIS\"(.+)\"ANDMETA_VALUEIS\"(.+)\"", QRegularExpression::CaseInsensitiveOption);
static QRegularExpression reg1("META_TYPEIS\"(.+)\"ANDMETA_VALUEIS NOT\"(.+)\"", QRegularExpression::CaseInsensitiveOption);
#else
static QRegularExpression reg("META_TYPEIS\"(.+)\"ANDMETA_VALUEIS\"(.+)\"", Qt::CaseInsensitive);
static QRegularExpression reg1("META_TYPEIS\"(.+)\"ANDMETA_VALUEIS NOT\"(.+)\"", Qt::CaseInsensitive);
#endif
if (m_isTrue) {
QRegularExpressionMatch match = reg.match(m_cond);
if (match.hasMatch()) {
Expand Down

0 comments on commit 9232c6c

Please sign in to comment.