summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-22 11:28:46 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-22 11:58:28 (GMT)
commit33888e345a649990c200727e7c77e5588dac2914 (patch)
tree2e6944ad6023e672e26a3d2ca29eda2b9c788b82
parentcb17676fd4950f0612012fb27cd862ef30e70967 (diff)
Adapt to new api
-rw-r--r--CMakeLists.txt2
-rw-r--r--messagecomposer/src/plugineditor/plugineditor.cpp17
-rw-r--r--messagecomposer/src/plugineditor/plugineditor.h9
-rw-r--r--messagecomposer/src/plugineditor/plugineditorinterface.cpp27
-rw-r--r--messagecomposer/src/plugineditor/plugineditorinterface.h14
-rw-r--r--messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.h1
6 files changed, 7 insertions, 63 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9388031..d116cb9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,7 +18,7 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
-set(PIM_VERSION "5.3.60")
+set(PIM_VERSION "5.3.61")
set(MESSAGELIB_LIB_VERSION ${PIM_VERSION})
set(AKONADIMIME_LIB_VERSION "5.3.40")
diff --git a/messagecomposer/src/plugineditor/plugineditor.cpp b/messagecomposer/src/plugineditor/plugineditor.cpp
index 381a966..7281cf6 100644
--- a/messagecomposer/src/plugineditor/plugineditor.cpp
+++ b/messagecomposer/src/plugineditor/plugineditor.cpp
@@ -33,7 +33,7 @@ public:
};
PluginEditor::PluginEditor(QObject *parent)
- : QObject(parent),
+ : PimCommon::AbstractGenericPlugin(parent),
d(new PluginEditorPrivate)
{
@@ -53,18 +53,3 @@ int PluginEditor::order() const
{
return d->order;
}
-
-bool PluginEditor::hasPopupMenuSupport() const
-{
- return false;
-}
-
-bool PluginEditor::hasConfigureDialog() const
-{
- return false;
-}
-
-bool PluginEditor::hasToolBarSupport() const
-{
- return false;
-}
diff --git a/messagecomposer/src/plugineditor/plugineditor.h b/messagecomposer/src/plugineditor/plugineditor.h
index 8308e78..fd7cde7 100644
--- a/messagecomposer/src/plugineditor/plugineditor.h
+++ b/messagecomposer/src/plugineditor/plugineditor.h
@@ -21,25 +21,20 @@
#define PLUGINEDITOR_H
#include <QObject>
#include "messagecomposer_export.h"
-
+#include <PimCommon/AbstractGenericPlugin>
class KActionCollection;
namespace MessageComposer
{
class PluginEditorInterface;
class PluginEditorPrivate;
-class MESSAGECOMPOSER_EXPORT PluginEditor : public QObject
+class MESSAGECOMPOSER_EXPORT PluginEditor : public PimCommon::AbstractGenericPlugin
{
Q_OBJECT
public:
explicit PluginEditor(QObject *parent = Q_NULLPTR);
~PluginEditor();
void setOrder(int order);
-
- virtual PluginEditorInterface *createInterface(KActionCollection *ac, QObject *parent = Q_NULLPTR) = 0;
int order() const;
- virtual bool hasPopupMenuSupport() const;
- virtual bool hasConfigureDialog() const;
- virtual bool hasToolBarSupport() const;
private:
PluginEditorPrivate *const d;
diff --git a/messagecomposer/src/plugineditor/plugineditorinterface.cpp b/messagecomposer/src/plugineditor/plugineditorinterface.cpp
index 41d786d..d366eb7 100644
--- a/messagecomposer/src/plugineditor/plugineditorinterface.cpp
+++ b/messagecomposer/src/plugineditor/plugineditorinterface.cpp
@@ -61,7 +61,7 @@ public:
};
PluginEditorInterface::PluginEditorInterface(QObject *parent)
- : QObject(parent),
+ : PimCommon::AbstractGenericPluginInterface(parent),
d(new MessageComposer::PluginEditorInterfacePrivate)
{
@@ -82,26 +82,6 @@ ActionType PluginEditorInterface::actionType() const
return d->mActionType;
}
-void PluginEditorInterface::setPlugin(PluginEditor *plugin)
-{
- d->plugin = plugin;
-}
-
-PluginEditor *PluginEditorInterface::plugin() const
-{
- return d->plugin;
-}
-
-void PluginEditorInterface::setParentWidget(QWidget *parent)
-{
- d->mParentWidget = parent;
-}
-
-QWidget *PluginEditorInterface::parentWidget() const
-{
- return d->mParentWidget;
-}
-
KPIMTextEdit::RichTextEditor *PluginEditorInterface::richTextEditor() const
{
return d->mRichTextEditor;
@@ -112,11 +92,6 @@ void PluginEditorInterface::setRichTextEditor(KPIMTextEdit::RichTextEditor *rich
d->mRichTextEditor = richTextEditor;
}
-void PluginEditorInterface::showConfigureDialog(QWidget *parentWidget)
-{
- Q_UNUSED(parentWidget);
-}
-
QString PluginEditorInterface::actionXmlExtension(ActionType::Type type)
{
switch (type) {
diff --git a/messagecomposer/src/plugineditor/plugineditorinterface.h b/messagecomposer/src/plugineditor/plugineditorinterface.h
index 14eaf5c..7fb3cd8 100644
--- a/messagecomposer/src/plugineditor/plugineditorinterface.h
+++ b/messagecomposer/src/plugineditor/plugineditorinterface.h
@@ -21,6 +21,7 @@
#define PLUGINEDITORINTERFACE_H
#include <QObject>
+#include <PimCommon/AbstractGenericPluginInterface>
#include "messagecomposer_export.h"
class QAction;
class KActionCollection;
@@ -57,7 +58,7 @@ private:
class PluginEditorInterfacePrivate;
class PluginEditor;
-class MESSAGECOMPOSER_EXPORT PluginEditorInterface : public QObject
+class MESSAGECOMPOSER_EXPORT PluginEditorInterface : public PimCommon::AbstractGenericPluginInterface
{
Q_OBJECT
public:
@@ -67,20 +68,9 @@ public:
void setActionType(const ActionType &type);
ActionType actionType() const;
- virtual void createAction(KActionCollection *ac) = 0;
- virtual void exec() = 0;
-
- void setPlugin(PluginEditor *plugin);
- PluginEditor *plugin() const;
-
- void setParentWidget(QWidget *parent);
- QWidget *parentWidget() const;
-
KPIMTextEdit::RichTextEditor *richTextEditor() const;
void setRichTextEditor(KPIMTextEdit::RichTextEditor *richTextEditor);
- virtual void showConfigureDialog(QWidget *parentWidget = Q_NULLPTR);
-
static QString actionXmlExtension(ActionType::Type type);
Q_SIGNALS:
void emitPluginActivated(MessageComposer::PluginEditorInterface *interface);
diff --git a/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.h b/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.h
index 925100e..0bd24ff 100644
--- a/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.h
+++ b/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.h
@@ -32,7 +32,6 @@ class IdentityManager;
namespace MessageComposer
{
class PluginEditorCheckBeforeSendInterfacePrivate;
-class PluginEditorCheckBeforeSendConfigureWidget;
class PluginEditorCheckBeforeSendParams;
class MESSAGECOMPOSER_EXPORT PluginEditorCheckBeforeSendInterface : public QObject
{