Commit 4a9c84a4 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Const'ify iterator

parent 5f66f567
Pipeline #73985 failed with stage
in 25 minutes and 27 seconds
......@@ -376,7 +376,7 @@ template<typename T, typename I> void getIncidence(T &i, const I &e)
std::vector<Kolab::CustomProperty> customProperties;
const QMap<QByteArray, QString> &props = e.customProperties();
for (QMap<QByteArray, QString>::const_iterator it = props.begin(), end(props.end()); it != end; ++it) {
for (QMap<QByteArray, QString>::const_iterator it = props.cbegin(), end(props.cend()); it != end; ++it) {
QString key(QString::fromUtf8(it.key()));
if (key == QLatin1String(CUSTOM_KOLAB_URL)) {
continue;
......
......@@ -884,8 +884,8 @@ void Incidence::setFields(const KCalendarCore::Incidence::Ptr &incidence)
// Unhandled tags and other custom properties (see libkcal/customproperties.h)
const QMap<QByteArray, QString> map = incidence->customProperties();
QMap<QByteArray, QString>::ConstIterator cit = map.begin();
QMap<QByteArray, QString>::ConstIterator cend = map.end();
QMap<QByteArray, QString>::ConstIterator cit = map.cbegin();
QMap<QByteArray, QString>::ConstIterator cend = map.cend();
for (; cit != cend; ++cit) {
Custom c;
c.key = cit.key();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment