Cppcheck: Replace assertion with a condition

There are several editor types without path.

Change-Id: Ieb7f3453ae83d6b64488a5f9381b5e7927ff1ece
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Orgad Shaneh
2018-09-25 08:47:20 +03:00
committed by Orgad Shaneh
parent 21fd164110
commit 3f4438e2eb

View File

@@ -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;