Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
PIM Data Exporter
Commits
e44ad396
Commit
e44ad396
authored
May 11, 2020
by
Laurent Montel
Browse files
Export akonadi config file too
parent
d642383e
Changes
4
Hide whitespace changes
Inline
Side-by-side
core/autotests/notes/CMakeLists.txt
View file @
e44ad396
...
...
@@ -5,7 +5,7 @@ set( exportnotesjobinterfacetest_SRCS exportnotesjobinterfacetest.cpp)
add_executable
(
exportnotesjobinterfacetest
${
exportnotesjobinterfacetest_SRCS
}
)
add_test
(
NAME exportnotesjobinterfacetest COMMAND exportnotesjobinterfacetest
)
ecm_mark_as_test
(
exportnotesjobinterfacetest
)
target_link_libraries
(
exportnotesjobinterfacetest Qt5::Test pimdataexporterprivate test_resourceconverter KF5::ConfigCore KF5::Archive
)
target_link_libraries
(
exportnotesjobinterfacetest Qt5::Test pimdataexporterprivate test_resourceconverter KF5::ConfigCore KF5::Archive
KF5::AkonadiCore
)
#######
set
(
importnotesjobinterfacetest_SRCS importnotesjobinterfacetest.cpp
)
...
...
core/autotests/notes/data/export/fullresource/config/akonadi/agent_config_akonadi_akonotes_resource_1
0 → 100644
View file @
e44ad396
[Agent]
DesiredOnlineState=true
Name=Notes
core/autotests/notes/exportnotesjobinterfacetest.cpp
View file @
e44ad396
...
...
@@ -21,6 +21,7 @@
#include
"archivestorage.h"
#include
"resourceconvertertest.h"
#include
"testexportfile.h"
#include
<AkonadiCore/ServerManager>
#include
<KZip>
#include
<QDebug>
#include
<QTest>
...
...
@@ -59,7 +60,14 @@ void ExportNotesJobInterfaceTestImpl::exportResourceToArchive(const QString &arc
qDebug
()
<<
" void ExportNotesJobInterfaceTestImpl::exportResourceToArchive(const QString &archivePath, const QString &url, const QString &identifier)"
<<
archivePath
<<
" url "
<<
url
<<
" identifier "
<<
identifier
;
QVERIFY
(
identifier
.
startsWith
(
QLatin1String
(
"akonadi_akonotes_resource_"
)));
QVERIFY
(
mArchiveStorage
->
archive
()
->
addLocalFile
(
url
+
identifier
+
QLatin1String
(
".zip"
),
archivePath
+
Utils
::
resourceNoteArchiveName
()));
//TODO export config file too.
ResourceConverterTest
converter
;
const
QString
errorStr
=
converter
.
storeResources
(
archive
(),
identifier
,
archivePath
);
QVERIFY
(
!
errorStr
.
isEmpty
());
const
QString
urlAgentConfig
=
Akonadi
::
ServerManager
::
agentConfigFilePath
(
identifier
);
QVERIFY
(
!
urlAgentConfig
.
isEmpty
());
const
QFileInfo
fi
(
urlAgentConfig
);
const
QString
filename
=
fi
.
fileName
();
QVERIFY
(
mArchiveStorage
->
archive
()
->
addLocalFile
(
urlAgentConfig
,
archivePath
+
filename
));
slotNoteJobTerminated
();
}
...
...
core/resourceconverterbase.cpp
View file @
e44ad396
...
...
@@ -25,7 +25,6 @@
#include
<KZip>
#include
<QDir>
#include
<QFileInfo>
#include
<QFileInfo>
#include
<QTemporaryFile>
ResourceConverterBase
::
ResourceConverterBase
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment