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

Add list of items

parent 58dd7d58
Pipeline #67801 passed with stage
in 40 minutes and 22 seconds
......@@ -13,6 +13,7 @@ public:
MessageViewerCheckBeforeDeletingParametersPrivate()
{
}
Akonadi::Item::List mList;
MessageViewerCheckBeforeDeletingParameters::DeleteType mType = MessageViewerCheckBeforeDeletingParameters::Unknown;
};
......@@ -31,6 +32,16 @@ MessageViewerCheckBeforeDeletingParameters::~MessageViewerCheckBeforeDeletingPar
{
}
Akonadi::Item::List MessageViewerCheckBeforeDeletingParameters::items() const
{
return d->mList;
}
void MessageViewerCheckBeforeDeletingParameters::setItems(const Akonadi::Item::List &items)
{
d->mList = items;
}
MessageViewerCheckBeforeDeletingParameters::DeleteType MessageViewerCheckBeforeDeletingParameters::deleteType() const
{
return d->mType;
......@@ -45,11 +56,12 @@ MessageViewerCheckBeforeDeletingParameters &MessageViewerCheckBeforeDeletingPara
{
if (this != &other) {
d->mType = other.deleteType();
d->mList = other.items();
}
return *this;
}
bool MessageViewerCheckBeforeDeletingParameters::operator==(const MessageViewerCheckBeforeDeletingParameters &other) const
{
return (d->mType == other.deleteType());
return (d->mType == other.deleteType()) && (d->mList == other.items());
}
......@@ -6,6 +6,7 @@
#pragma once
#include "messageviewer_export.h"
#include <AkonadiCore/Item>
#include <QString>
namespace MessageViewer
{
......@@ -29,6 +30,9 @@ public:
MessageViewerCheckBeforeDeletingParameters &operator=(const MessageViewerCheckBeforeDeletingParameters &other);
Q_REQUIRED_RESULT bool operator==(const MessageViewerCheckBeforeDeletingParameters &other) const;
Q_REQUIRED_RESULT Akonadi::Item::List items() const;
void setItems(const Akonadi::Item::List &items);
private:
MessageViewerCheckBeforeDeletingParametersPrivate *const d;
};
......
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