summaryrefslogtreecommitdiff
path: root/src/plugins/resourceeditor
diff options
context:
space:
mode:
authorhjk <hjk121@nokiamail.com>2014-05-17 22:30:21 +0200
committerhjk <hjk121@nokiamail.com>2014-05-18 13:17:02 +0200
commit25e2d6aed0efb146763ca57a1056cc714236ff45 (patch)
tree7a14bf57d07e3da675f7a371ef8195893af1b0e1 /src/plugins/resourceeditor
parentd4aa0f2a6491ecc48013bf846070e9c00af2b96c (diff)
downloadqt-creator-25e2d6aed0efb146763ca57a1056cc714236ff45.tar.gz
ResourceEditor: Make static code checker happy
Change-Id: Ic9a13a145c153a2fa2aeee61f4a97af274509a58 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/resourceeditor')
-rw-r--r--src/plugins/resourceeditor/resourcenode.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/resourceeditor/resourcenode.cpp b/src/plugins/resourceeditor/resourcenode.cpp
index 40ddf9759b..450538dac2 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);