summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-14 21:56:22 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-14 21:56:22 (GMT)
commit26a3a299e93a1a1a4fe7f39be74a87ddb154efe4 (patch)
tree8e748b39348613f380546c738fd021be5f6aa7d8
parent8a47f3d7cf44466e38fe9d01964a356f338bf6ff (diff)
Fix some clazy warning
-rw-r--r--agents/migration/migrationscheduler.h1
-rw-r--r--agents/newmailnotifier/newmailnotifierselectcollectionwidget.h1
-rw-r--r--resources/dav/resource/davgroupwareresource.cpp2
-rw-r--r--resources/imap/addcollectiontask.cpp12
-rw-r--r--resources/imap/autotests/dummyresourcestate.cpp4
-rw-r--r--resources/imap/autotests/dummyresourcestate.h4
-rw-r--r--resources/imap/batchfetcher.h2
-rw-r--r--resources/imap/resourcestate.cpp2
-rw-r--r--resources/imap/resourcestate.h2
-rw-r--r--resources/imap/resourcestateinterface.h2
-rw-r--r--resources/imap/resourcetask.cpp2
-rw-r--r--resources/imap/resourcetask.h2
-rw-r--r--resources/imap/sessionpool.h2
-rw-r--r--resources/kolab/tagchangehelper.cpp2
-rw-r--r--resources/kolab/updatemessagejob.cpp24
-rw-r--r--resources/kolab/updatemessagejob.h26
-rw-r--r--resources/mixedmaildir/compactchangehelper.cpp4
-rw-r--r--resources/mixedmaildir/mixedmaildirresource.cpp6
-rw-r--r--resources/openxchange/oxa/connectiontestjob.cpp2
-rw-r--r--resources/openxchange/oxa/incidenceutils.cpp10
-rw-r--r--resources/shared/singlefileresource/collectionannotationsattribute.cpp8
-rw-r--r--resources/shared/singlefileresource/imapaclattribute.cpp17
-rw-r--r--resources/tomboynotes/o2/o1.cpp2
-rw-r--r--resources/tomboynotes/o2/o1.h2
-rw-r--r--resources/tomboynotes/o2/o2.cpp2
-rw-r--r--resources/tomboynotes/o2/o2.h2
-rw-r--r--resources/tomboynotes/tomboyitemsdownloadjob.cpp2
-rw-r--r--resources/tomboynotes/tomboyitemsdownloadjob.h2
28 files changed, 79 insertions, 70 deletions
diff --git a/agents/migration/migrationscheduler.h b/agents/migration/migrationscheduler.h
index 8823b8a..4de5a13 100644
--- a/agents/migration/migrationscheduler.h
+++ b/agents/migration/migrationscheduler.h
@@ -63,6 +63,7 @@ private Q_SLOTS:
*/
class MigratorModel: public QAbstractItemModel
{
+ Q_OBJECT
public:
enum Roles {
IdentifierRole = Qt::UserRole + 1,
diff --git a/agents/newmailnotifier/newmailnotifierselectcollectionwidget.h b/agents/newmailnotifier/newmailnotifierselectcollectionwidget.h
index 170368b..6781666 100644
--- a/agents/newmailnotifier/newmailnotifierselectcollectionwidget.h
+++ b/agents/newmailnotifier/newmailnotifierselectcollectionwidget.h
@@ -36,6 +36,7 @@ class KJob;
class NewMailNotifierCollectionProxyModel : public QIdentityProxyModel
{
+ Q_OBJECT
public:
explicit NewMailNotifierCollectionProxyModel(QObject *parent = Q_NULLPTR);
diff --git a/resources/dav/resource/davgroupwareresource.cpp b/resources/dav/resource/davgroupwareresource.cpp
index f427d86..eb9ca26 100644
--- a/resources/dav/resource/davgroupwareresource.cpp
+++ b/resources/dav/resource/davgroupwareresource.cpp
@@ -784,7 +784,7 @@ void DavGroupwareResource::onRetrieveItemsFinished(KJob *job)
Akonadi::Item::List changedItems;
QSet<QString> seenRids;
QStringList changedRids;
-
+ changedItems.reserve(listJob->changedItems().count());
foreach (const DavItem &davItem, listJob->changedItems()) {
seenRids.insert(davItem.url());
diff --git a/resources/imap/addcollectiontask.cpp b/resources/imap/addcollectiontask.cpp
index ef11970..9f17212 100644
--- a/resources/imap/addcollectiontask.cpp
+++ b/resources/imap/addcollectiontask.cpp
@@ -115,9 +115,9 @@ void AddCollectionTask::onSubscribeDone(KJob *job)
return;
}
- const QMap<QByteArray, QByteArray> annotations = attribute->annotations();
-
- foreach (const QByteArray & entry, annotations.keys()) { //krazy:exclude=foreach
+ QMapIterator<QByteArray, QByteArray> i(attribute->annotations());
+ while (i.hasNext()) {
+ i.next();
KIMAP::SetMetaDataJob *job = new KIMAP::SetMetaDataJob(m_session);
if (serverCapabilities().contains(QStringLiteral("METADATA"))) {
job->setServerCapability(KIMAP::MetaDataJobBase::Metadata);
@@ -126,11 +126,11 @@ void AddCollectionTask::onSubscribeDone(KJob *job)
}
job->setMailBox(mailBoxForCollection(m_collection));
- if (!entry.startsWith("/shared") && !entry.startsWith("/private")) {
+ if (!i.key().startsWith("/shared") && !i.key().startsWith("/private")) {
//Support for legacy annotations that don't include the prefix
- job->addMetaData(QByteArray("/shared") + entry, annotations[entry]);
+ job->addMetaData(QByteArray("/shared") + i.key(), i.value());
} else {
- job->addMetaData(entry, annotations[entry]);
+ job->addMetaData(i.key(), i.value());
}
connect(job, &KIMAP::SetMetaDataJob::result, this, &AddCollectionTask::onSetMetaDataDone);
diff --git a/resources/imap/autotests/dummyresourcestate.cpp b/resources/imap/autotests/dummyresourcestate.cpp
index e04b51f..6ddb7fc 100644
--- a/resources/imap/autotests/dummyresourcestate.cpp
+++ b/resources/imap/autotests/dummyresourcestate.cpp
@@ -416,12 +416,12 @@ QChar DummyResourceState::separatorCharacter() const
return m_separator;
}
-void DummyResourceState::setSeparatorCharacter(const QChar &separator)
+void DummyResourceState::setSeparatorCharacter(QChar separator)
{
m_separator = separator;
}
-void DummyResourceState::recordCall(const QByteArray callName, const QVariant &parameter)
+void DummyResourceState::recordCall(const QByteArray &callName, const QVariant &parameter)
{
m_calls << QPair<QByteArray, QVariant>(callName, parameter);
}
diff --git a/resources/imap/autotests/dummyresourcestate.h b/resources/imap/autotests/dummyresourcestate.h
index 76e5ef9..44e1da8 100644
--- a/resources/imap/autotests/dummyresourcestate.h
+++ b/resources/imap/autotests/dummyresourcestate.h
@@ -138,7 +138,7 @@ public:
void scheduleConnectionAttempt() Q_DECL_OVERRIDE;
QChar separatorCharacter() const Q_DECL_OVERRIDE;
- void setSeparatorCharacter(const QChar &separator) Q_DECL_OVERRIDE;
+ void setSeparatorCharacter(QChar separator) Q_DECL_OVERRIDE;
void showInformationDialog(const QString &message, const QString &title, const QString &dontShowAgainName) Q_DECL_OVERRIDE;
@@ -150,7 +150,7 @@ public:
QList< QPair<QByteArray, QVariant> > calls() const;
private:
- void recordCall(const QByteArray callName, const QVariant &parameter = QVariant());
+ void recordCall(const QByteArray &callName, const QVariant &parameter = QVariant());
QString m_userName;
QString m_resourceName;
diff --git a/resources/imap/batchfetcher.h b/resources/imap/batchfetcher.h
index 23cc02b..3acbc53 100644
--- a/resources/imap/batchfetcher.h
+++ b/resources/imap/batchfetcher.h
@@ -48,7 +48,7 @@ public:
void setGmailExtensionsEnabled(bool enable);
Q_SIGNALS:
- void itemsRetrieved(Akonadi::Item::List);
+ void itemsRetrieved(const Akonadi::Item::List &);
private Q_SLOTS:
void onHeadersReceived(const QString &mailBox,
diff --git a/resources/imap/resourcestate.cpp b/resources/imap/resourcestate.cpp
index bbd78bc..7012fc7 100644
--- a/resources/imap/resourcestate.cpp
+++ b/resources/imap/resourcestate.cpp
@@ -333,7 +333,7 @@ QChar ResourceState::separatorCharacter() const
return m_resource->separatorCharacter();
}
-void ResourceState::setSeparatorCharacter(const QChar &separator)
+void ResourceState::setSeparatorCharacter(QChar separator)
{
m_resource->setSeparatorCharacter(separator);
}
diff --git a/resources/imap/resourcestate.h b/resources/imap/resourcestate.h
index 650f293..54e24ab 100644
--- a/resources/imap/resourcestate.h
+++ b/resources/imap/resourcestate.h
@@ -145,7 +145,7 @@ public:
void scheduleConnectionAttempt() Q_DECL_OVERRIDE;
QChar separatorCharacter() const Q_DECL_OVERRIDE;
- void setSeparatorCharacter(const QChar &separator) Q_DECL_OVERRIDE;
+ void setSeparatorCharacter(QChar separator) Q_DECL_OVERRIDE;
void showInformationDialog(const QString &message, const QString &title, const QString &dontShowAgainName) Q_DECL_OVERRIDE;
diff --git a/resources/imap/resourcestateinterface.h b/resources/imap/resourcestateinterface.h
index 7040c7a..07a419d 100644
--- a/resources/imap/resourcestateinterface.h
+++ b/resources/imap/resourcestateinterface.h
@@ -113,7 +113,7 @@ public:
virtual void scheduleConnectionAttempt() = 0;
virtual QChar separatorCharacter() const = 0;
- virtual void setSeparatorCharacter(const QChar &separator) = 0;
+ virtual void setSeparatorCharacter(QChar separator) = 0;
virtual void showInformationDialog(const QString &message, const QString &title, const QString &dontShowAgainName) = 0;
diff --git a/resources/imap/resourcetask.cpp b/resources/imap/resourcetask.cpp
index 0710e28..c886e50 100644
--- a/resources/imap/resourcetask.cpp
+++ b/resources/imap/resourcetask.cpp
@@ -548,7 +548,7 @@ const QChar ResourceTask::separatorCharacter() const
}
}
-void ResourceTask::setSeparatorCharacter(const QChar &separator)
+void ResourceTask::setSeparatorCharacter(QChar separator)
{
m_resource->setSeparatorCharacter(separator);
}
diff --git a/resources/imap/resourcetask.h b/resources/imap/resourcetask.h
index d034c9d..318e07b 100644
--- a/resources/imap/resourcetask.h
+++ b/resources/imap/resourcetask.h
@@ -134,7 +134,7 @@ protected:
void showInformationDialog(const QString &message, const QString &title, const QString &dontShowAgainName);
const QChar separatorCharacter() const;
- void setSeparatorCharacter(const QChar &separator);
+ void setSeparatorCharacter(QChar separator);
virtual bool serverSupportsAnnotations() const;
virtual bool serverSupportsCondstore() const;
diff --git a/resources/imap/sessionpool.h b/resources/imap/sessionpool.h
index 60e4776..e082f1b 100644
--- a/resources/imap/sessionpool.h
+++ b/resources/imap/sessionpool.h
@@ -31,7 +31,7 @@
namespace KIMAP
{
-class MailBoxDescriptor;
+struct MailBoxDescriptor;
}
class ImapAccount;
diff --git a/resources/kolab/tagchangehelper.cpp b/resources/kolab/tagchangehelper.cpp
index 9451236..3b91845 100644
--- a/resources/kolab/tagchangehelper.cpp
+++ b/resources/kolab/tagchangehelper.cpp
@@ -59,7 +59,7 @@ KMime::Message::Ptr TagConverter::createMessage(const Akonadi::Tag &tag, const A
struct TagMerger : public Merger {
virtual ~TagMerger() {}
- KMime::Message::Ptr merge(KMime::Message::Ptr newMessage, QList<KMime::Message::Ptr> conflictingMessages) const Q_DECL_OVERRIDE
+ KMime::Message::Ptr merge(const KMime::Message::Ptr &newMessage, const QList<KMime::Message::Ptr> &conflictingMessages) const Q_DECL_OVERRIDE
{
qCDebug(KOLABRESOURCE_LOG) << "Got " << conflictingMessages.size() << " conflicting relation configuration objects. Overwriting with local version.";
return newMessage;
diff --git a/resources/kolab/updatemessagejob.cpp b/resources/kolab/updatemessagejob.cpp
index 382d186..7bff3c0 100644
--- a/resources/kolab/updatemessagejob.cpp
+++ b/resources/kolab/updatemessagejob.cpp
@@ -102,12 +102,12 @@ void UpdateMessageJob::fetchHeaders()
}
-void UpdateMessageJob::onHeadersReceived(QString,
- QMap<qint64, qint64> uids,
- QMap<qint64, qint64>,
- QMap<qint64, KIMAP::MessageAttribute>,
- QMap<qint64, KIMAP::MessageFlags> flags,
- QMap<qint64, KIMAP::MessagePtr>)
+void UpdateMessageJob::onHeadersReceived(const QString&,
+ const QMap<qint64, qint64> &uids,
+ const QMap<qint64, qint64> &,
+ const QMap<qint64, KIMAP::MessageAttribute> &,
+ const QMap<qint64, KIMAP::MessageFlags> &flags,
+ const QMap<qint64, KIMAP::MessagePtr> &)
{
//Filter deleted messages
foreach (qint64 number, uids.keys()) { //krazy:exclude=foreach
@@ -188,12 +188,12 @@ void UpdateMessageJob::onSearchDone(KJob *job)
}
}
-void UpdateMessageJob::onConflictingMessagesReceived(QString,
- QMap<qint64, qint64> uids,
- QMap<qint64, qint64>,
- QMap<qint64, KIMAP::MessageAttribute>,
- QMap<qint64, KIMAP::MessageFlags> flags,
- QMap<qint64, KIMAP::MessagePtr> messages)
+void UpdateMessageJob::onConflictingMessagesReceived(const QString &,
+ const QMap<qint64, qint64> &uids,
+ const QMap<qint64, qint64> &,
+ const QMap<qint64, KIMAP::MessageAttribute> &,
+ const QMap<qint64, KIMAP::MessageFlags> &flags,
+ const QMap<qint64, KIMAP::MessagePtr> &messages)
{
foreach (qint64 number, uids.keys()) { //krazy:exclude=foreach
if (!flags[number].contains(ImapFlags::Deleted)) {
diff --git a/resources/kolab/updatemessagejob.h b/resources/kolab/updatemessagejob.h
index 307037e..d97c579 100644
--- a/resources/kolab/updatemessagejob.h
+++ b/resources/kolab/updatemessagejob.h
@@ -27,7 +27,7 @@
struct Merger {
virtual ~Merger() {}
- virtual KMime::Message::Ptr merge(KMime::Message::Ptr newMessage, QList<KMime::Message::Ptr> conflictingMessages) const = 0;
+ virtual KMime::Message::Ptr merge(const KMime::Message::Ptr &newMessage, const QList<KMime::Message::Ptr> &conflictingMessages) const = 0;
};
/**
@@ -49,21 +49,21 @@ private:
void appendMessage();
private Q_SLOTS:
- void onHeadersReceived(QString,
- QMap<qint64, qint64> uids,
- QMap<qint64, qint64>,
- QMap<qint64, KIMAP::MessageAttribute>,
- QMap<qint64, KIMAP::MessageFlags>,
- QMap<qint64, KIMAP::MessagePtr>);
+ void onHeadersReceived(const QString&,
+ const QMap<qint64, qint64> &uids,
+ const QMap<qint64, qint64>&,
+ const QMap<qint64, KIMAP::MessageAttribute>&,
+ const QMap<qint64, KIMAP::MessageFlags>&,
+ const QMap<qint64, KIMAP::MessagePtr>&);
void onHeadersFetchDone(KJob *job);
void onSelectDone(KJob *job);
void onSearchDone(KJob *job);
- void onConflictingMessagesReceived(QString,
- QMap<qint64, qint64> uids,
- QMap<qint64, qint64>,
- QMap<qint64, KIMAP::MessageAttribute>,
- QMap<qint64, KIMAP::MessageFlags>,
- QMap<qint64, KIMAP::MessagePtr>);
+ void onConflictingMessagesReceived(const QString &,
+ const QMap<qint64, qint64> &uids,
+ const QMap<qint64, qint64> &,
+ const QMap<qint64, KIMAP::MessageAttribute> &,
+ const QMap<qint64, KIMAP::MessageFlags> &,
+ const QMap<qint64, KIMAP::MessagePtr> &);
void onConflictingMessageFetchDone(KJob *job);
void onReplaceDone(KJob *job);
diff --git a/resources/mixedmaildir/compactchangehelper.cpp b/resources/mixedmaildir/compactchangehelper.cpp
index 9d2a61e..4c0893f 100644
--- a/resources/mixedmaildir/compactchangehelper.cpp
+++ b/resources/mixedmaildir/compactchangehelper.cpp
@@ -102,10 +102,10 @@ void CompactChangeHelper::Private::itemFetchResult(KJob *job)
ItemFetchJob *fetchJob = qobject_cast<ItemFetchJob *>(job);
Q_ASSERT(fetchJob != 0);
- const QString oldRemoteId = fetchJob->property("oldRemoteId").value<QString>();
+ const QString oldRemoteId = fetchJob->property("oldRemoteId").toString();
Q_ASSERT(!oldRemoteId.isEmpty());
- const QString newRemoteId = fetchJob->property("newRemoteId").value<QString>();
+ const QString newRemoteId = fetchJob->property("newRemoteId").toString();
Q_ASSERT(!newRemoteId.isEmpty());
if (fetchJob->error() != 0) {
diff --git a/resources/mixedmaildir/mixedmaildirresource.cpp b/resources/mixedmaildir/mixedmaildirresource.cpp
index 5c52e4c..bdfc50c 100644
--- a/resources/mixedmaildir/mixedmaildirresource.cpp
+++ b/resources/mixedmaildir/mixedmaildirresource.cpp
@@ -600,7 +600,7 @@ void MixedMaildirResource::itemChangedResult(KJob *job)
changeCommitted(itemJob->item());
- const QString remoteId = itemJob->property("originalRemoteId").value<QString>();
+ const QString remoteId = itemJob->property("originalRemoteId").toString();
const QVariant compactStoreVar = itemJob->property("compactStore");
if (compactStoreVar.isValid() && compactStoreVar.toBool()) {
@@ -624,7 +624,7 @@ void MixedMaildirResource::itemMovedResult(KJob *job)
changeCommitted(itemJob->item());
- const QString remoteId = itemJob->property("originalRemoteId").value<QString>();
+ const QString remoteId = itemJob->property("originalRemoteId").toString();
// qCDebug(MIXEDMAILDIRRESOURCE_LOG) << "item.id=" << itemJob->item().id() << "remoteId=" << itemJob->item().remoteId()
// << "old remoteId=" << remoteId;
@@ -811,7 +811,7 @@ void MixedMaildirResource::tagFetchJobResult(KJob *job)
Q_ASSERT(!fetchJob->items().isEmpty());
const Item item = fetchJob->items().at(0);
- const QStringList tagList = job->property("tagList").value<QStringList>();
+ const QStringList tagList = job->property("tagList").toStringList();
qCDebug(MIXEDMAILDIRRESOURCE_LOG) << "Tagging item" << item.url() << "with" << tagList;
Akonadi::Tag::List tags;
diff --git a/resources/openxchange/oxa/connectiontestjob.cpp b/resources/openxchange/oxa/connectiontestjob.cpp
index b12ee90..ef72fb3 100644
--- a/resources/openxchange/oxa/connectiontestjob.cpp
+++ b/resources/openxchange/oxa/connectiontestjob.cpp
@@ -36,7 +36,7 @@ void ConnectionTestJob::start()
if (!mUrl.startsWith(QStringLiteral("https://"))) {
mUrl = QStringLiteral("https://") + mUrl;
}
- const QUrl url(mUrl + QStringLiteral("/ajax/login?action=login&name=%1&password=%2").arg(mUser).arg(mPassword));
+ const QUrl url(mUrl + QStringLiteral("/ajax/login?action=login&name=%1&password=%2").arg(mUser, mPassword));
KJob *job = KIO::storedGet(url, KIO::Reload, KIO::HideProgressInfo);
connect(job, &KJob::result, this, &ConnectionTestJob::httpJobFinished);
diff --git a/resources/openxchange/oxa/incidenceutils.cpp b/resources/openxchange/oxa/incidenceutils.cpp
index 40e986b..4be6186 100644
--- a/resources/openxchange/oxa/incidenceutils.cpp
+++ b/resources/openxchange/oxa/incidenceutils.cpp
@@ -461,7 +461,7 @@ static void createRecurrenceAttributes(QDomDocument &document, QDomElement &pare
DAVUtils::addOxElement(document, parent, QStringLiteral("day_in_month"), OXUtils::writeNumber(recurrence->monthDays().first()));
break;
case KCalCore::Recurrence::rMonthlyPos: {
- const KCalCore::RecurrenceRule::WDayPos wdp = recurrence->monthPositions().first();
+ const KCalCore::RecurrenceRule::WDayPos wdp = recurrence->monthPositions().constFirst();
DAVUtils::addOxElement(document, parent, QStringLiteral("recurrence_type"), QStringLiteral("monthly"));
DAVUtils::addOxElement(document, parent, QStringLiteral("interval"), OXUtils::writeNumber(recurrence->frequency()));
@@ -472,17 +472,17 @@ static void createRecurrenceAttributes(QDomDocument &document, QDomElement &pare
case KCalCore::Recurrence::rYearlyMonth:
DAVUtils::addOxElement(document, parent, QStringLiteral("recurrence_type"), QStringLiteral("yearly"));
DAVUtils::addOxElement(document, parent, QStringLiteral("interval"), QStringLiteral("1"));
- DAVUtils::addOxElement(document, parent, QStringLiteral("day_in_month"), OXUtils::writeNumber(recurrence->yearDates().first()));
- DAVUtils::addOxElement(document, parent, QStringLiteral("month"), OXUtils::writeNumber(recurrence->yearMonths().first() + monthOffset));
+ DAVUtils::addOxElement(document, parent, QStringLiteral("day_in_month"), OXUtils::writeNumber(recurrence->yearDates().constFirst()));
+ DAVUtils::addOxElement(document, parent, QStringLiteral("month"), OXUtils::writeNumber(recurrence->yearMonths().constFirst() + monthOffset));
break;
case KCalCore::Recurrence::rYearlyPos: {
- const KCalCore::RecurrenceRule::WDayPos wdp = recurrence->monthPositions().first();
+ const KCalCore::RecurrenceRule::WDayPos wdp = recurrence->monthPositions().constFirst();
DAVUtils::addOxElement(document, parent, QStringLiteral("recurrence_type"), QStringLiteral("yearly"));
DAVUtils::addOxElement(document, parent, QStringLiteral("interval"), QStringLiteral("1"));
DAVUtils::addOxElement(document, parent, QStringLiteral("days"), OXUtils::writeNumber(1 << wdp.day()));
DAVUtils::addOxElement(document, parent, QStringLiteral("day_in_month"), OXUtils::writeNumber(wdp.pos()));
- DAVUtils::addOxElement(document, parent, QStringLiteral("month"), OXUtils::writeNumber(recurrence->yearMonths().first() + monthOffset));
+ DAVUtils::addOxElement(document, parent, QStringLiteral("month"), OXUtils::writeNumber(recurrence->yearMonths().constFirst() + monthOffset));
}
break;
default:
diff --git a/resources/shared/singlefileresource/collectionannotationsattribute.cpp b/resources/shared/singlefileresource/collectionannotationsattribute.cpp
index bc1f97e..0e2cba6 100644
--- a/resources/shared/singlefileresource/collectionannotationsattribute.cpp
+++ b/resources/shared/singlefileresource/collectionannotationsattribute.cpp
@@ -59,10 +59,12 @@ QByteArray CollectionAnnotationsAttribute::serialized() const
{
QByteArray result = "";
- foreach (const QByteArray &key, mAnnotations.keys()) {
- result += key;
+ QMapIterator<QByteArray, QByteArray> i(mAnnotations);
+ while (i.hasNext()) {
+ i.next();
+ result += i.key();
result += ' ';
- result += mAnnotations[key];
+ result += i.value();
result += " % "; // We use this separator as '%' is not allowed in keys or values
}
result.chop(3);
diff --git a/resources/shared/singlefileresource/imapaclattribute.cpp b/resources/shared/singlefileresource/imapaclattribute.cpp
index 1aac458..f24e84f 100644
--- a/resources/shared/singlefileresource/imapaclattribute.cpp
+++ b/resources/shared/singlefileresource/imapaclattribute.cpp
@@ -77,10 +77,13 @@ QByteArray ImapAclAttribute::serialized() const
QByteArray result = "";
bool added = false;
- foreach (const QByteArray &id, mRights.keys()) {
- result += id;
+
+ QMapIterator<QByteArray, KIMAP::Acl::Rights> i(mRights);
+ while (i.hasNext()) {
+ i.next();
+ result += i.key();
result += ' ';
- result += KIMAP::Acl::rightsToString(mRights[id]);
+ result += KIMAP::Acl::rightsToString(i.value());
result += " % "; // We use this separator as '%' is not allowed in keys or values
added = true;
}
@@ -92,10 +95,12 @@ QByteArray ImapAclAttribute::serialized() const
result += " %% ";
added = false;
- foreach (const QByteArray &id, mOldRights.keys()) {
- result += id;
+ QMapIterator<QByteArray, KIMAP::Acl::Rights> i2(mOldRights);
+ while (i2.hasNext()) {
+ i2.next();
+ result += i2.key();
result += ' ';
- result += KIMAP::Acl::rightsToString(mOldRights[id]);
+ result += KIMAP::Acl::rightsToString(i2.value());
result += " % "; // We use this separator as '%' is not allowed in keys or values
added = true;
}
diff --git a/resources/tomboynotes/o2/o1.cpp b/resources/tomboynotes/o2/o1.cpp
index 3162472..54a6dfa 100644
--- a/resources/tomboynotes/o2/o1.cpp
+++ b/resources/tomboynotes/o2/o1.cpp
@@ -195,7 +195,7 @@ QByteArray O1::buildAuthorizationHeader(const QList<O0RequestParameter> &oauthPa
return ret;
}
-QByteArray O1::generateSignature(const QList<O0RequestParameter> headers, const QNetworkRequest &req, const QList<O0RequestParameter> &signingParameters, QNetworkAccessManager::Operation operation)
+QByteArray O1::generateSignature(const QList<O0RequestParameter> &headers, const QNetworkRequest &req, const QList<O0RequestParameter> &signingParameters, QNetworkAccessManager::Operation operation)
{
QByteArray signature;
if (signatureMethod() == O2_SIGNATURE_TYPE_HMAC_SHA1) {
diff --git a/resources/tomboynotes/o2/o1.h b/resources/tomboynotes/o2/o1.h
index 9b697fc..ea39e91 100644
--- a/resources/tomboynotes/o2/o1.h
+++ b/resources/tomboynotes/o2/o1.h
@@ -60,7 +60,7 @@ public:
static QByteArray nonce();
/// Generate signature string depending on signature method type
- QByteArray generateSignature(const QList<O0RequestParameter> headers, const QNetworkRequest &req, const QList<O0RequestParameter> &signingParameters, QNetworkAccessManager::Operation operation);
+ QByteArray generateSignature(const QList<O0RequestParameter> &headers, const QNetworkRequest &req, const QList<O0RequestParameter> &signingParameters, QNetworkAccessManager::Operation operation);
/// Calculate the HMAC-SHA1 signature of a request.
/// @param oauthParams OAuth parameters.
diff --git a/resources/tomboynotes/o2/o2.cpp b/resources/tomboynotes/o2/o2.cpp
index 84747cf..9c4cf1c 100644
--- a/resources/tomboynotes/o2/o2.cpp
+++ b/resources/tomboynotes/o2/o2.cpp
@@ -223,7 +223,7 @@ void O2::unlink()
Q_EMIT linkingSucceeded();
}
-void O2::onVerificationReceived(const QMap<QString, QString> response)
+void O2::onVerificationReceived(const QMap<QString, QString> &response)
{
qCDebug(TOMBOYNOTESRESOURCE_LOG) << "O2::onVerificationReceived:" << response;
qCDebug(TOMBOYNOTESRESOURCE_LOG) << "O2::onVerificationReceived: Emitting closeBrowser()";
diff --git a/resources/tomboynotes/o2/o2.h b/resources/tomboynotes/o2/o2.h
index 8d635f0..d1e3003 100644
--- a/resources/tomboynotes/o2/o2.h
+++ b/resources/tomboynotes/o2/o2.h
@@ -123,7 +123,7 @@ Q_SIGNALS:
protected Q_SLOTS:
/// Handle verification response.
- virtual void onVerificationReceived(QMap<QString, QString>);
+ virtual void onVerificationReceived(const QMap<QString, QString>&);
/// Handle completion of a token request.
virtual void onTokenReplyFinished();
diff --git a/resources/tomboynotes/tomboyitemsdownloadjob.cpp b/resources/tomboynotes/tomboyitemsdownloadjob.cpp
index 503243a..2ba1b20 100644
--- a/resources/tomboynotes/tomboyitemsdownloadjob.cpp
+++ b/resources/tomboynotes/tomboyitemsdownloadjob.cpp
@@ -24,7 +24,7 @@
#include <QJsonDocument>
#include <QJsonObject>
-TomboyItemsDownloadJob::TomboyItemsDownloadJob(const Akonadi::Collection::Id &id, KIO::AccessManager *manager, QObject *parent)
+TomboyItemsDownloadJob::TomboyItemsDownloadJob(Akonadi::Collection::Id id, KIO::AccessManager *manager, QObject *parent)
: TomboyJobBase(manager, parent),
mCollectionId(id)
{
diff --git a/resources/tomboynotes/tomboyitemsdownloadjob.h b/resources/tomboynotes/tomboyitemsdownloadjob.h
index 867a9e9..f09ac95 100644
--- a/resources/tomboynotes/tomboyitemsdownloadjob.h
+++ b/resources/tomboynotes/tomboyitemsdownloadjob.h
@@ -28,7 +28,7 @@ class TomboyItemsDownloadJob : public TomboyJobBase
Q_OBJECT
public:
// ctor
- explicit TomboyItemsDownloadJob(const Akonadi::Collection::Id &id, KIO::AccessManager *manager, QObject *parent = Q_NULLPTR);
+ explicit TomboyItemsDownloadJob(Akonadi::Collection::Id id, KIO::AccessManager *manager, QObject *parent = Q_NULLPTR);
// returns the parsed results wrapped in Akonadi::Item::List, see bellow
Akonadi::Item::List items() const;