Commit 0ff6e312 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Rename class here too

parent 1ca43297
......@@ -5,12 +5,12 @@ include_directories(
set(pimdataexporter_calendar_SRCS
calendar/exportcalendarjobinterface.cpp
calendar/importcalendarjob.cpp
calendar/importcalendarjobinterface.cpp
)
set(pimdataexporter_addressbook_SRCS
addressbook/exportaddressbookjob.cpp
addressbook/importaddressbookjob.cpp
addressbook/exportaddressbookjobinterface.cpp
addressbook/importaddressbookjobinterface.cpp
)
set(pimdataexporter_mail_SRCS
......@@ -20,8 +20,8 @@ set(pimdataexporter_mail_SRCS
)
set(pimdataexporter_alarm_SRCS
alarm/exportalarmjob.cpp
alarm/importalarmjob.cpp
alarm/exportalarmjobinterface.cpp
alarm/importalarmjobinterface.cpp
)
set(pimdataexporter_interfaces_SRCS
......
......@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
#include "exportaddressbookjob.h"
#include "exportaddressbookjobinterface.h"
#include "exportresourcearchivejob.h"
#include <AkonadiCore/AgentManager>
......@@ -32,36 +32,36 @@
#include <QTimer>
#include "resourceconverterimpl.h"
ExportAddressbookJob::ExportAddressbookJob(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
ExportAddressbookJobInterface::ExportAddressbookJobInterface(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
: AbstractImportExportJob(parent, archiveStorage, typeSelected, numberOfStep)
{
}
ExportAddressbookJob::~ExportAddressbookJob()
ExportAddressbookJobInterface::~ExportAddressbookJobInterface()
{
}
void ExportAddressbookJob::start()
void ExportAddressbookJobInterface::start()
{
Q_EMIT title(i18n("Start export KAddressBook settings..."));
createProgressDialog(i18n("Export KAddressBook settings"));
if (mTypeSelected & Utils::Resources) {
QTimer::singleShot(0, this, &ExportAddressbookJob::slotCheckBackupResource);
QTimer::singleShot(0, this, &ExportAddressbookJobInterface::slotCheckBackupResource);
} else if (mTypeSelected & Utils::Config) {
QTimer::singleShot(0, this, &ExportAddressbookJob::slotCheckBackupConfig);
QTimer::singleShot(0, this, &ExportAddressbookJobInterface::slotCheckBackupConfig);
} else {
Q_EMIT jobFinished();
}
}
void ExportAddressbookJob::slotCheckBackupResource()
void ExportAddressbookJobInterface::slotCheckBackupResource()
{
setProgressDialogLabel(i18n("Backing up resources..."));
increaseProgressDialog();
QTimer::singleShot(0, this, &ExportAddressbookJob::slotWriteNextArchiveResource);
QTimer::singleShot(0, this, &ExportAddressbookJobInterface::slotWriteNextArchiveResource);
}
void ExportAddressbookJob::slotCheckBackupConfig()
void ExportAddressbookJobInterface::slotCheckBackupConfig()
{
if (mTypeSelected & Utils::Config) {
backupConfig();
......@@ -74,17 +74,17 @@ void ExportAddressbookJob::slotCheckBackupConfig()
Q_EMIT jobFinished();
}
void ExportAddressbookJob::slotAddressbookJobTerminated()
void ExportAddressbookJobInterface::slotAddressbookJobTerminated()
{
if (wasCanceled()) {
Q_EMIT jobFinished();
return;
}
mIndexIdentifier++;
QTimer::singleShot(0, this, &ExportAddressbookJob::slotWriteNextArchiveResource);
QTimer::singleShot(0, this, &ExportAddressbookJobInterface::slotWriteNextArchiveResource);
}
void ExportAddressbookJob::slotWriteNextArchiveResource()
void ExportAddressbookJobInterface::slotWriteNextArchiveResource()
{
Akonadi::AgentManager *manager = Akonadi::AgentManager::self();
const Akonadi::AgentInstance::List list = manager->instances();
......@@ -105,30 +105,30 @@ void ExportAddressbookJob::slotWriteNextArchiveResource()
resourceJob->setIdentifier(identifier);
resourceJob->setArchive(archive());
resourceJob->setArchiveName(QStringLiteral("addressbook.zip"));
connect(resourceJob, &ExportResourceArchiveJob::error, this, &ExportAddressbookJob::error);
connect(resourceJob, &ExportResourceArchiveJob::info, this, &ExportAddressbookJob::info);
connect(resourceJob, &ExportResourceArchiveJob::terminated, this, &ExportAddressbookJob::slotAddressbookJobTerminated);
connect(resourceJob, &ExportResourceArchiveJob::error, this, &ExportAddressbookJobInterface::error);
connect(resourceJob, &ExportResourceArchiveJob::info, this, &ExportAddressbookJobInterface::info);
connect(resourceJob, &ExportResourceArchiveJob::terminated, this, &ExportAddressbookJobInterface::slotAddressbookJobTerminated);
resourceJob->start();
} else {
qCDebug(PIMDATAEXPORTERCORE_LOG) << "Url is empty for " << identifier;
QTimer::singleShot(0, this, &ExportAddressbookJob::slotAddressbookJobTerminated);
QTimer::singleShot(0, this, &ExportAddressbookJobInterface::slotAddressbookJobTerminated);
}
} else {
QTimer::singleShot(0, this, &ExportAddressbookJob::slotAddressbookJobTerminated);
QTimer::singleShot(0, this, &ExportAddressbookJobInterface::slotAddressbookJobTerminated);
}
} else if (identifier.contains(QLatin1String("akonadi_vcard_resource_"))) {
backupResourceFile(agent, Utils::addressbookPath());
QTimer::singleShot(0, this, &ExportAddressbookJob::slotAddressbookJobTerminated);
QTimer::singleShot(0, this, &ExportAddressbookJobInterface::slotAddressbookJobTerminated);
} else {
QTimer::singleShot(0, this, &ExportAddressbookJob::slotAddressbookJobTerminated);
QTimer::singleShot(0, this, &ExportAddressbookJobInterface::slotAddressbookJobTerminated);
}
} else {
Q_EMIT info(i18n("Resources backup done."));
QTimer::singleShot(0, this, &ExportAddressbookJob::slotCheckBackupConfig);
QTimer::singleShot(0, this, &ExportAddressbookJobInterface::slotCheckBackupConfig);
}
}
void ExportAddressbookJob::backupConfig()
void ExportAddressbookJobInterface::backupConfig()
{
setProgressDialogLabel(i18n("Backing up config..."));
......
......@@ -24,12 +24,12 @@
#include "pimdataexportercore_private_export.h"
class ArchiveStorage;
class PIMDATAEXPORTER_TESTS_EXPORT ExportAddressbookJob : public AbstractImportExportJob
class PIMDATAEXPORTER_TESTS_EXPORT ExportAddressbookJobInterface : public AbstractImportExportJob
{
Q_OBJECT
public:
explicit ExportAddressbookJob(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep);
~ExportAddressbookJob() override;
explicit ExportAddressbookJobInterface(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep);
~ExportAddressbookJobInterface() override;
void start() override;
......
......@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
#include "importaddressbookjob.h"
#include "importaddressbookjobinterface.h"
#include "archivestorage.h"
#include <PimCommonAkonadi/CreateResource>
......@@ -40,27 +40,27 @@ inline const QString storeAddressbook()
}
}
ImportAddressbookJob::ImportAddressbookJob(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
ImportAddressbookJobInterface::ImportAddressbookJobInterface(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
: AbstractImportExportJob(parent, archiveStorage, typeSelected, numberOfStep)
{
initializeImportJob();
}
ImportAddressbookJob::~ImportAddressbookJob()
ImportAddressbookJobInterface::~ImportAddressbookJobInterface()
{
}
void ImportAddressbookJob::start()
void ImportAddressbookJobInterface::start()
{
Q_EMIT title(i18n("Starting to import KAddressBook settings..."));
mArchiveDirectory = archive()->directory();
createProgressDialog(i18n("Import KAddressBook settings"));
searchAllFiles(mArchiveDirectory, QString(), QStringLiteral("addressbook"));
initializeListStep();
QTimer::singleShot(0, this, &ImportAddressbookJob::slotNextStep);
QTimer::singleShot(0, this, &ImportAddressbookJobInterface::slotNextStep);
}
void ImportAddressbookJob::slotNextStep()
void ImportAddressbookJobInterface::slotNextStep()
{
++mIndex;
if (mIndex < mListStep.count()) {
......@@ -75,7 +75,7 @@ void ImportAddressbookJob::slotNextStep()
}
}
void ImportAddressbookJob::restoreResources()
void ImportAddressbookJobInterface::restoreResources()
{
Q_EMIT info(i18n("Restore resources..."));
setProgressDialogLabel(i18n("Restore resources..."));
......@@ -151,7 +151,7 @@ void ImportAddressbookJob::restoreResources()
startSynchronizeResources(listResource);
}
void ImportAddressbookJob::addSpecificResourceSettings(const KSharedConfig::Ptr &resourceConfig, const QString &resourceName, QMap<QString, QVariant> &settings)
void ImportAddressbookJobInterface::addSpecificResourceSettings(const KSharedConfig::Ptr &resourceConfig, const QString &resourceName, QMap<QString, QVariant> &settings)
{
if (resourceName == QLatin1String("akonadi_vcard_resource")) {
KConfigGroup general = resourceConfig->group(QStringLiteral("General"));
......@@ -167,14 +167,14 @@ void ImportAddressbookJob::addSpecificResourceSettings(const KSharedConfig::Ptr
}
}
bool ImportAddressbookJob::isAConfigFile(const QString &name) const
bool ImportAddressbookJobInterface::isAConfigFile(const QString &name) const
{
return name.endsWith(QLatin1String("rc")) && (name.startsWith(QLatin1String("akonadi_vcarddir_resource_"))
|| name.startsWith(QLatin1String("akonadi_vcard_resource_"))
|| name.startsWith(QLatin1String("akonadi_contacts_resource_")));
}
void ImportAddressbookJob::restoreConfig()
void ImportAddressbookJobInterface::restoreConfig()
{
increaseProgressDialog();
setProgressDialogLabel(i18n("Restore configs..."));
......@@ -193,10 +193,10 @@ void ImportAddressbookJob::restoreConfig()
}
restoreUiRcFile(QStringLiteral("kaddressbookui.rc"), QStringLiteral("kaddressbook"));
Q_EMIT info(i18n("Config restored."));
QTimer::singleShot(0, this, &ImportAddressbookJob::slotNextStep);
QTimer::singleShot(0, this, &ImportAddressbookJobInterface::slotNextStep);
}
void ImportAddressbookJob::importkaddressBookConfig(const KArchiveFile *file, const QString &config, const QString &filename, const QString &prefix)
void ImportAddressbookJobInterface::importkaddressBookConfig(const KArchiveFile *file, const QString &config, const QString &filename, const QString &prefix)
{
copyToFile(file, config, filename, prefix);
KSharedConfig::Ptr kaddressBookConfig = KSharedConfig::openConfig(config);
......
......@@ -25,12 +25,12 @@
class ArchiveStorage;
class KArchiveFile;
class PIMDATAEXPORTER_TESTS_EXPORT ImportAddressbookJob : public AbstractImportExportJob
class PIMDATAEXPORTER_TESTS_EXPORT ImportAddressbookJobInterface : public AbstractImportExportJob
{
Q_OBJECT
public:
explicit ImportAddressbookJob(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep);
~ImportAddressbookJob() override;
explicit ImportAddressbookJobInterface(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep);
~ImportAddressbookJobInterface() override;
void start() override;
......
......@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
#include "exportalarmjob.h"
#include "exportalarmjobinterface.h"
#include <AkonadiCore/AgentManager>
......@@ -33,36 +33,36 @@
#include <exportresourcearchivejob.h>
#include "resourceconverterimpl.h"
ExportAlarmJob::ExportAlarmJob(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
ExportAlarmJobInterface::ExportAlarmJobInterface(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
: AbstractImportExportJob(parent, archiveStorage, typeSelected, numberOfStep)
{
}
ExportAlarmJob::~ExportAlarmJob()
ExportAlarmJobInterface::~ExportAlarmJobInterface()
{
}
void ExportAlarmJob::start()
void ExportAlarmJobInterface::start()
{
Q_EMIT title(i18n("Start export KAlarm settings..."));
createProgressDialog(i18n("Export KAlarm settings"));
if (mTypeSelected & Utils::Resources) {
QTimer::singleShot(0, this, &ExportAlarmJob::slotCheckBackupResource);
QTimer::singleShot(0, this, &ExportAlarmJobInterface::slotCheckBackupResource);
} else if (mTypeSelected & Utils::Config) {
QTimer::singleShot(0, this, &ExportAlarmJob::slotCheckBackupConfig);
QTimer::singleShot(0, this, &ExportAlarmJobInterface::slotCheckBackupConfig);
} else {
Q_EMIT jobFinished();
}
}
void ExportAlarmJob::slotCheckBackupResource()
void ExportAlarmJobInterface::slotCheckBackupResource()
{
setProgressDialogLabel(i18n("Backing up resources..."));
increaseProgressDialog();
QTimer::singleShot(0, this, &ExportAlarmJob::slotWriteNextArchiveResource);
QTimer::singleShot(0, this, &ExportAlarmJobInterface::slotWriteNextArchiveResource);
}
void ExportAlarmJob::slotCheckBackupConfig()
void ExportAlarmJobInterface::slotCheckBackupConfig()
{
if (mTypeSelected & Utils::Config) {
backupConfig();
......@@ -75,17 +75,17 @@ void ExportAlarmJob::slotCheckBackupConfig()
Q_EMIT jobFinished();
}
void ExportAlarmJob::slotAlarmJobTerminated()
void ExportAlarmJobInterface::slotAlarmJobTerminated()
{
if (wasCanceled()) {
Q_EMIT jobFinished();
return;
}
mIndexIdentifier++;
QTimer::singleShot(0, this, &ExportAlarmJob::slotWriteNextArchiveResource);
QTimer::singleShot(0, this, &ExportAlarmJobInterface::slotWriteNextArchiveResource);
}
void ExportAlarmJob::slotWriteNextArchiveResource()
void ExportAlarmJobInterface::slotWriteNextArchiveResource()
{
Akonadi::AgentManager *manager = Akonadi::AgentManager::self();
const Akonadi::AgentInstance::List list = manager->instances();
......@@ -106,30 +106,30 @@ void ExportAlarmJob::slotWriteNextArchiveResource()
resourceJob->setIdentifier(identifier);
resourceJob->setArchive(archive());
resourceJob->setArchiveName(QStringLiteral("alarm.zip"));
connect(resourceJob, &ExportResourceArchiveJob::error, this, &ExportAlarmJob::error);
connect(resourceJob, &ExportResourceArchiveJob::info, this, &ExportAlarmJob::info);
connect(resourceJob, &ExportResourceArchiveJob::terminated, this, &ExportAlarmJob::slotAlarmJobTerminated);
connect(resourceJob, &ExportResourceArchiveJob::error, this, &ExportAlarmJobInterface::error);
connect(resourceJob, &ExportResourceArchiveJob::info, this, &ExportAlarmJobInterface::info);
connect(resourceJob, &ExportResourceArchiveJob::terminated, this, &ExportAlarmJobInterface::slotAlarmJobTerminated);
resourceJob->start();
} else {
qCDebug(PIMDATAEXPORTERCORE_LOG) << "Url is empty for " << identifier;
QTimer::singleShot(0, this, &ExportAlarmJob::slotAlarmJobTerminated);
QTimer::singleShot(0, this, &ExportAlarmJobInterface::slotAlarmJobTerminated);
}
} else {
QTimer::singleShot(0, this, &ExportAlarmJob::slotAlarmJobTerminated);
QTimer::singleShot(0, this, &ExportAlarmJobInterface::slotAlarmJobTerminated);
}
} else if (identifier.contains(QLatin1String("akonadi_kalarm_resource_"))) {
backupResourceFile(agent, Utils::alarmPath());
QTimer::singleShot(0, this, &ExportAlarmJob::slotAlarmJobTerminated);
QTimer::singleShot(0, this, &ExportAlarmJobInterface::slotAlarmJobTerminated);
} else {
QTimer::singleShot(0, this, &ExportAlarmJob::slotAlarmJobTerminated);
QTimer::singleShot(0, this, &ExportAlarmJobInterface::slotAlarmJobTerminated);
}
} else {
Q_EMIT info(i18n("Resources backup done."));
QTimer::singleShot(0, this, &ExportAlarmJob::slotCheckBackupConfig);
QTimer::singleShot(0, this, &ExportAlarmJobInterface::slotCheckBackupConfig);
}
}
void ExportAlarmJob::backupConfig()
void ExportAlarmJobInterface::backupConfig()
{
setProgressDialogLabel(i18n("Backing up config..."));
......
......@@ -24,12 +24,12 @@
#include "pimdataexportercore_private_export.h"
class ArchiveStorage;
class PIMDATAEXPORTER_TESTS_EXPORT ExportAlarmJob : public AbstractImportExportJob
class PIMDATAEXPORTER_TESTS_EXPORT ExportAlarmJobInterface : public AbstractImportExportJob
{
Q_OBJECT
public:
explicit ExportAlarmJob(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep);
~ExportAlarmJob() override;
explicit ExportAlarmJobInterface(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep);
~ExportAlarmJobInterface() override;
void start() override;
......
......@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
#include "importalarmjob.h"
#include "importalarmjobinterface.h"
#include "archivestorage.h"
#include <PimCommonAkonadi/CreateResource>
......@@ -41,27 +41,27 @@ inline const QString storeAlarm()
}
}
ImportAlarmJob::ImportAlarmJob(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
ImportAlarmJobInterface::ImportAlarmJobInterface(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
: AbstractImportExportJob(parent, archiveStorage, typeSelected, numberOfStep)
{
initializeImportJob();
}
ImportAlarmJob::~ImportAlarmJob()
ImportAlarmJobInterface::~ImportAlarmJobInterface()
{
}
void ImportAlarmJob::start()
void ImportAlarmJobInterface::start()
{
Q_EMIT title(i18n("Starting to import KAlarm settings..."));
createProgressDialog(i18n("Import KAlarm settings"));
mArchiveDirectory = archive()->directory();
searchAllFiles(mArchiveDirectory, QString(), QStringLiteral("alarm"));
initializeListStep();
QTimer::singleShot(0, this, &ImportAlarmJob::slotNextStep);
QTimer::singleShot(0, this, &ImportAlarmJobInterface::slotNextStep);
}
void ImportAlarmJob::slotNextStep()
void ImportAlarmJobInterface::slotNextStep()
{
++mIndex;
if (mIndex < mListStep.count()) {
......@@ -79,7 +79,7 @@ void ImportAlarmJob::slotNextStep()
}
}
void ImportAlarmJob::restoreResources()
void ImportAlarmJobInterface::restoreResources()
{
Q_EMIT info(i18n("Restore resources..."));
setProgressDialogLabel(i18n("Restore resources..."));
......@@ -145,13 +145,13 @@ void ImportAlarmJob::restoreResources()
startSynchronizeResources(listResource);
}
bool ImportAlarmJob::isAConfigFile(const QString &name) const
bool ImportAlarmJobInterface::isAConfigFile(const QString &name) const
{
return name.endsWith(QLatin1String("rc")) && (name.contains(QLatin1String("akonadi_kalarm_resource_"))
|| name.contains(QLatin1String("akonadi_kalarm_dir_resource_")));
}
void ImportAlarmJob::restoreConfig()
void ImportAlarmJobInterface::restoreConfig()
{
increaseProgressDialog();
setProgressDialogLabel(i18n("Restore configs..."));
......@@ -170,10 +170,10 @@ void ImportAlarmJob::restoreConfig()
}
restoreUiRcFile(QStringLiteral("kalarmui.rc"), QStringLiteral("kalarm"));
Q_EMIT info(i18n("Config restored."));
QTimer::singleShot(0, this, &ImportAlarmJob::slotNextStep);
QTimer::singleShot(0, this, &ImportAlarmJobInterface::slotNextStep);
}
void ImportAlarmJob::importkalarmConfig(const KArchiveFile *kalarmFile, const QString &kalarmrc, const QString &filename, const QString &prefix)
void ImportAlarmJobInterface::importkalarmConfig(const KArchiveFile *kalarmFile, const QString &kalarmrc, const QString &filename, const QString &prefix)
{
copyToFile(kalarmFile, kalarmrc, filename, prefix);
KSharedConfig::Ptr kalarmConfig = KSharedConfig::openConfig(kalarmrc);
......
......@@ -24,12 +24,12 @@
#include "pimdataexportercore_private_export.h"
class ArchiveStorage;
class PIMDATAEXPORTER_TESTS_EXPORT ImportAlarmJob : public AbstractImportExportJob
class PIMDATAEXPORTER_TESTS_EXPORT ImportAlarmJobInterface : public AbstractImportExportJob
{
Q_OBJECT
public:
explicit ImportAlarmJob(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep);
~ImportAlarmJob() override;
explicit ImportAlarmJobInterface(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep);
~ImportAlarmJobInterface() override;
void start() override;
......
......@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
#include "importcalendarjob.h"
#include "importcalendarjobinterface.h"
#include "archivestorage.h"
#include <PimCommonAkonadi/CreateResource>
......@@ -45,27 +45,27 @@ inline const QString storeCalendar()
}
}
ImportCalendarJob::ImportCalendarJob(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
ImportCalendarJobInterface::ImportCalendarJobInterface(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
: AbstractImportExportJob(parent, archiveStorage, typeSelected, numberOfStep)
{
initializeImportJob();
}
ImportCalendarJob::~ImportCalendarJob()
ImportCalendarJobInterface::~ImportCalendarJobInterface()
{
}
void ImportCalendarJob::start()
void ImportCalendarJobInterface::start()
{
Q_EMIT title(i18n("Starting to import KOrganizer settings..."));
mArchiveDirectory = archive()->directory();
createProgressDialog(i18n("Import KOrganizer settings"));
searchAllFiles(mArchiveDirectory, QString(), QStringLiteral("calendar"));
initializeListStep();
QTimer::singleShot(0, this, &ImportCalendarJob::slotNextStep);
QTimer::singleShot(0, this, &ImportCalendarJobInterface::slotNextStep);
}
void ImportCalendarJob::slotNextStep()
void ImportCalendarJobInterface::slotNextStep()
{
++mIndex;
if (mIndex < mListStep.count()) {
......@@ -83,7 +83,7 @@ void ImportCalendarJob::slotNextStep()
}
}
void ImportCalendarJob::restoreResources()
void ImportCalendarJobInterface::restoreResources()
{
Q_EMIT info(i18n("Restore resources..."));
setProgressDialogLabel(i18n("Restore resources..."));
......@@ -151,7 +151,7 @@ void ImportCalendarJob::restoreResources()
startSynchronizeResources(listResource);
}
void ImportCalendarJob::addSpecificResourceSettings(const KSharedConfig::Ptr &resourceConfig, const QString &resourceName, QMap<QString, QVariant> &settings)
void ImportCalendarJobInterface::addSpecificResourceSettings(const KSharedConfig::Ptr &resourceConfig, const QString &resourceName, QMap<QString, QVariant> &settings)
{
if (resourceName == QLatin1String("akonadi_ical_resource")) {
KConfigGroup general = resourceConfig->group(QStringLiteral("General"));
......@@ -167,13 +167,13 @@ void ImportCalendarJob::addSpecificResourceSettings(const KSharedConfig::Ptr &re
}
}
bool ImportCalendarJob::isAConfigFile(const QString &name) const
bool ImportCalendarJobInterface::isAConfigFile(const QString &name) const
{
return name.endsWith(QLatin1String("rc")) && (name.contains(QLatin1String("akonadi_ical_resource_"))
|| name.contains(QLatin1String("akonadi_icaldir_resource_")));
}
void ImportCalendarJob::restoreConfig()
void ImportCalendarJobInterface::restoreConfig()
{
increaseProgressDialog();
setProgressDialogLabel(i18n("Restore configs..."));
......@@ -287,10 +287,10 @@ void ImportCalendarJob::restoreConfig()
restoreConfigFile(QStringLiteral("eventviewsrc"));
Q_EMIT info(i18n("Config restored."));
QTimer::singleShot(0, this, &ImportCalendarJob::slotNextStep);
QTimer::singleShot(0, this, &ImportCalendarJobInterface::slotNextStep);
}
void ImportCalendarJob::importkorganizerConfig(const KArchiveFile *file, const QString &config, const QString &filename, const QString &prefix)
void ImportCalendarJobInterface::importkorganizerConfig(const KArchiveFile *file, const QString &config, const QString &filename, const QString &prefix)
{
copyToFile(file, config, filename, prefix);
KSharedConfig::Ptr korganizerConfig = KSharedConfig::openConfig(config);
......@@ -301,7 +301,7 @@ void ImportCalendarJob::importkorganizerConfig(const KArchiveFile *file, const Q
korganizerConfig->sync();
}
void ImportCalendarJob::importeventViewConfig(const KArchiveFile *file, const QString &config, const QString &filename, const QString &prefix)
void ImportCalendarJobInterface::importeventViewConfig(const KArchiveFile *file, const QString &config, const QString &filename, const QString &prefix)
{
copyToFile(file, config, filename, prefix);
KSharedConfig::Ptr eventviewConfig = KSharedConfig::openConfig(config);
......
......@@ -25,12 +25,12 @@
class ArchiveStorage;
class KArchive;
class PIMDATAEXPORTER_TESTS_EXPORT ImportCalendarJob : public AbstractImportExportJob
class PIMDATAEXPORTER_TESTS_EXPORT ImportCalendarJobInterface : public AbstractImportExportJob
{
Q_OBJECT
public:
explicit ImportCalendarJob(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep);
~ImportCalendarJob() override;
explicit ImportCalendarJobInterface(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep);