aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-10-15 07:19:01 +0200
committerMontel Laurent <[email protected]>2017-10-15 07:19:01 +0200
commit1c9e4917a065ca52a70cb5d253e5d4da51e9e6b8 (patch)
treeecaad1116a925d74c8fd25dcce04465aa66216d3
parent8f545694af7fc2852e4fe227c4e6b1529eac6665 (diff)
Fix clazy warning
-rw-r--r--src/kmime_content.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/kmime_content.cpp b/src/kmime_content.cpp
index 043f6cf..9f8049f 100644
--- a/src/kmime_content.cpp
+++ b/src/kmime_content.cpp
@@ -456,7 +456,9 @@ QVector<Content*> Content::attachments()
auto ct = contentType(false);
if (ct && ct->isMultipart() && !ct->isSubtype("related") && !ct->isSubtype("alternative")) {
- Q_FOREACH (Content *child, contents()) {
+ const QVector<Content*> contentsList = contents();
+ result.reserve(contentsList.count());
+ Q_FOREACH (Content *child, contentsList) {
if (isAttachment(child))
result.push_back(child);
else