aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-14 21:54:54 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-14 21:54:54 (GMT)
commitb73971f0955d09ab9893b9d7eb78e70b5f13c80d (patch)
tree4c406bffb75c791da6b162c22c0072b45cb395c8
parentf5cb811b325819d751ec1707d08da45654ae7e2b (diff)
Fix some clazy warningv16.11.80
-rw-r--r--src/getmetadatajob.cpp7
-rw-r--r--src/idjob.cpp7
-rw-r--r--src/session.cpp2
-rw-r--r--src/session_p.h2
4 files changed, 12 insertions, 6 deletions
diff --git a/src/getmetadatajob.cpp b/src/getmetadatajob.cpp
index 40a0506..4f82659 100644
--- a/src/getmetadatajob.cpp
+++ b/src/getmetadatajob.cpp
@@ -262,8 +262,11 @@ QHash<QString, QMap<QByteArray, QByteArray> > GetMetaDataJob::allMetaDataForMail
{
Q_D(const GetMetaDataJob);
QHash<QString, QMap<QByteArray, QByteArray> > mailboxHash;
- Q_FOREACH (const QString &mailbox, d->metadata.keys()) {
- mailboxHash.insert(mailbox, allMetaDataForMailbox(mailbox));
+
+ QMapIterator<QString, QMap<QByteArray, QMap<QByteArray, QByteArray> > > i(d->metadata);
+ while (i.hasNext()) {
+ i.next();
+ mailboxHash.insert(i.key(), allMetaDataForMailbox(i.key()));
}
return mailboxHash;
}
diff --git a/src/idjob.cpp b/src/idjob.cpp
index cdcb1a5..a4ee55a 100644
--- a/src/idjob.cpp
+++ b/src/idjob.cpp
@@ -59,8 +59,11 @@ void IdJob::doStart()
Q_D(IdJob);
QByteArray command = "ID";
command += " (";
- foreach (const QByteArray &name, d->fields.keys()) {
- command += "\"" + name + "\" \"" + d->fields.value(name) + "\" ";
+
+ QMapIterator<QByteArray, QByteArray> i(d->fields);
+ while (i.hasNext()) {
+ i.next();
+ command += "\"" + i.key() + "\" \"" + i.value() + "\" ";
}
command.chop(1);
command += ")";
diff --git a/src/session.cpp b/src/session.cpp
index 1b115a4..d7f802b 100644
--- a/src/session.cpp
+++ b/src/session.cpp
@@ -435,7 +435,7 @@ void SessionPrivate::clearJobQueue()
emit q->jobQueueSizeChanged(0);
}
-void SessionPrivate::startSsl(const KTcpSocket::SslVersion &version)
+void SessionPrivate::startSsl(KTcpSocket::SslVersion version)
{
thread->startSsl(version);
}
diff --git a/src/session_p.h b/src/session_p.h
index 3482f00..f312af0 100644
--- a/src/session_p.h
+++ b/src/session_p.h
@@ -52,7 +52,7 @@ public:
void addJob(Job *job);
QByteArray sendCommand(const QByteArray &command, const QByteArray &args = QByteArray());
- void startSsl(const KTcpSocket::SslVersion &version);
+ void startSsl(KTcpSocket::SslVersion version);
void sendData(const QByteArray &data);
KTcpSocket::SslVersion negotiatedEncryption() const;