Commit 88107e4f authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

fix compile with Qt 5.11

Differential Revision: https://phabricator.kde.org/D23385
parent 62b02fe6
......@@ -4661,9 +4661,13 @@ void KTextEditor::DocumentPrivate::readVariableLine(QString t, bool onlyViewAndR
bool found = false;
foreach (const QString &pattern, wildcards) {
QRegularExpression wildcard(QLatin1Char('^') + QRegularExpression::wildcardToRegularExpression(pattern) + QLatin1Char('$'));
QRegExp wildcard(pattern, Qt::CaseSensitive, QRegExp::Wildcard);
found = wildcard.exactMatch(nameOfFile);
// Qt 5.12, no ifdef, more to test
//QRegularExpression wildcard(QLatin1Char('^') + QRegularExpression::wildcardToRegularExpression(pattern) + QLatin1Char('$'));
//found = wildcard.match(nameOfFile).hasMatch();
found = wildcard.match(nameOfFile).hasMatch();
if (found) {
break;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment