conversion/kolabconversion.cpp
Christian Mollekopf
mollekopf at kolabsys.com
Sat Oct 13 18:30:59 CEST 2012
conversion/kolabconversion.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 4626111050b103844d6e0d43b82e55200b15770d
Author: Christian Mollekopf <mollekopf at kolabsys.com>
Date: Sat Oct 13 18:28:34 2012 +0200
Use constBegin/constEnd and don't rely on custom() to return a reference.
Changes suggested by D. Faure.
diff --git a/conversion/kolabconversion.cpp b/conversion/kolabconversion.cpp
index 9c1fcfb..249f051 100644
--- a/conversion/kolabconversion.cpp
+++ b/conversion/kolabconversion.cpp
@@ -52,7 +52,8 @@ Note fromNote(const KMime::Message::Ptr &m)
}
std::vector<Kolab::CustomProperty> customs;
- for (QMap <QString, QString >::const_iterator it = note.custom().begin(); it != note.custom().end(); it ++) {
+ QMap<QString, QString> &customsMap = note.custom();
+ for (QMap <QString, QString >::const_iterator it = customsMap.constBegin(); it != customsMap.constEnd(); it ++) {
customs.push_back(Kolab::CustomProperty(toStdString(it.key()), toStdString(it.value())));
}
n.setCustomProperties(customs);
More information about the commits
mailing list