Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 0045aa2e authored by Laurent Montel's avatar Laurent Montel 😁

Port to new macro which will be avaailable in 5.44

parent 2ee3d033
......@@ -22,9 +22,13 @@
#include "smtpjob.h"
#include <kpluginfactory.h>
#include <KLocalizedString>
#include <kcoreaddons_version.h>
K_PLUGIN_FACTORY_WITH_JSON(SMTPMailTransportPluginFactory, "smtpmailtransport.json", registerPlugin<SMTPMailTransportPlugin>();
)
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(5, 44, 0)
#define K_PLUGIN_CLASS_WITH_JSON(classname, json) K_PLUGIN_FACTORY_WITH_JSON(classname ## Factory, json, registerPlugin<classname >();)
#endif
K_PLUGIN_CLASS_WITH_JSON(SMTPMailTransportPlugin, "smtpmailtransport.json")
SMTPMailTransportPlugin::SMTPMailTransportPlugin(QObject *parent, const QList<QVariant> &)
: MailTransport::TransportAbstractPlugin(parent)
......
......@@ -27,8 +27,12 @@
#include <MailTransport/Transport>
using namespace Akonadi;
K_PLUGIN_FACTORY_WITH_JSON(AkonadiMailTransportPluginFactory, "akonadimailtransport.json", registerPlugin<AkonadiMailTransportPlugin>();
)
#include <kcoreaddons_version.h>
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(5, 44, 0)
#define K_PLUGIN_CLASS_WITH_JSON(classname, json) K_PLUGIN_FACTORY_WITH_JSON(classname ## Factory, json, registerPlugin<classname >();)
#endif
K_PLUGIN_CLASS_WITH_JSON(AkonadiMailTransportPlugin, "akonadimailtransport.json")
AkonadiMailTransportPlugin::AkonadiMailTransportPlugin(QObject *parent, const QList<QVariant> &)
: MailTransport::TransportAbstractPlugin(parent)
......@@ -85,7 +89,7 @@ bool AkonadiMailTransportPlugin::configureTransport(const QString &identifier, M
qCWarning(MAILTRANSPORT_AKONADI_LOG) << "Invalid resource instance" << transport->host();
}
instance.configure(parent); // Async...
transport->writeConfig();
transport->save();
return true; // No way to know here if the user cancelled or not.
}
......
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