Commit ff3a43e8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

In kf6 kde4 migration code will be removed

parent ea4183bc
Pipeline #58993 passed with stage
in 22 minutes and 26 seconds
......@@ -17,18 +17,21 @@
#include <QDBusConnection>
#include <QTimer>
#include <Session>
#include <kcoreaddons_version.h>
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <Kdelibs4ConfigMigrator>
#endif
//#define DEBUG_ARCHIVEMAILAGENT 1
ArchiveMailAgent::ArchiveMailAgent(const QString &id)
: Akonadi::AgentBase(id)
, mArchiveManager(new ArchiveMailManager(this))
{
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(6, 0, 0)
Kdelibs4ConfigMigrator migrate(QStringLiteral("archivemailagent"));
migrate.setConfigFiles(QStringList() << QStringLiteral("akonadi_archivemail_agentrc") << QStringLiteral("akonadi_archivemail_agent.notifyrc"));
migrate.migrate();
#endif
connect(this, &Akonadi::AgentBase::reloadConfiguration, this, &ArchiveMailAgent::reload);
......
......@@ -20,8 +20,10 @@
#include <AkonadiCore/CollectionFetchScope>
#include <AkonadiCore/ServerManager>
#include <AkonadiCore/Session>
#include <kcoreaddons_version.h>
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <Kdelibs4ConfigMigrator>
#endif
#include "followupreminderagent_debug.h"
#include <QTimer>
......@@ -29,9 +31,11 @@ FollowUpReminderAgent::FollowUpReminderAgent(const QString &id)
: Akonadi::AgentBase(id)
, mManager(new FollowUpReminderManager(this))
{
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(6, 0, 0)
Kdelibs4ConfigMigrator migrate(QStringLiteral("followupreminderagent"));
migrate.setConfigFiles(QStringList() << QStringLiteral("akonadi_followupreminder_agentrc") << QStringLiteral("akonadi_followupreminder_agent.notifyrc"));
migrate.migrate();
#endif
new FollowUpReminderAgentAdaptor(this);
QDBusConnection::sessionBus().registerObject(QStringLiteral("/FollowUpReminder"), this, QDBusConnection::ExportAdaptors);
......
......@@ -36,8 +36,10 @@
#include <KSharedConfig>
#include <QTimer>
#include <kcoreaddons_version.h>
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <Kdelibs4ConfigMigrator>
#endif
bool MailFilterAgent::isFilterableCollection(const Akonadi::Collection &collection) const
{
if (!collection.contentMimeTypes().contains(KMime::Message::mimeType())) {
......@@ -52,9 +54,11 @@ bool MailFilterAgent::isFilterableCollection(const Akonadi::Collection &collecti
MailFilterAgent::MailFilterAgent(const QString &id)
: Akonadi::AgentBase(id)
{
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(6, 0, 0)
Kdelibs4ConfigMigrator migrate(QStringLiteral("mailfilteragent"));
migrate.setConfigFiles(QStringList() << QStringLiteral("akonadi_mailfilter_agentrc") << QStringLiteral("akonadi_mailfilter_agent.notifyrc"));
migrate.migrate();
#endif
Akonadi::AttributeFactory::registerAttribute<Akonadi::Pop3ResourceAttribute>();
mMailFilterKernel = new DummyKernel(this);
......
......@@ -26,8 +26,10 @@
#include <itemfetchscope.h>
#include <KWindowSystem>
#include <kcoreaddons_version.h>
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <Kdelibs4ConfigMigrator>
#endif
#include <QPointer>
//#define DEBUG_SENDLATERAGENT 1
......@@ -36,9 +38,11 @@ SendLaterAgent::SendLaterAgent(const QString &id)
: Akonadi::AgentBase(id)
, mManager(new SendLaterManager(this))
{
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(6, 0, 0)
Kdelibs4ConfigMigrator migrate(QStringLiteral("sendlateragent"));
migrate.setConfigFiles(QStringList() << QStringLiteral("akonadi_sendlater_agentrc") << QStringLiteral("akonadi_sendlater_agent.notifyrc"));
migrate.migrate();
#endif
connect(mManager, &SendLaterManager::needUpdateConfigDialogBox, this, &SendLaterAgent::needUpdateConfigDialogBox);
new SendLaterAgentAdaptor(this);
......
......@@ -18,7 +18,10 @@
#include <KCrash>
#include <KDBusService>
#include <KLocalizedString>
#include <kcoreaddons_version.h>
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <Kdelibs4ConfigMigrator>
#endif
#include <QApplication>
#include <QCommandLineParser>
......@@ -29,10 +32,12 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
KLocalizedString::setApplicationDomain("ktnef");
KCrash::initialize();
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(6, 0, 0)
Kdelibs4ConfigMigrator migrate(QStringLiteral("ktnef"));
migrate.setConfigFiles(QStringList() << QStringLiteral("ktnefrc"));
migrate.setUiFiles(QStringList() << QStringLiteral("ktnefui.rc"));
migrate.migrate();
#endif
KAboutData aboutData(QStringLiteral("ktnef"),
i18n("KTnef"),
......
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