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

Fix plugin api

parent b5a8ba6f
Pipeline #67823 passed with stage
in 41 minutes and 16 seconds
cmake_minimum_required(VERSION 3.16 FATAL_ERROR) cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
set(PIM_VERSION "5.17.53") set(PIM_VERSION "5.17.54")
project(Messagelib VERSION ${PIM_VERSION}) project(Messagelib VERSION ${PIM_VERSION})
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
#pragma once #pragma once
#include "messageviewer_export.h" #include "messageviewer_export.h"
#include <AkonadiCore/Item>
#include <QObject> #include <QObject>
namespace MessageViewer namespace MessageViewer
{ {
class MessageViewerCheckBeforeDeletingParameters; class MessageViewerCheckBeforeDeletingParameters;
...@@ -27,7 +27,7 @@ public: ...@@ -27,7 +27,7 @@ public:
void setParentWidget(QWidget *parent); void setParentWidget(QWidget *parent);
Q_REQUIRED_RESULT QWidget *parentWidget() const; Q_REQUIRED_RESULT QWidget *parentWidget() const;
virtual bool exec() = 0; virtual bool exec(Akonadi::Item::List &list) = 0;
void setParameters(const MessageViewer::MessageViewerCheckBeforeDeletingParameters &params); void setParameters(const MessageViewer::MessageViewerCheckBeforeDeletingParameters &params);
Q_REQUIRED_RESULT MessageViewer::MessageViewerCheckBeforeDeletingParameters parameters() const; Q_REQUIRED_RESULT MessageViewer::MessageViewerCheckBeforeDeletingParameters parameters() const;
......
...@@ -65,3 +65,8 @@ bool MessageViewerCheckBeforeDeletingParameters::operator==(const MessageViewerC ...@@ -65,3 +65,8 @@ bool MessageViewerCheckBeforeDeletingParameters::operator==(const MessageViewerC
{ {
return (d->mType == other.deleteType()) && (d->mList == other.items()); return (d->mType == other.deleteType()) && (d->mList == other.items());
} }
bool MessageViewerCheckBeforeDeletingParameters::isValid() const
{
return !d->mList.isEmpty() && (d->mType != Unknown);
}
...@@ -33,6 +33,8 @@ public: ...@@ -33,6 +33,8 @@ public:
Q_REQUIRED_RESULT Akonadi::Item::List items() const; Q_REQUIRED_RESULT Akonadi::Item::List items() const;
void setItems(const Akonadi::Item::List &items); void setItems(const Akonadi::Item::List &items);
Q_REQUIRED_RESULT bool isValid() const;
private: private:
MessageViewerCheckBeforeDeletingParametersPrivate *const d; 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