Commit 16aaee40 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Implement export resource

parent 5085ea8a
......@@ -107,7 +107,15 @@ void ExportNotesJobInterfaceTest::exportNoteConfigAndResource()
QFETCH(QByteArray, configpath);
TestExportFile *file = new TestExportFile(this);
file->setPathConfig(configpath);
QVector<Utils::AkonadiInstanceInfo> lstInfo;
Utils::AkonadiInstanceInfo info;
info.identifier = QStringLiteral("akonadi_akonotes_resource_1");
lstInfo << info;
info.identifier = QStringLiteral("akonadi_akonotes_resource_2");
lstInfo << info;
ExportNotesJobInterfaceTestImpl *exportNote = new ExportNotesJobInterfaceTestImpl(this, {Utils::StoredType::Config|Utils::StoredType::Resources}, file->archiveStorage(), 1);
exportNote->setListOfResource(lstInfo);
file->setAbstractImportExportJob(exportNote);
file->start();
delete exportNote;
......
......@@ -149,6 +149,7 @@ QString ResourceConverterBase::resourcePath(const QString &agentIdentifier, cons
{
const QString agentFileName = agentIdentifier + QStringLiteral("rc");
const QString configFileName = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + QLatin1Char('/') + agentFileName;
qDebug() << "configFileName " << configFileName;
KSharedConfigPtr resourceConfig = KSharedConfig::openConfig(configFileName);
const QString url = ResourceConverterBase::resourcePath(resourceConfig, defaultPath);
......
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