summaryrefslogtreecommitdiff
path: root/src/plugins/cppcheck/cppchecktool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cppcheck/cppchecktool.cpp')
-rw-r--r--src/plugins/cppcheck/cppchecktool.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/cppcheck/cppchecktool.cpp b/src/plugins/cppcheck/cppchecktool.cpp
index 492f1b2e25..2c17247d0a 100644
--- a/src/plugins/cppcheck/cppchecktool.cpp
+++ b/src/plugins/cppcheck/cppchecktool.cpp
@@ -67,7 +67,7 @@ void CppcheckTool::updateOptions(const CppcheckOptions &options)
if (trimmedPattern.isEmpty())
continue;
- const QRegExp re(trimmedPattern, Qt::CaseSensitive, QRegExp::Wildcard);
+ const QRegularExpression re(QRegularExpression::wildcardToRegularExpression(trimmedPattern));
if (re.isValid())
m_filters.push_back(re);
}
@@ -192,7 +192,9 @@ void CppcheckTool::check(const Utils::FilePaths &files)
std::copy_if(files.cbegin(), files.cend(), std::back_inserter(filtered),
[this](const Utils::FilePath &file) {
const QString stringed = file.toString();
- const auto filter = [stringed](const QRegExp &re) {return re.exactMatch(stringed);};
+ const auto filter = [stringed](const QRegularExpression &re) {
+ return re.match(stringed).hasMatch();
+ };
return !Utils::contains(m_filters, filter);
});
}