forked from qt-creator/qt-creator
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:
committed by
Orgad Shaneh
parent
21fd164110
commit
3f4438e2eb
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user