Commit 7a7ca197 authored by Laurent Montel's avatar Laurent Montel 😁

Generate plugin

parent eea3ee20
set(mailtransport_smtpplugin_SRCS
smtpmailtransportplugin.cpp
)
kcoreaddons_add_plugin(mailtransport_smtpplugin JSON smtpmailtransport.json SOURCES
${mailtransport_smtpplugin_SRCS} INSTALL_NAMESPACE mailtransport)
target_link_libraries(mailtransport_smtpplugin
KF5::MailTransport KF5::CoreAddons
)
......@@ -18,8 +18,12 @@
*/
#include "smtpmailtransportplugin.h"
#include <kpluginfactory.h>
SMTPMailTransportPlugin::SMTPMailTransportPlugin(QObject *parent)
K_PLUGIN_FACTORY_WITH_JSON(SMTPMailTransportPluginFactory, "smtpmailtransport.json", registerPlugin<SMTPMailTransportPlugin>();
)
SMTPMailTransportPlugin::SMTPMailTransportPlugin(QObject *parent, const QList<QVariant> &)
: MailTransport::TransportAbstractPlugin(parent)
{
......@@ -44,5 +48,8 @@ bool SMTPMailTransportPlugin::configureTransport(MailTransport::Transport *trans
void SMTPMailTransportPlugin::cleanUp(const QString &identifier)
{
Q_UNUSED(identifier);
//TODO FIXME
}
#include "smtpmailtransportplugin.moc"
......@@ -21,12 +21,13 @@
#define SMTPMAILTRANSPORTPLUGIN_H
#include <MailTransport/TransportAbstractPlugin>
#include <QVariant>
class SMTPMailTransportPlugin : public MailTransport::TransportAbstractPlugin
{
Q_OBJECT
public:
explicit SMTPMailTransportPlugin(QObject *parent = nullptr);
explicit SMTPMailTransportPlugin(QObject *parent = nullptr, const QList<QVariant> & = {});
~SMTPMailTransportPlugin();
QString name() const override;
......
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