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