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:
Nikolai Kosjar
2015-08-14 16:56:18 +02:00
parent b5dcc86504
commit 2bc96c7621

View File

@@ -44,7 +44,7 @@
#include <QDir>
#include <QFile>
#include <QLoggingCategory>
#include <QRegExp>
#include <QRegularExpression>
#include <QSet>
#include <QString>
@@ -154,8 +154,9 @@ private:
// 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
// unfavorable order with regard to include_next.
static QRegExp clangIncludeDir(QLatin1String(".*/lib/clang/\\d+\\.\\d+(\\.\\d+)?/include"));
if (clangIncludeDir.exactMatch(path))
static QRegularExpression clangIncludeDir(
QLatin1String("\\A.*/lib/clang/\\d+\\.\\d+(\\.\\d+)?/include\\z"));
if (clangIncludeDir.match(path).hasMatch())
return true;
return false;