Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit ce1e61cd authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent b1da9c68
......@@ -393,7 +393,7 @@ 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(); it != props.end(); it++) {
for (QMap<QByteArray, QString>::const_iterator it = props.begin(), end(props.end()); it != end; ++it) {
QString key(it.key());
if (key == QLatin1String(CUSTOM_KOLAB_URL)) {
continue;
......
......@@ -447,7 +447,8 @@ bool Contact::loadPhoneAttribute( QDomElement& element )
void Contact::savePhoneAttributes( QDomElement& element ) const
{
QList<PhoneNumber>::ConstIterator it = mPhoneNumbers.constBegin();
for ( ; it != mPhoneNumbers.constEnd(); ++it ) {
const QList<PhoneNumber>::ConstIterator end = mPhoneNumbers.constEnd();
for ( ; it != end; ++it ) {
QDomElement e = element.ownerDocument().createElement( "phone" );
element.appendChild( e );
const PhoneNumber& p = *it;
......@@ -459,7 +460,8 @@ void Contact::savePhoneAttributes( QDomElement& element ) const
void Contact::saveEmailAttributes( QDomElement& element ) const
{
QList<Email>::ConstIterator it = mEmails.constBegin();
for ( ; it != mEmails.constEnd(); ++it )
QList<Email>::ConstIterator end = mEmails.constEnd();
for ( ; it != end; ++it )
saveEmailAttribute( element, *it );
}
......
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