aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppcheck
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2018-09-25 08:47:20 +0300
committerOrgad Shaneh <orgads@gmail.com>2018-09-25 14:06:58 +0000
commit3f4438e2ebc796fd5b2eab7018f270b6477f7d77 (patch)
treed6f6673830a4ab9293619cd4916e16f3ba35406a /src/plugins/cppcheck
parent21fd1641104d91eb09ab1d6f65d9cd401e1a6d9e (diff)
Cppcheck: Replace assertion with a condition
There are several editor types without path. Change-Id: Ieb7f3453ae83d6b64488a5f9381b5e7927ff1ece Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'src/plugins/cppcheck')
-rw-r--r--src/plugins/cppcheck/cppchecktrigger.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/cppcheck/cppchecktrigger.cpp b/src/plugins/cppcheck/cppchecktrigger.cpp
index b9ce34448c8..af6423765c7 100644
--- a/src/plugins/cppcheck/cppchecktrigger.cpp
+++ b/src/plugins/cppcheck/cppchecktrigger.cpp
@@ -89,7 +89,8 @@ void CppcheckTrigger::checkEditors(const QList<Core::IEditor *> &editors)
const auto document = editor->document();
QTC_ASSERT(document, continue);
const auto &path = document->filePath();
- QTC_ASSERT(!path.isEmpty(), continue);
+ if (path.isEmpty())
+ continue;
if (m_checkedFiles.contains(path))
continue;