Commit 6d21964e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Split class

parent 41bc1c2f
add_definitions( -DPIMDATAEXPORTER_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data" )
set( exportaddressbookjobinterfacetest_SRCS exportaddressbookjobinterfacetest.cpp)
set( exportaddressbookjobinterfacetest_SRCS exportaddressbookjobinterfacetest.cpp exportaddressbookjobinterfacetestimpl.cpp)
add_executable( exportaddressbookjobinterfacetest ${exportaddressbookjobinterfacetest_SRCS})
add_test(NAME exportaddressbookjobinterfacetest COMMAND exportaddressbookjobinterfacetest)
......@@ -8,7 +8,7 @@ ecm_mark_as_test(exportaddressbookjobinterfacetest)
target_link_libraries(exportaddressbookjobinterfacetest Qt5::Test pimdataexporterprivate KF5::ConfigCore test_resourceconverter)
#####
set( importaddressbookjobinterfacetest_SRCS importaddressbookjobinterfacetest.cpp)
set( importaddressbookjobinterfacetest_SRCS importaddressbookjobinterfacetest.cpp importaddressbookjobinterfacetestimpl.cpp)
add_executable( importaddressbookjobinterfacetest ${importaddressbookjobinterfacetest_SRCS})
add_test(NAME importaddressbookjobinterfacetest COMMAND importaddressbookjobinterfacetest)
......
......@@ -18,92 +18,12 @@
*/
#include "exportaddressbookjobinterfacetest.h"
#include "archivestorage.h"
#include "exportaddressbookjobinterfacetestimpl.h"
#include "testexportfile.h"
#include "resourceconvertertest.h"
#include <QDebug>
#include <QTest>
#include <saveresourceconfigtest.h>
#include <testbackupresourcefilejob.h>
QTEST_MAIN(ExportAddressbookJobInterfaceTest)
ExportAddressbookJobInterfaceTestImpl::ExportAddressbookJobInterfaceTestImpl(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
: ExportAddressbookJobInterface(parent, typeSelected, archiveStorage, numberOfStep)
{
}
ExportAddressbookJobInterfaceTestImpl::~ExportAddressbookJobInterfaceTestImpl()
{
}
Akonadi::Collection::Id ExportAddressbookJobInterfaceTestImpl::convertFolderPathToCollectionId(const QString &path)
{
ResourceConverterTest resourceConverterTest;
resourceConverterTest.setTestPath(mPathConfig);
return resourceConverterTest.convertFolderPathToCollectionId(path);
}
void ExportAddressbookJobInterfaceTestImpl::exportResourceToArchive(const QString &archivePath, const QString &url, const QString &identifier)
{
SaveResoureConfigTest saveResourceConfig;
saveResourceConfig.setArchive(mArchiveStorage->archive());
saveResourceConfig.exportResourceToArchive(archivePath, url, identifier, Utils::resourceAddressbookArchiveName(),
{ QLatin1String("akonadi_vcarddir_resource_"), QLatin1String("akonadi_contacts_resource_") });
slotAddressbookJobTerminated();
}
QVector<Utils::AkonadiInstanceInfo> ExportAddressbookJobInterfaceTestImpl::listOfResource()
{
return mListAkonadiInstanceInfo;
}
void ExportAddressbookJobInterfaceTestImpl::convertCollectionToRealPath(KConfigGroup &group, const QString &currentKey)
{
ResourceConverterTest resourceConverter;
resourceConverter.setTestPath(mPathConfig);
resourceConverter.convertCollectionToRealPath(group, currentKey);
}
void ExportAddressbookJobInterfaceTestImpl::convertCollectionListToRealPath(KConfigGroup &group, const QString &currentKey)
{
ResourceConverterTest resourceConverter;
resourceConverter.setTestPath(mPathConfig);
resourceConverter.convertCollectionListToRealPath(group, currentKey);
}
QString ExportAddressbookJobInterfaceTestImpl::adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath)
{
ResourceConverterTest resourceConverterTest;
resourceConverterTest.setTestPath(mPathConfig);
return resourceConverterTest.adaptNewResourceUrl(overwriteResources, resourceConfig, storePath);
}
QString ExportAddressbookJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
Q_UNREACHABLE();
return {};
}
QString ExportAddressbookJobInterfaceTestImpl::resourcePath(const QString &agentIdentifier, const QString &defaultPath) const
{
ResourceConverterTest converter;
converter.setTestPath(mPathConfig);
const QString url = converter.resourcePath(agentIdentifier, defaultPath);
return url;
}
void ExportAddressbookJobInterfaceTestImpl::backupAddressBookResourceFile(const QString &agentIdentifier, const QString &defaultPath)
{
TestBackupResourceFileJob *job = new TestBackupResourceFileJob(this);
job->setDefaultPath(defaultPath);
job->setIdentifier(agentIdentifier);
job->setTestPath(mPathConfig);
job->setZip(archive());
connect(job, &TestBackupResourceFileJob::error, this, &ExportAddressbookJobInterfaceTestImpl::error);
connect(job, &TestBackupResourceFileJob::info, this, &ExportAddressbookJobInterfaceTestImpl::info);
job->start();
}
ExportAddressbookJobInterfaceTest::ExportAddressbookJobInterfaceTest(QObject *parent)
: QObject(parent)
......
......@@ -22,26 +22,6 @@
#include <QObject>
#include "addressbook/exportaddressbookjobinterface.h"
#include "exportimportutil.h"
class ExportAddressbookJobInterfaceTestImpl : public ExportAddressbookJobInterface, public ExportImportUtil
{
Q_OBJECT
public:
explicit ExportAddressbookJobInterfaceTestImpl(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep);
~ExportAddressbookJobInterfaceTestImpl();
protected:
void convertCollectionToRealPath(KConfigGroup &group, const QString &currentKey) override;
void convertCollectionListToRealPath(KConfigGroup &group, const QString &currentKey) override;
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
void exportResourceToArchive(const QString &archivePath, const QString &url, const QString &identifier) override;
Q_REQUIRED_RESULT QVector<Utils::AkonadiInstanceInfo> listOfResource() override;
Q_REQUIRED_RESULT QString resourcePath(const QString &agentIdentifier, const QString &defaultPath = QString()) const override;
void backupAddressBookResourceFile(const QString &agentIdentifier, const QString &defaultPath) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
};
class ExportAddressbookJobInterfaceTest : public QObject
{
......
/*
Copyright (C) 2020 Laurent Montel <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "exportaddressbookjobinterfacetestimpl.h"
#include "archivestorage.h"
#include "resourceconvertertest.h"
#include "saveresourceconfigtest.h"
#include "testbackupresourcefilejob.h"
#include <QDebug>
ExportAddressbookJobInterfaceTestImpl::ExportAddressbookJobInterfaceTestImpl(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
: ExportAddressbookJobInterface(parent, typeSelected, archiveStorage, numberOfStep)
{
}
ExportAddressbookJobInterfaceTestImpl::~ExportAddressbookJobInterfaceTestImpl()
{
}
Akonadi::Collection::Id ExportAddressbookJobInterfaceTestImpl::convertFolderPathToCollectionId(const QString &path)
{
ResourceConverterTest resourceConverterTest;
resourceConverterTest.setTestPath(mPathConfig);
return resourceConverterTest.convertFolderPathToCollectionId(path);
}
void ExportAddressbookJobInterfaceTestImpl::exportResourceToArchive(const QString &archivePath, const QString &url, const QString &identifier)
{
SaveResoureConfigTest saveResourceConfig;
saveResourceConfig.setArchive(mArchiveStorage->archive());
saveResourceConfig.exportResourceToArchive(archivePath, url, identifier, Utils::resourceAddressbookArchiveName(),
{ QLatin1String("akonadi_vcarddir_resource_"), QLatin1String("akonadi_contacts_resource_") });
slotAddressbookJobTerminated();
}
QVector<Utils::AkonadiInstanceInfo> ExportAddressbookJobInterfaceTestImpl::listOfResource()
{
return mListAkonadiInstanceInfo;
}
void ExportAddressbookJobInterfaceTestImpl::convertCollectionToRealPath(KConfigGroup &group, const QString &currentKey)
{
ResourceConverterTest resourceConverter;
resourceConverter.setTestPath(mPathConfig);
resourceConverter.convertCollectionToRealPath(group, currentKey);
}
void ExportAddressbookJobInterfaceTestImpl::convertCollectionListToRealPath(KConfigGroup &group, const QString &currentKey)
{
ResourceConverterTest resourceConverter;
resourceConverter.setTestPath(mPathConfig);
resourceConverter.convertCollectionListToRealPath(group, currentKey);
}
QString ExportAddressbookJobInterfaceTestImpl::adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath)
{
ResourceConverterTest resourceConverterTest;
resourceConverterTest.setTestPath(mPathConfig);
return resourceConverterTest.adaptNewResourceUrl(overwriteResources, resourceConfig, storePath);
}
QString ExportAddressbookJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
Q_UNREACHABLE();
return {};
}
QString ExportAddressbookJobInterfaceTestImpl::resourcePath(const QString &agentIdentifier, const QString &defaultPath) const
{
ResourceConverterTest converter;
converter.setTestPath(mPathConfig);
const QString url = converter.resourcePath(agentIdentifier, defaultPath);
return url;
}
void ExportAddressbookJobInterfaceTestImpl::backupAddressBookResourceFile(const QString &agentIdentifier, const QString &defaultPath)
{
TestBackupResourceFileJob *job = new TestBackupResourceFileJob(this);
job->setDefaultPath(defaultPath);
job->setIdentifier(agentIdentifier);
job->setTestPath(mPathConfig);
job->setZip(archive());
connect(job, &TestBackupResourceFileJob::error, this, &ExportAddressbookJobInterfaceTestImpl::error);
connect(job, &TestBackupResourceFileJob::info, this, &ExportAddressbookJobInterfaceTestImpl::info);
job->start();
}
/*
Copyright (C) 2020 Laurent Montel <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef EXPORTADDRESSBOOKJOBINTERFACETESTIMPL_H
#define EXPORTADDRESSBOOKJOBINTERFACETESTIMPL_H
#include "addressbook/exportaddressbookjobinterface.h"
#include "exportimportutil.h"
class ExportAddressbookJobInterfaceTestImpl : public ExportAddressbookJobInterface, public ExportImportUtil
{
Q_OBJECT
public:
explicit ExportAddressbookJobInterfaceTestImpl(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep);
~ExportAddressbookJobInterfaceTestImpl();
protected:
void convertCollectionToRealPath(KConfigGroup &group, const QString &currentKey) override;
void convertCollectionListToRealPath(KConfigGroup &group, const QString &currentKey) override;
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
void exportResourceToArchive(const QString &archivePath, const QString &url, const QString &identifier) override;
Q_REQUIRED_RESULT QVector<Utils::AkonadiInstanceInfo> listOfResource() override;
Q_REQUIRED_RESULT QString resourcePath(const QString &agentIdentifier, const QString &defaultPath = QString()) const override;
void backupAddressBookResourceFile(const QString &agentIdentifier, const QString &defaultPath) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
};
#endif // EXPORTADDRESSBOOKJOBINTERFACETESTIMPL_H
......@@ -18,56 +18,12 @@
*/
#include "importaddressbookjobinterfacetest.h"
#include "archivestorage.h"
#include "resourceconvertertest.h"
#include "importaddressbookjobinterfacetestimpl.h"
#include "testimportfile.h"
#include <QSignalSpy>
#include <QTest>
QTEST_MAIN(ImportAddressbookJobInterfaceTest)
ImportAddressbookJobInterfaceTestImpl::ImportAddressbookJobInterfaceTestImpl(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
: ImportAddressbookJobInterface(parent, typeSelected, archiveStorage, numberOfStep)
{
}
ImportAddressbookJobInterfaceTestImpl::~ImportAddressbookJobInterfaceTestImpl()
{
//Clean up temp repo
QVERIFY(QDir(extractPath()).removeRecursively());
}
Akonadi::Collection::Id ImportAddressbookJobInterfaceTestImpl::convertFolderPathToCollectionId(const QString &path)
{
ResourceConverterTest resourceConverterTest;
resourceConverterTest.setTestPath(mPathConfig);
return resourceConverterTest.convertFolderPathToCollectionId(path);
}
QString ImportAddressbookJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
return mLogCreateResource->logCreateResource(resources, name, settings, synchronizeTree);
}
void ImportAddressbookJobInterfaceTestImpl::synchronizeResource(const QStringList &lst)
{
mLogCreateResource->logSynchronizeResource(lst);
slotNextStep();
}
QString ImportAddressbookJobInterfaceTestImpl::adaptResourcePath(const KSharedConfigPtr &resourceConfig, const QString &storedData)
{
ResourceConverterTest resourceConverterTest;
resourceConverterTest.setTestPath(mPathConfig);
return resourceConverterTest.adaptResourcePath(resourceConfig, storedData);
}
QString ImportAddressbookJobInterfaceTestImpl::adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath)
{
ResourceConverterTest resourceConverterTest;
resourceConverterTest.setTestPath(mPathConfig);
return resourceConverterTest.adaptNewResourceUrl(overwriteResources, resourceConfig, storePath);
}
ImportAddressbookJobInterfaceTest::ImportAddressbookJobInterfaceTest(QObject *parent)
: QObject(parent)
{
......
......@@ -21,25 +21,6 @@
#define IMPORTADDRESSBOOKJOBINTERFACETEST_H
#include <QObject>
#include "exportimportutil.h"
#include "addressbook/importaddressbookjobinterface.h"
class ImportAddressbookJobInterfaceTestImpl : public ImportAddressbookJobInterface, public ExportImportUtil
{
Q_OBJECT
public:
explicit ImportAddressbookJobInterfaceTestImpl(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep);
~ImportAddressbookJobInterfaceTestImpl();
protected:
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree = false) override;
void synchronizeResource(const QStringList &lst) override;
Q_REQUIRED_RESULT QString adaptResourcePath(const KSharedConfigPtr &resourceConfig, const QString &storedData) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
};
class ImportAddressbookJobInterfaceTest : public QObject
{
Q_OBJECT
......
/*
Copyright (C) 2020 Laurent Montel <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "importaddressbookjobinterfacetestimpl.h"
#include "archivestorage.h"
#include "resourceconvertertest.h"
#include <QTest>
#include <QDir>
ImportAddressbookJobInterfaceTestImpl::ImportAddressbookJobInterfaceTestImpl(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
: ImportAddressbookJobInterface(parent, typeSelected, archiveStorage, numberOfStep)
{
}
ImportAddressbookJobInterfaceTestImpl::~ImportAddressbookJobInterfaceTestImpl()
{
//Clean up temp repo
QVERIFY(QDir(extractPath()).removeRecursively());
}
Akonadi::Collection::Id ImportAddressbookJobInterfaceTestImpl::convertFolderPathToCollectionId(const QString &path)
{
ResourceConverterTest resourceConverterTest;
resourceConverterTest.setTestPath(mPathConfig);
return resourceConverterTest.convertFolderPathToCollectionId(path);
}
QString ImportAddressbookJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
return mLogCreateResource->logCreateResource(resources, name, settings, synchronizeTree);
}
void ImportAddressbookJobInterfaceTestImpl::synchronizeResource(const QStringList &lst)
{
mLogCreateResource->logSynchronizeResource(lst);
slotNextStep();
}
QString ImportAddressbookJobInterfaceTestImpl::adaptResourcePath(const KSharedConfigPtr &resourceConfig, const QString &storedData)
{
ResourceConverterTest resourceConverterTest;
resourceConverterTest.setTestPath(mPathConfig);
return resourceConverterTest.adaptResourcePath(resourceConfig, storedData);
}
QString ImportAddressbookJobInterfaceTestImpl::adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath)
{
ResourceConverterTest resourceConverterTest;
resourceConverterTest.setTestPath(mPathConfig);
return resourceConverterTest.adaptNewResourceUrl(overwriteResources, resourceConfig, storePath);
}
/*
Copyright (C) 2020 Laurent Montel <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef IMPORTADDRESSBOOKJOBINTERFACETESTIMPL_H
#define IMPORTADDRESSBOOKJOBINTERFACETESTIMPL_H
#include "exportimportutil.h"
#include "core/utils.h"
#include "addressbook/importaddressbookjobinterface.h"
class ImportAddressbookJobInterfaceTestImpl : public ImportAddressbookJobInterface, public ExportImportUtil
{
Q_OBJECT
public:
explicit ImportAddressbookJobInterfaceTestImpl(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep);
~ImportAddressbookJobInterfaceTestImpl();
protected:
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree = false) override;
void synchronizeResource(const QStringList &lst) override;
Q_REQUIRED_RESULT QString adaptResourcePath(const KSharedConfigPtr &resourceConfig, const QString &storedData) override;
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
};
#endif // IMPORTADDRESSBOOKJOBINTERFACETESTIMPL_H
add_definitions( -DPIMDATAEXPORTER_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data" )
set( exportakregatorjobinterfacetest_SRCS exportakregatorjobinterfacetest.cpp)
set( exportakregatorjobinterfacetest_SRCS exportakregatorjobinterfacetest.cpp exportakregatorjobinterfacetestimpl.cpp)
add_executable( exportakregatorjobinterfacetest ${exportakregatorjobinterfacetest_SRCS})
add_test(NAME exportakregatorjobinterfacetest COMMAND exportakregatorjobinterfacetest)
......@@ -9,7 +9,7 @@ target_link_libraries(exportakregatorjobinterfacetest Qt5::Test pimdataexporterp
#####
set( importakregatorjobinterfacetest_SRCS importakregatorjobinterfacetest.cpp)
set( importakregatorjobinterfacetest_SRCS importakregatorjobinterfacetest.cpp importakregatorjobinterfacetestimpl.cpp)
add_executable( importakregatorjobinterfacetest ${importakregatorjobinterfacetest_SRCS})
add_test(NAME importakregatorjobinterfacetest COMMAND importakregatorjobinterfacetest)
......
......@@ -18,36 +18,15 @@
*/
#include "exportakregatorjobinterfacetest.h"
#include "exportakregatorjobinterfacetestimpl.h"
#include "archivestorage.h"
#include "resourceconvertertest.h"
#include "testexportfile.h"
#include "compareexportfile.h"
#include <QDebug>
#include <QTest>
#include <QSignalSpy>
QTEST_MAIN(ExportAkregatorJobInterfaceTest)
ExportAkregatorJobInterfaceTestImpl::ExportAkregatorJobInterfaceTestImpl(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
: ExportAkregatorJobInterface(parent, typeSelected, archiveStorage, numberOfStep)
{
}
ExportAkregatorJobInterfaceTestImpl::~ExportAkregatorJobInterfaceTestImpl()
{
}
QString ExportAkregatorJobInterfaceTestImpl::adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath)
{
Q_UNREACHABLE();
return {};
}
QString ExportAkregatorJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
Q_UNREACHABLE();
return {};
}
ExportAkregatorJobInterfaceTest::ExportAkregatorJobInterfaceTest(QObject *parent)
: QObject(parent)
......
......@@ -22,18 +22,7 @@
#include <QObject>
#include "akregator/exportakregatorjobinterface.h"
class ExportAkregatorJobInterfaceTestImpl : public ExportAkregatorJobInterface
{
Q_OBJECT
public:
explicit ExportAkregatorJobInterfaceTestImpl(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep);
~ExportAkregatorJobInterfaceTestImpl();
protected:
Q_REQUIRED_RESULT QString adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) override;
Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) override;
};
class ExportAkregatorJobInterfaceTest : public QObject
{
......
/*
Copyright (C) 2020 Laurent Montel <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU