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
a84d0e5c
Commit
a84d0e5c
authored
May 01, 2020
by
Laurent Montel
Browse files
Make method virtual pure
parent
fdc436fd
Changes
38
Hide whitespace changes
Inline
Side-by-side
core/abstractimportexportjob.cpp
View file @
a84d0e5c
...
...
@@ -258,12 +258,6 @@ Akonadi::Collection::Id AbstractImportExportJob::convertPathToId(const QString &
return
id
;
}
//Allow to remove dependancy against MailCommon::Util
Akonadi
::
Collection
::
Id
AbstractImportExportJob
::
convertFolderPathToCollectionId
(
const
QString
&
path
)
{
return
MailCommon
::
Util
::
convertFolderPathToCollectionId
(
path
);
}
void
AbstractImportExportJob
::
initializeImportJob
()
{
if
(
mTempDir
)
{
...
...
core/abstractimportexportjob.h
View file @
a84d0e5c
...
...
@@ -127,7 +127,7 @@ protected:
void
convertCollectionListStrToAkonadiId
(
const
KSharedConfig
::
Ptr
&
config
,
const
QString
&
groupName
,
const
QString
&
key
,
bool
addCollectionPrefix
);
void
convertRealPathToCollectionList
(
KConfigGroup
&
group
,
const
QString
&
currentKey
,
bool
addCollectionPrefix
=
true
);
virtual
Q_REQUIRED_RESULT
Akonadi
::
Collection
::
Id
convertFolderPathToCollectionId
(
const
QString
&
path
);
virtual
Q_REQUIRED_RESULT
Akonadi
::
Collection
::
Id
convertFolderPathToCollectionId
(
const
QString
&
path
)
=
0
;
private:
void
slotAllResourceSynchronized
();
void
slotSynchronizeInstanceDone
(
const
QString
&
,
const
QString
&
identifier
);
...
...
core/addressbook/exportaddressbookjobinterfaceimpl.cpp
View file @
a84d0e5c
...
...
@@ -21,7 +21,7 @@
#include
"exportresourcearchivejob.h"
#include
<AkonadiCore/AgentManager>
#include
<MailCommon/MailUtil>
#include
<KLocalizedString>
#include
<QTemporaryFile>
...
...
@@ -111,3 +111,8 @@ void ExportAddressbookJobInterfaceImpl::convertCollectionListToRealPath(KConfigG
ResourceConverterImpl
converter
;
converter
.
convertCollectionListToRealPath
(
group
,
currentKey
);
}
Akonadi
::
Collection
::
Id
ExportAddressbookJobInterfaceImpl
::
convertFolderPathToCollectionId
(
const
QString
&
path
)
{
return
MailCommon
::
Util
::
convertFolderPathToCollectionId
(
path
);
}
core/addressbook/exportaddressbookjobinterfaceimpl.h
View file @
a84d0e5c
...
...
@@ -35,6 +35,7 @@ protected:
void
exportArchiveResource
()
override
;
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
;
private:
void
slotWriteNextArchiveResource
();
void
slotAddressbookJobTerminated
();
...
...
core/addressbook/importaddressbookjobinterfaceimpl.cpp
View file @
a84d0e5c
...
...
@@ -19,7 +19,7 @@
#include
"importaddressbookjobinterfaceimpl.h"
#include
"archivestorage.h"
#include
<MailCommon/MailUtil>
#include
<PimCommonAkonadi/CreateResource>
#include
<KLocalizedString>
...
...
@@ -124,3 +124,8 @@ void ImportAddressbookJobInterfaceImpl::restoreResources()
//It's maildir support. Need to add support
startSynchronizeResources
(
listResource
);
}
Akonadi
::
Collection
::
Id
ImportAddressbookJobInterfaceImpl
::
convertFolderPathToCollectionId
(
const
QString
&
path
)
{
return
MailCommon
::
Util
::
convertFolderPathToCollectionId
(
path
);
}
core/addressbook/importaddressbookjobinterfaceimpl.h
View file @
a84d0e5c
...
...
@@ -34,6 +34,7 @@ public:
protected:
void
restoreResources
()
override
;
Q_REQUIRED_RESULT
Akonadi
::
Collection
::
Id
convertFolderPathToCollectionId
(
const
QString
&
path
)
override
;
};
#endif // IMPORTADDRESSBOOKJOBINTERFACEIMPL_H
core/akregator/exportakregatorjobinterface.cpp
View file @
a84d0e5c
...
...
@@ -18,7 +18,7 @@
*/
#include
"exportakregatorjobinterface.h"
#include
<MailCommon/MailUtil>
#include
<AkonadiCore/AgentManager>
#include
<KLocalizedString>
#include
<KZip>
...
...
@@ -49,6 +49,11 @@ void ExportAkregatorJobInterface::start()
}
}
Akonadi
::
Collection
::
Id
ExportAkregatorJobInterface
::
convertFolderPathToCollectionId
(
const
QString
&
path
)
{
return
MailCommon
::
Util
::
convertFolderPathToCollectionId
(
path
);
}
void
ExportAkregatorJobInterface
::
slotCheckBackupConfig
()
{
increaseProgressDialog
();
...
...
core/akregator/exportakregatorjobinterface.h
View file @
a84d0e5c
...
...
@@ -32,7 +32,8 @@ public:
~
ExportAkregatorJobInterface
()
override
;
void
start
()
override
;
protected:
Q_REQUIRED_RESULT
Akonadi
::
Collection
::
Id
convertFolderPathToCollectionId
(
const
QString
&
path
)
override
;
private:
void
slotCheckBackupConfig
();
void
slotCheckBackupData
();
...
...
core/akregator/importakregatorjobinterface.cpp
View file @
a84d0e5c
...
...
@@ -20,6 +20,7 @@
#include
"importakregatorjobinterface.h"
#include
"archivestorage.h"
#include
<MailCommon/MailUtil>
#include
<PimCommonAkonadi/CreateResource>
#include
<KArchive>
...
...
@@ -48,6 +49,11 @@ void ImportAkregatorJobInterface::start()
QTimer
::
singleShot
(
0
,
this
,
&
ImportAkregatorJobInterface
::
slotNextStep
);
}
Akonadi
::
Collection
::
Id
ImportAkregatorJobInterface
::
convertFolderPathToCollectionId
(
const
QString
&
path
)
{
return
MailCommon
::
Util
::
convertFolderPathToCollectionId
(
path
);
}
void
ImportAkregatorJobInterface
::
slotNextStep
()
{
++
mIndex
;
...
...
core/akregator/importakregatorjobinterface.h
View file @
a84d0e5c
...
...
@@ -33,6 +33,9 @@ public:
void
start
()
override
;
protected:
Q_REQUIRED_RESULT
Akonadi
::
Collection
::
Id
convertFolderPathToCollectionId
(
const
QString
&
path
)
override
;
private:
void
slotNextStep
()
override
;
...
...
core/alarm/exportalarmjobinterfaceimpl.cpp
View file @
a84d0e5c
...
...
@@ -22,6 +22,7 @@
#include
<AkonadiCore/AgentManager>
#include
<KLocalizedString>
#include
<MailCommon/MailUtil>
#include
<QTemporaryFile>
#include
<QTimer>
...
...
@@ -100,3 +101,8 @@ void ExportAlarmJobInterfaceImpl::exportArchiveResource()
{
QTimer
::
singleShot
(
0
,
this
,
&
ExportAlarmJobInterfaceImpl
::
slotWriteNextArchiveResource
);
}
Akonadi
::
Collection
::
Id
ExportAlarmJobInterfaceImpl
::
convertFolderPathToCollectionId
(
const
QString
&
path
)
{
return
MailCommon
::
Util
::
convertFolderPathToCollectionId
(
path
);
}
core/alarm/exportalarmjobinterfaceimpl.h
View file @
a84d0e5c
...
...
@@ -33,6 +33,7 @@ public:
protected:
void
exportArchiveResource
()
override
;
Q_REQUIRED_RESULT
Akonadi
::
Collection
::
Id
convertFolderPathToCollectionId
(
const
QString
&
path
)
override
;
private:
void
slotAlarmJobTerminated
();
...
...
core/alarm/importalarmjobinterfaceimpl.cpp
View file @
a84d0e5c
...
...
@@ -21,6 +21,7 @@
#include
"archivestorage.h"
#include
<PimCommonAkonadi/CreateResource>
#include
<MailCommon/MailUtil>
#include
<KArchive>
#include
<KLocalizedString>
...
...
@@ -115,3 +116,8 @@ void ImportAlarmJobInterfaceImpl::restoreResources()
//It's maildir support. Need to add support
startSynchronizeResources
(
listResource
);
}
Akonadi
::
Collection
::
Id
ImportAlarmJobInterfaceImpl
::
convertFolderPathToCollectionId
(
const
QString
&
path
)
{
return
MailCommon
::
Util
::
convertFolderPathToCollectionId
(
path
);
}
core/alarm/importalarmjobinterfaceimpl.h
View file @
a84d0e5c
...
...
@@ -32,6 +32,7 @@ public:
~
ImportAlarmJobInterfaceImpl
()
override
;
protected:
void
restoreResources
()
override
;
Q_REQUIRED_RESULT
Akonadi
::
Collection
::
Id
convertFolderPathToCollectionId
(
const
QString
&
path
)
override
;
};
#endif // IMPORTALARMJOBINTERFACEIMPL_H
core/autotests/addressbook/exportaddressbookjobinterfacetest.cpp
View file @
a84d0e5c
...
...
@@ -86,3 +86,10 @@ void ExportAddressbookJobInterfaceTest::exportAddressBookConfigTest1()
compareExportFile
.
setListFilePath
(
QStringLiteral
(
PIMDATAEXPORTER_DIR
"/export/test1"
));
compareExportFile
.
compareFiles
();
}
Akonadi
::
Collection
::
Id
ExportAddressbookJobInterfaceTestImpl
::
convertFolderPathToCollectionId
(
const
QString
&
path
)
{
//TODO
return
-
1
;
}
core/autotests/addressbook/exportaddressbookjobinterfacetest.h
View file @
a84d0e5c
...
...
@@ -37,6 +37,7 @@ protected:
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
;
};
class
ExportAddressbookJobInterfaceTest
:
public
QObject
...
...
core/autotests/alarm/exportalarmjobinterfacetest.cpp
View file @
a84d0e5c
...
...
@@ -75,3 +75,10 @@ void ExportAlarmJobInterfaceTest::exportAlarmConfigTest1()
compareExportFile
.
setListFilePath
(
QStringLiteral
(
PIMDATAEXPORTER_DIR
"/export/test1"
));
compareExportFile
.
compareFiles
();
}
Akonadi
::
Collection
::
Id
ExportAlarmJobInterfaceTestImpl
::
convertFolderPathToCollectionId
(
const
QString
&
path
)
{
//TODO
return
-
1
;
}
core/autotests/alarm/exportalarmjobinterfacetest.h
View file @
a84d0e5c
...
...
@@ -33,6 +33,7 @@ public:
protected:
void
exportArchiveResource
()
override
;
Q_REQUIRED_RESULT
Akonadi
::
Collection
::
Id
convertFolderPathToCollectionId
(
const
QString
&
path
)
override
;
};
class
ExportAlarmJobInterfaceTest
:
public
QObject
...
...
core/autotests/calendar/exportcalendarsjobinterfacetest.cpp
View file @
a84d0e5c
...
...
@@ -75,3 +75,10 @@ void ExportCalendarsJobInterfaceTest::exportCalendarConfigTest1()
compareExportFile
.
setListFilePath
(
QStringLiteral
(
PIMDATAEXPORTER_DIR
"/export/test1"
));
compareExportFile
.
compareFiles
();
}
Akonadi
::
Collection
::
Id
ExportCalendarsJobInterfaceTestImpl
::
convertFolderPathToCollectionId
(
const
QString
&
path
)
{
//TODO
return
-
1
;
}
core/autotests/calendar/exportcalendarsjobinterfacetest.h
View file @
a84d0e5c
...
...
@@ -33,6 +33,7 @@ public:
protected:
void
exportArchiveResource
()
override
;
Q_REQUIRED_RESULT
Akonadi
::
Collection
::
Id
convertFolderPathToCollectionId
(
const
QString
&
path
)
override
;
};
class
ExportCalendarsJobInterfaceTest
:
public
QObject
...
...
Prev
1
2
Next
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