Commit e90ce0ec authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use const'ref here

parent b0e64e06
......@@ -1678,10 +1678,10 @@ void View::deletePersistentSet(MessageItemSetReference ref)
d->mModel->deletePersistentSet(ref);
}
void View::markMessageItemsAsAboutToBeRemoved(QList<MessageItem *> &items, bool bMark)
void View::markMessageItemsAsAboutToBeRemoved(const QList<MessageItem *> &items, bool bMark)
{
if (!bMark) {
for (const auto mi : qAsConst(items)) {
for (const auto mi : items) {
if (mi->isValid()) { // hasn't been removed in the meantime
mi->setAboutToBeRemoved(false);
}
......@@ -1812,7 +1812,7 @@ void View::markMessageItemsAsAboutToBeRemoved(QList<MessageItem *> &items, bool
// Now mark messages as about to be removed.
for (const auto mi : qAsConst(items)) {
for (const auto mi : items) {
mi->setAboutToBeRemoved(true);
QModelIndex idx = d->mModel->index(mi, 0);
Q_ASSERT(idx.isValid());
......
......@@ -216,7 +216,7 @@ public:
* If bMark is false then this function clears the "about to be removed" state
* for the specified MessageItems.
*/
void markMessageItemsAsAboutToBeRemoved(QList< MessageItem * > &items, bool bMark);
void markMessageItemsAsAboutToBeRemoved(const QList<MessageItem *> &items, bool bMark);
/**
* Returns true if the current Aggregation is threaded, false otherwise
......
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