From 25e2d6aed0efb146763ca57a1056cc714236ff45 Mon Sep 17 00:00:00 2001 From: hjk Date: Sat, 17 May 2014 22:30:21 +0200 Subject: [PATCH] ResourceEditor: Make static code checker happy Change-Id: Ic9a13a145c153a2fa2aeee61f4a97af274509a58 Reviewed-by: Orgad Shaneh --- src/plugins/resourceeditor/resourcenode.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/resourceeditor/resourcenode.cpp b/src/plugins/resourceeditor/resourcenode.cpp index 40ddf9759b5..450538dac2f 100644 --- a/src/plugins/resourceeditor/resourcenode.cpp +++ b/src/plugins/resourceeditor/resourcenode.cpp @@ -75,10 +75,12 @@ static bool addFilesToResource(const QString &resourceFile, const QStringList &f if (notAdded) notAdded->clear(); foreach (const QString &path, filePaths) { - if (file.contains(index, path)) - *notAdded << path; - else + if (file.contains(index, path)) { + if (notAdded) + *notAdded << path; + } else { file.addFile(index, path); + } } Core::DocumentManager::expectFileChange(resourceFile);