diff options
author | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-08-14 16:56:18 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-08-17 08:19:59 +0000 |
commit | 2bc96c76211138c544e81d448e357923cb914f43 (patch) | |
tree | 797a4aa6f60089719a3511ad676a88dd6c35b67b | |
parent | b5dcc8650401a6c706c511609ec11b5d2d3f8863 (diff) |
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>
-rw-r--r-- | src/plugins/clangcodemodel/clangutils.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/clangcodemodel/clangutils.cpp b/src/plugins/clangcodemodel/clangutils.cpp index b249a695b0f..9ceb6a208da 100644 --- a/src/plugins/clangcodemodel/clangutils.cpp +++ b/src/plugins/clangcodemodel/clangutils.cpp @@ -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; |