Commit d3a57eb0 authored by Laurent Montel's avatar Laurent Montel 😁

Adapt to new api

parent 742ece22
...@@ -69,7 +69,7 @@ set(KDEPIMLIBS_LIB_VERSION "5.2.40") ...@@ -69,7 +69,7 @@ set(KDEPIMLIBS_LIB_VERSION "5.2.40")
set(GRAVATAR_LIB_VERSION "5.2.40") set(GRAVATAR_LIB_VERSION "5.2.40")
set(INCIDENCEEDITOR_LIB_VERSION "5.2.40") set(INCIDENCEEDITOR_LIB_VERSION "5.2.40")
set(KTNEF_LIB_VERSION "5.2.40") set(KTNEF_LIB_VERSION "5.2.40")
set(MESSAGELIB_LIB_VERSION "5.2.70") set(MESSAGELIB_LIB_VERSION "5.2.71")
set(AKONADICALENDAR_LIB_VERSION "5.2.40") set(AKONADICALENDAR_LIB_VERSION "5.2.40")
find_package(KF5WebEngineViewer ${MESSAGELIB_LIB_VERSION} CONFIG REQUIRED) find_package(KF5WebEngineViewer ${MESSAGELIB_LIB_VERSION} CONFIG REQUIRED)
......
...@@ -35,8 +35,8 @@ ConfirmAddressInterfaceTest::~ConfirmAddressInterfaceTest() ...@@ -35,8 +35,8 @@ ConfirmAddressInterfaceTest::~ConfirmAddressInterfaceTest()
void ConfirmAddressInterfaceTest::shouldHaveDefaultValue() void ConfirmAddressInterfaceTest::shouldHaveDefaultValue()
{ {
ConfirmAddressInterface interface; //ConfirmAddressInterface interface;
QVERIFY(interface.hasConfigureDialog()); //QVERIFY(interface.hasConfigureDialog());
} }
QTEST_MAIN(ConfirmAddressInterfaceTest) QTEST_MAIN(ConfirmAddressInterfaceTest)
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
*/ */
#include "confirmaddressplugintest.h" #include "confirmaddressplugintest.h"
#include "../confirmaddressplugin.h"
#include <QTest> #include <QTest>
ConfirmAddressPluginTest::ConfirmAddressPluginTest(QObject *parent) ConfirmAddressPluginTest::ConfirmAddressPluginTest(QObject *parent)
...@@ -31,4 +32,10 @@ ConfirmAddressPluginTest::~ConfirmAddressPluginTest() ...@@ -31,4 +32,10 @@ ConfirmAddressPluginTest::~ConfirmAddressPluginTest()
} }
void ConfirmAddressPluginTest::shouldHaveDefaultValue()
{
ConfirmAddressPlugin plugin;
QVERIFY(plugin.hasConfigureDialog());
}
QTEST_MAIN(ConfirmAddressPluginTest) QTEST_MAIN(ConfirmAddressPluginTest)
...@@ -28,6 +28,8 @@ class ConfirmAddressPluginTest : public QObject ...@@ -28,6 +28,8 @@ class ConfirmAddressPluginTest : public QObject
public: public:
explicit ConfirmAddressPluginTest(QObject *parent = Q_NULLPTR); explicit ConfirmAddressPluginTest(QObject *parent = Q_NULLPTR);
~ConfirmAddressPluginTest(); ~ConfirmAddressPluginTest();
private Q_SLOTS:
void shouldHaveDefaultValue();
}; };
#endif // CONFIRMADDRESSPLUGINTEST_H #endif // CONFIRMADDRESSPLUGINTEST_H
...@@ -37,15 +37,3 @@ bool ConfirmAddressInterface::exec() ...@@ -37,15 +37,3 @@ bool ConfirmAddressInterface::exec()
//TODO //TODO
return true; return true;
} }
bool ConfirmAddressInterface::hasConfigureDialog() const
{
return true;
}
MessageComposer::PluginEditorCheckBeforeSendConfigureWidget *ConfirmAddressInterface::createConfigureWidget(QWidget *parent) const
{
return new ConfirmAddressConfigureWidget(parent);
}
...@@ -29,10 +29,6 @@ public: ...@@ -29,10 +29,6 @@ public:
explicit ConfirmAddressInterface(QObject *parent = Q_NULLPTR); explicit ConfirmAddressInterface(QObject *parent = Q_NULLPTR);
~ConfirmAddressInterface(); ~ConfirmAddressInterface();
bool exec() Q_DECL_OVERRIDE; bool exec() Q_DECL_OVERRIDE;
bool hasConfigureDialog() const Q_DECL_OVERRIDE;
MessageComposer::PluginEditorCheckBeforeSendConfigureWidget *createConfigureWidget(QWidget *parent) const Q_DECL_OVERRIDE;
}; };
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "confirmaddressplugin.h" #include "confirmaddressplugin.h"
#include "confirmaddressinterface.h" #include "confirmaddressinterface.h"
#include "confirmaddressconfigurewidget.h"
#include <KLocalizedString> #include <KLocalizedString>
#include <kpluginfactory.h> #include <kpluginfactory.h>
...@@ -43,4 +44,18 @@ MessageComposer::PluginEditorCheckBeforeSendInterface *ConfirmAddressPlugin::cre ...@@ -43,4 +44,18 @@ MessageComposer::PluginEditorCheckBeforeSendInterface *ConfirmAddressPlugin::cre
return interface; return interface;
} }
bool ConfirmAddressPlugin::hasConfigureDialog() const
{
return true;
}
MessageComposer::PluginEditorCheckBeforeSendConfigureWidgetSetting ConfirmAddressPlugin::createConfigureWidget(QWidget *parent) const
{
MessageComposer::PluginEditorCheckBeforeSendConfigureWidgetSetting settings;
ConfirmAddressConfigureWidget *w = new ConfirmAddressConfigureWidget(parent);
settings.configureWidget = w;
settings.name = i18n("Confirm Addresses");
return settings;
}
#include "confirmaddressplugin.moc" #include "confirmaddressplugin.moc"
...@@ -31,6 +31,10 @@ public: ...@@ -31,6 +31,10 @@ public:
~ConfirmAddressPlugin(); ~ConfirmAddressPlugin();
MessageComposer::PluginEditorCheckBeforeSendInterface *createInterface(QObject *parent) Q_DECL_OVERRIDE; MessageComposer::PluginEditorCheckBeforeSendInterface *createInterface(QObject *parent) Q_DECL_OVERRIDE;
bool hasConfigureDialog() const Q_DECL_OVERRIDE;
MessageComposer::PluginEditorCheckBeforeSendConfigureWidgetSetting createConfigureWidget(QWidget *parent) const Q_DECL_OVERRIDE;
}; };
#endif // CONFIRMADDRESSPLUGIN_H #endif // CONFIRMADDRESSPLUGIN_H
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