Skip to content
GitLab
Menu
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
ad4af671
Commit
ad4af671
authored
Nov 09, 2021
by
Laurent Montel
😁
Browse files
Convert id
parent
c424acfc
Pipeline
#95732
failed with stage
in 2 minutes and 20 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
core/mail/importmailjobinterface.cpp
View file @
ad4af671
...
...
@@ -1022,28 +1022,22 @@ void ImportMailJobInterface::copyMailArchiveConfig(const KSharedConfig::Ptr &arc
void
ImportMailJobInterface
::
copyUnifiedMailBoxConfig
(
const
KSharedConfig
::
Ptr
&
archiveConfigOrigin
,
const
KSharedConfig
::
Ptr
&
archiveConfigDestination
)
{
#if 0
const QString archiveGroupPattern = QStringLiteral("FolderArchiveAccount ");
const QStringList archiveList = archiveConfigOrigin->groupList().filter(archiveGroupPattern);
for (const QString &str : archiveList) {
const QString resourcename = str.right(str.length() - archiveGroupPattern.length());
if (!resourcename.isEmpty()) {
KConfigGroup oldGroup = archiveConfigOrigin->group(str);
QString newResourceName;
if (mHashResources.contains(resourcename)) {
newResourceName = mHashResources.value(resourcename);
const Akonadi::Collection::Id id = convertPathToId(oldGroup.readEntry(QStringLiteral("topLevelCollectionId")));
if (id != -1) {
KConfigGroup newGroup(archiveConfigDestination, archiveGroupPattern + newResourceName);
oldGroup.copyTo(&newGroup);
newGroup.writeEntry(QStringLiteral("topLevelCollectionId"), id);
}
}
oldGroup.deleteGroup();
auto
group
=
archiveConfigOrigin
->
group
(
"UnifiedMailboxes"
);
auto
groupCopy
=
archiveConfigDestination
->
group
(
"UnifiedMailboxes"
);
const
auto
boxGroups
=
group
.
groupList
();
for
(
const
auto
&
str
:
boxGroups
)
{
KConfigGroup
oldGroup
=
group
.
group
(
str
);
const
Akonadi
::
Collection
::
Id
id
=
convertPathToId
(
oldGroup
.
readEntry
(
QStringLiteral
(
"collectionId"
)));
if
(
id
!=
-
1
)
{
KConfigGroup
newGroup
=
groupCopy
.
group
(
str
);
oldGroup
.
copyTo
(
&
newGroup
);
newGroup
.
writeEntry
(
QStringLiteral
(
"collectionId"
),
id
);
}
// FIXME convertCollectionListStrToAkonadiId(kaddressBookConfig, str, QStringLiteral("sources"), true);
//const QString sourceKey(QStringLiteral("sources"));
//convertCollectionListToRealPath(oldGroup, sourceKey);
oldGroup
.
deleteGroup
();
}
#endif
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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