Commit 7aa9137a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Continue to implement export not autotest

parent 3428205d
......@@ -52,6 +52,7 @@ void GenerateListFileFromArchive::generateList()
(void)searchArchiveElement(Utils::configsPath(), topDirectory);
(void)searchArchiveElement(Utils::transportsPath(), topDirectory);
(void)searchArchiveElement(Utils::dataPath(), topDirectory);
(void)searchArchiveElement(Utils::notePath(), topDirectory);
mListFile.sort();
}
......@@ -75,7 +76,6 @@ bool GenerateListFileFromArchive::searchArchiveElement(const QString &path, cons
void GenerateListFileFromArchive::addSubItems(const QString &topLevelPath, const KArchiveEntry *entry, int indent, const QString &fullpath)
{
const KArchiveDirectory *dir = static_cast<const KArchiveDirectory *>(entry);
//++indent;
const QString space = QString(indent * 2, QLatin1Char(' '));
const QStringList lst = dir->entries();
for (const QString &entryName : lst) {
......@@ -83,7 +83,7 @@ void GenerateListFileFromArchive::addSubItems(const QString &topLevelPath, const
if (entry) {
if (entry->isDirectory()) {
const KArchiveDirectory *dirEntry = static_cast<const KArchiveDirectory *>(entry);
mListFile += space + dirEntry->name();
//mListFile += space + dirEntry->name();
addSubItems(topLevelPath, entry, indent, (fullpath.isEmpty() ? QString() : fullpath + QLatin1Char('/')) + dirEntry->name());
} else if (entry->isFile()) {
const KArchiveFile *file = static_cast<const KArchiveFile *>(entry);
......
......@@ -3,3 +3,6 @@ configs/knotesrc
information/VERSION_2
information/exportdatatype.xml
configs/akonadi_notes_agent.notifyrc
note/akonadi_akonotes_resource_1/agent_config_akonadi_akonotes_resource_1
note/akonadi_akonotes_resource_1/akonadi_akonotes_resource_1rc
note/akonadi_akonotes_resource_1/notes.zip
......@@ -31,9 +31,12 @@ TestImportFile::TestImportFile(const QString &archivePath, QObject *parent)
: QObject(parent)
, mArchivePath(archivePath + QStringLiteral("archive.zip"))
{
//qDebug() << " mArchivePath " << mArchivePath;
mArchiveStorage = new ArchiveStorage(mArchivePath, this);
Q_ASSERT(mArchiveStorage->openArchive(false));
const bool archiveOpened = mArchiveStorage->openArchive(false);
if (!archiveOpened) {
qDebug() << " mArchivePath " << mArchivePath;
}
Q_ASSERT(archiveOpened);
}
TestImportFile::~TestImportFile()
......
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