forked from qt-creator/qt-creator
Clang: Fix threading issue with QRegExp
exactMatch() is declared const, but is actually not. Replace with QRegularExpression. Change-Id: Ib9d9c091de1cd81d81671c19a76cada8777ff287 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -44,7 +44,7 @@
|
|||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
#include <QRegExp>
|
#include <QRegularExpression>
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
@@ -154,8 +154,9 @@ private:
|
|||||||
// We already provide a custom clang include path matching the used libclang version,
|
// We already provide a custom clang include path matching the used libclang version,
|
||||||
// so better ignore the clang include paths from the system as this might lead to an
|
// so better ignore the clang include paths from the system as this might lead to an
|
||||||
// unfavorable order with regard to include_next.
|
// unfavorable order with regard to include_next.
|
||||||
static QRegExp clangIncludeDir(QLatin1String(".*/lib/clang/\\d+\\.\\d+(\\.\\d+)?/include"));
|
static QRegularExpression clangIncludeDir(
|
||||||
if (clangIncludeDir.exactMatch(path))
|
QLatin1String("\\A.*/lib/clang/\\d+\\.\\d+(\\.\\d+)?/include\\z"));
|
||||||
|
if (clangIncludeDir.match(path).hasMatch())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user