Commit 94bd3ea4 authored by Laurent Montel's avatar Laurent Montel 😁

Port to STL iterator

parent 74cc0d6c
......@@ -100,10 +100,9 @@ void MessagingWidgetLister::storeContact(KContacts::Addressee &contact) const
}
// iterate over this list and modify the contact according
QMapIterator<QString, QStringList> it(protocolMap);
while (it.hasNext()) {
it.next();
QMap<QString, QStringList>::const_iterator it = protocolMap.cbegin();
const QMap<QString, QStringList>::const_iterator itEnd = protocolMap.cend();
for (; it != itEnd; ++it) {
if (!it.value().isEmpty()) {
contact.insertCustom(it.key(), QStringLiteral("All"), it.value().join(QString(0xE000)));
} else {
......
......@@ -39,9 +39,9 @@ IMProtocols::IMProtocols()
sortingMap.insert((*it)->name(), propertyName);
}
QMapIterator<QString, QString> sortedIt(sortingMap);
while (sortedIt.hasNext()) {
sortedIt.next();
QMap<QString, QString>::const_iterator sortedIt = sortingMap.cbegin();
const QMap<QString, QString>::const_iterator sortedItEnd = sortingMap.cend();
for (;sortedIt != sortedItEnd; ++sortedIt) {
mSortedProtocols.append(sortedIt.value());
}
}
......
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