QMimeGlobPattern: update use of wildcardToRegularExpresion

Following the update of qtbase because of QTBUG-72539, the code using
wildcardToRegularExpression must be updated as anchoredPattern is not
needed anymore.

Task-number: QTBUG-72539
Change-Id: I4989b42c737eb17d65c6b1d3cefab3ffd2163bfc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Samuel Gaist 2018-12-15 14:29:18 +01:00
parent bf4bf3a583
commit 2955afdf31

View File

@ -142,7 +142,7 @@ bool QMimeGlobPattern::matchFileName(const QString &inputFilename) const
return (m_pattern == filename);
// Other (quite rare) patterns, like "*.anim[1-9j]": use slow but correct method
QRegularExpression rx(QRegularExpression::anchoredPattern(QRegularExpression::wildcardToRegularExpression(m_pattern)));
QRegularExpression rx(QRegularExpression::wildcardToRegularExpression(m_pattern));
return rx.match(filename).hasMatch();
}