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

Add more virtual method for autotest

parent 3972d67d
......@@ -28,7 +28,6 @@
#include <QDir>
#include <QStandardPaths>
#include <QTimer>
#include "resourceconverterimpl.h"
ExportAddressbookJobInterface::ExportAddressbookJobInterface(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
: AbstractImportExportJob(parent, archiveStorage, typeSelected, numberOfStep)
......@@ -92,22 +91,20 @@ void ExportAddressbookJobInterface::backupConfig()
if (kaddressBookConfig->hasGroup(collectionViewCheckStateStr)) {
KConfigGroup group = kaddressBookConfig->group(collectionViewCheckStateStr);
const QString selectionKey(QStringLiteral("Selection"));
ResourceConverterImpl converter;
converter.convertCollectionListToRealPath(group, selectionKey);
convertCollectionListToRealPath(group, selectionKey);
}
const QString collectionViewStateStr(QStringLiteral("CollectionViewState"));
if (kaddressBookConfig->hasGroup(collectionViewStateStr)) {
KConfigGroup group = kaddressBookConfig->group(collectionViewStateStr);
QString currentKey(QStringLiteral("Current"));
ResourceConverterImpl converter;
converter.convertCollectionToRealPath(group, currentKey);
convertCollectionToRealPath(group, currentKey);
currentKey = QStringLiteral("Expansion");
converter.convertCollectionToRealPath(group, currentKey);
convertCollectionToRealPath(group, currentKey);
currentKey = QStringLiteral("Selection");
converter.convertCollectionToRealPath(group, currentKey);
convertCollectionToRealPath(group, currentKey);
}
kaddressBookConfig->sync();
backupFile(tmp.fileName(), Utils::configsPath(), kaddressbookStr);
......@@ -121,3 +118,4 @@ void ExportAddressbookJobInterface::backupConfig()
Q_EMIT info(i18n("Config backup done."));
}
......@@ -35,6 +35,8 @@ public:
protected:
virtual void exportArchiveResource() = 0;
virtual void convertCollectionToRealPath(KConfigGroup &group, const QString &currentKey) = 0;
virtual void convertCollectionListToRealPath(KConfigGroup &group, const QString &currentKey) = 0;
void slotCheckBackupConfig();
private:
void slotCheckBackupResource();
......
......@@ -101,3 +101,14 @@ void ExportAddressbookJobInterfaceImpl::slotWriteNextArchiveResource()
}
}
void ExportAddressbookJobInterfaceImpl::convertCollectionToRealPath(KConfigGroup &group, const QString &currentKey)
{
ResourceConverterImpl converter;
converter.convertCollectionToRealPath(group, currentKey);
}
void ExportAddressbookJobInterfaceImpl::convertCollectionListToRealPath(KConfigGroup &group, const QString &currentKey)
{
ResourceConverterImpl converter;
converter.convertCollectionListToRealPath(group, currentKey);
}
......@@ -33,6 +33,8 @@ public:
protected:
void exportArchiveResource() override;
void convertCollectionToRealPath(KConfigGroup &group, const QString &currentKey) override;
void convertCollectionListToRealPath(KConfigGroup &group, const QString &currentKey) override;
private:
void slotWriteNextArchiveResource();
void slotAddressbookJobTerminated();
......
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