summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-11-24 13:45:22 +0100
committerMontel Laurent <[email protected]>2015-11-24 13:45:22 +0100
commit7c312cfddd02243ca83d35c59e39e4c67966174b (patch)
tree75a26b1cb6be4edd60ced31470824cb76d6ba3c7
parent08beece535b372570d5f0095e4da65822c4d49a0 (diff)
Don't use const'ref for Akonadi::MessageStatus
-rw-r--r--messagecore/src/helpers/messagehelpers.cpp2
-rw-r--r--messagecore/src/helpers/messagehelpers.h2
-rw-r--r--messagelist/src/core/item.cpp4
-rw-r--r--messagelist/src/core/item.h4
-rw-r--r--messagelist/src/core/storagemodelbase.h2
-rw-r--r--messagelist/src/core/view.cpp2
-rw-r--r--messagelist/src/core/view.h2
-rw-r--r--messagelist/src/core/widgetbase.cpp2
-rw-r--r--messagelist/src/core/widgetbase.h2
-rw-r--r--messagelist/src/storagemodel.cpp2
-rw-r--r--messagelist/src/storagemodel.h2
-rw-r--r--messagelist/src/widget.cpp2
-rw-r--r--messagelist/src/widget.h2
-rw-r--r--messageviewer/src/header/headerstyle.cpp2
-rw-r--r--messageviewer/src/header/headerstyle.h2
15 files changed, 17 insertions, 17 deletions
diff --git a/messagecore/src/helpers/messagehelpers.cpp b/messagecore/src/helpers/messagehelpers.cpp
index 6b1b111..25dd6f5 100644
--- a/messagecore/src/helpers/messagehelpers.cpp
+++ b/messagecore/src/helpers/messagehelpers.cpp
@@ -38,7 +38,7 @@ bool MessageCore::Util::isStandaloneMessage(const Akonadi::Item &item)
return item.hasPayload<KMime::Message::Ptr>() && !item.isValid();
}
-void MessageCore::Util::addLinkInformation(const KMime::Message::Ptr &msg, Akonadi::Item::Id id, const Akonadi::MessageStatus &status)
+void MessageCore::Util::addLinkInformation(const KMime::Message::Ptr &msg, Akonadi::Item::Id id, Akonadi::MessageStatus status)
{
Q_ASSERT(status.isReplied() || status.isForwarded() || status.isDeleted());
diff --git a/messagecore/src/helpers/messagehelpers.h b/messagecore/src/helpers/messagehelpers.h
index 34ebaec..cc5c42d 100644
--- a/messagecore/src/helpers/messagehelpers.h
+++ b/messagecore/src/helpers/messagehelpers.h
@@ -54,7 +54,7 @@ MESSAGECORE_EXPORT bool isStandaloneMessage(const Akonadi::Item &item);
* @param id The item id of the original message.
* @param status The status (replied or forwarded) that links the message to the original message.
*/
-MESSAGECORE_EXPORT void addLinkInformation(const KMime::Message::Ptr &message, Akonadi::Item::Id item, const Akonadi::MessageStatus &status);
+MESSAGECORE_EXPORT void addLinkInformation(const KMime::Message::Ptr &message, Akonadi::Item::Id item, Akonadi::MessageStatus status);
/**
* Reads the private headers of the given @p message to extract link information to its original message.
diff --git a/messagelist/src/core/item.cpp b/messagelist/src/core/item.cpp
index 18ef1a2..5167c85 100644
--- a/messagelist/src/core/item.cpp
+++ b/messagelist/src/core/item.cpp
@@ -430,7 +430,7 @@ const Akonadi::MessageStatus &Item::status() const
return d_ptr->mStatus;
}
-void Item::setStatus(const Akonadi::MessageStatus &status)
+void Item::setStatus(Akonadi::MessageStatus status)
{
d_ptr->mStatus = status;
}
@@ -539,7 +539,7 @@ qint64 Item::parentCollectionId() const
}
void MessageList::Core::Item::setSubjectAndStatus(const QString &subject,
- const Akonadi::MessageStatus &status)
+ Akonadi::MessageStatus status)
{
d_ptr->mSubject = subject;
d_ptr->mStatus = status;
diff --git a/messagelist/src/core/item.h b/messagelist/src/core/item.h
index 26c1942..afebece 100644
--- a/messagelist/src/core/item.h
+++ b/messagelist/src/core/item.h
@@ -244,7 +244,7 @@ public:
/**
* Sets the status associated to this Item.
*/
- void setStatus(const Akonadi::MessageStatus &status);
+ void setStatus(Akonadi::MessageStatus status);
/**
* Returns a string describing the status e.g: "Read, Forwarded, Important"
@@ -367,7 +367,7 @@ public:
* It sets up several items at once (so even if not inlined it's still a single call).
*/
void setSubjectAndStatus(const QString &subject,
- const Akonadi::MessageStatus &status);
+ Akonadi::MessageStatus status);
/**
* Appends an Item to this item's child list.
diff --git a/messagelist/src/core/storagemodelbase.h b/messagelist/src/core/storagemodelbase.h
index c687143..8e77b4b 100644
--- a/messagelist/src/core/storagemodelbase.h
+++ b/messagelist/src/core/storagemodelbase.h
@@ -115,7 +115,7 @@ public:
* to the specified message item. The new status should be stored (but doesn't need
* to be set as mi->status() itself as the caller is responsable for this).
*/
- virtual void setMessageItemStatus(MessageItem *mi, int row, const Akonadi::MessageStatus &status) = 0;
+ virtual void setMessageItemStatus(MessageItem *mi, int row, Akonadi::MessageStatus status) = 0;
/**
* Called by Model just before this StorageModel is attacched to it.
diff --git a/messagelist/src/core/view.cpp b/messagelist/src/core/view.cpp
index fe0e567..b2045bc 100644
--- a/messagelist/src/core/view.cpp
+++ b/messagelist/src/core/view.cpp
@@ -2065,7 +2065,7 @@ void View::changeMessageStatusRead(MessageItem *it, bool read)
d->mWidget->viewMessageStatusChangeRequest(it, set, unset);
}
-void View::changeMessageStatus(MessageItem *it, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &unset)
+void View::changeMessageStatus(MessageItem *it, Akonadi::MessageStatus set, Akonadi::MessageStatus unset)
{
// We first change the status of MessageItem itself. This will make the change
// visible to the user even if the Model is actually in the middle of a long job (maybe it's loading)
diff --git a/messagelist/src/core/view.h b/messagelist/src/core/view.h
index c9977e6..fa564cd 100644
--- a/messagelist/src/core/view.h
+++ b/messagelist/src/core/view.h
@@ -583,7 +583,7 @@ protected:
* It first applies the change to the cached state in MessageItem and
* then requests our parent widget to act on the storage.
*/
- void changeMessageStatus(MessageItem *it, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &unset);
+ void changeMessageStatus(MessageItem *it, Akonadi::MessageStatus set, Akonadi::MessageStatus unset);
void changeMessageStatusRead(MessageItem *it, bool read);
/**
diff --git a/messagelist/src/core/widgetbase.cpp b/messagelist/src/core/widgetbase.cpp
index 5b0d272..a46b763 100644
--- a/messagelist/src/core/widgetbase.cpp
+++ b/messagelist/src/core/widgetbase.cpp
@@ -1085,7 +1085,7 @@ void Widget::viewJobBatchTerminated()
{
}
-void Widget::viewMessageStatusChangeRequest(MessageItem *msg, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &clear)
+void Widget::viewMessageStatusChangeRequest(MessageItem *msg, Akonadi::MessageStatus set, Akonadi::MessageStatus clear)
{
Q_UNUSED(msg);
Q_UNUSED(set);
diff --git a/messagelist/src/core/widgetbase.h b/messagelist/src/core/widgetbase.h
index d237413..525a4e3 100644
--- a/messagelist/src/core/widgetbase.h
+++ b/messagelist/src/core/widgetbase.h
@@ -219,7 +219,7 @@ protected:
* This is called by View when a message item is manipulated by the user
* in a way that it's status should change. (e.g, by clicking on a status icon, for example).
*/
- virtual void viewMessageStatusChangeRequest(MessageItem *msg, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &clear);
+ virtual void viewMessageStatusChangeRequest(MessageItem *msg, Akonadi::MessageStatus set, Akonadi::MessageStatus clear);
/**
* This is called by View to signal a start of a (possibly lengthy) job batch.
diff --git a/messagelist/src/storagemodel.cpp b/messagelist/src/storagemodel.cpp
index 5e3013b..af8c46c 100644
--- a/messagelist/src/storagemodel.cpp
+++ b/messagelist/src/storagemodel.cpp
@@ -348,7 +348,7 @@ void StorageModel::updateMessageItemData(MessageList::Core::MessageItem *mi,
}
void StorageModel::setMessageItemStatus(MessageList::Core::MessageItem *mi,
- int row, const Akonadi::MessageStatus &status)
+ int row, Akonadi::MessageStatus status)
{
Q_UNUSED(mi);
Item item = itemForRow(row);
diff --git a/messagelist/src/storagemodel.h b/messagelist/src/storagemodel.h
index 6536a75..741823c 100644
--- a/messagelist/src/storagemodel.h
+++ b/messagelist/src/storagemodel.h
@@ -68,7 +68,7 @@ public:
bool initializeMessageItem(MessageList::Core::MessageItem *mi, int row, bool bUseReceiver) const Q_DECL_OVERRIDE;
void fillMessageItemThreadingData(MessageList::Core::MessageItem *mi, int row, ThreadingDataSubset subset) const Q_DECL_OVERRIDE;
void updateMessageItemData(MessageList::Core::MessageItem *mi, int row) const Q_DECL_OVERRIDE;
- void setMessageItemStatus(MessageList::Core::MessageItem *mi, int row, const Akonadi::MessageStatus &status) Q_DECL_OVERRIDE;
+ void setMessageItemStatus(MessageList::Core::MessageItem *mi, int row, Akonadi::MessageStatus status) Q_DECL_OVERRIDE;
int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
diff --git a/messagelist/src/widget.cpp b/messagelist/src/widget.cpp
index 29705aa..22efb36 100644
--- a/messagelist/src/widget.cpp
+++ b/messagelist/src/widget.cpp
@@ -325,7 +325,7 @@ void Widget::viewMessageListContextPopupRequest(const QList< MessageList::Core::
}
}
-void Widget::viewMessageStatusChangeRequest(MessageList::Core::MessageItem *msg, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &clear)
+void Widget::viewMessageStatusChangeRequest(MessageList::Core::MessageItem *msg, Akonadi::MessageStatus set, Akonadi::MessageStatus clear)
{
Q_ASSERT(msg); // must not be null
Q_ASSERT(storageModel());
diff --git a/messagelist/src/widget.h b/messagelist/src/widget.h
index cb122f8..bd72f8d 100644
--- a/messagelist/src/widget.h
+++ b/messagelist/src/widget.h
@@ -380,7 +380,7 @@ protected:
/**
* Reimplemented from MessageList::Core::Widget
*/
- void viewMessageStatusChangeRequest(MessageList::Core::MessageItem *msg, const Akonadi::MessageStatus &set, const Akonadi::MessageStatus &clear) Q_DECL_OVERRIDE;
+ void viewMessageStatusChangeRequest(MessageList::Core::MessageItem *msg, Akonadi::MessageStatus set, Akonadi::MessageStatus clear) Q_DECL_OVERRIDE;
private Q_SLOTS:
void slotCollapseItem();
diff --git a/messageviewer/src/header/headerstyle.cpp b/messageviewer/src/header/headerstyle.cpp
index cc5a5d1..ff69b17 100644
--- a/messageviewer/src/header/headerstyle.cpp
+++ b/messageviewer/src/header/headerstyle.cpp
@@ -143,7 +143,7 @@ QObject *HeaderStyle::sourceObject() const
return mSourceObject;
}
-void HeaderStyle::setMessageStatus(const Akonadi::MessageStatus &status)
+void HeaderStyle::setMessageStatus(Akonadi::MessageStatus status)
{
mMessageStatus = status;
}
diff --git a/messageviewer/src/header/headerstyle.h b/messageviewer/src/header/headerstyle.h
index 6bc7056..c75f119 100644
--- a/messageviewer/src/header/headerstyle.h
+++ b/messageviewer/src/header/headerstyle.h
@@ -102,7 +102,7 @@ public:
void setSourceObject(QObject *sourceObject);
QObject *sourceObject() const;
- void setMessageStatus(const Akonadi::MessageStatus &status);
+ void setMessageStatus(Akonadi::MessageStatus status);
Akonadi::MessageStatus messageStatus() const;
void setTheme(const GrantleeTheme::Theme &theme);