summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2012-10-05 16:12:00 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2012-10-05 16:12:00 (GMT)
commit1ae5db52a783bddf5acdd9ea98c6cc47cef8b9ef (patch)
tree80e8fade2b37f23adeb66a6ebe77cdea8958a1dc
parent64f445b69b968c80b43f1b23d891458a7c66350a (diff)
downloadkolab-utils-1ae5db52a783bddf5acdd9ea98c6cc47cef8b9ef.tar.gz
Set the correct shared annotations
-rw-r--r--jobs/setupkolabfoldersjob.cpp6
-rw-r--r--migrationutility/kolabaccount.cpp3
2 files changed, 4 insertions, 5 deletions
diff --git a/jobs/setupkolabfoldersjob.cpp b/jobs/setupkolabfoldersjob.cpp
index 3eded47..b906fcb 100644
--- a/jobs/setupkolabfoldersjob.cpp
+++ b/jobs/setupkolabfoldersjob.cpp
@@ -106,13 +106,13 @@ void SetupKolabFoldersJob::onCreateDone(KJob *job)
Kolab::FolderType folderType = Kolab::folderTypeFromString(m_currentFolderType.toStdString());
if ( m_serverCapabilities.contains( "METADATA" ) ) {
setMetadataJob->setServerCapability( KIMAP::MetaDataJobBase::Metadata );
- setMetadataJob->setEntry( KOLAB_FOLDER_TYPE_ANNOTATION );
- setMetadataJob->addMetaData( KOLAB_FOLDER_TYPE_ANNOTATION, QString::fromStdString(Kolab::folderAnnotation(folderType, true)).toLatin1() );
+ setMetadataJob->addMetaData("/shared" KOLAB_FOLDER_TYPE_ANNOTATION, QString::fromStdString(Kolab::folderAnnotation(folderType, false)).toLatin1() );
} else {
setMetadataJob->setServerCapability( KIMAP::MetaDataJobBase::Annotatemore );
setMetadataJob->setEntry( KOLAB_FOLDER_TYPE_ANNOTATION );
- setMetadataJob->addMetaData( "value.shared", m_currentFolderType.toLatin1() );
+ setMetadataJob->addMetaData( "value.shared", QString::fromStdString(Kolab::folderAnnotation(folderType, false)).toLatin1() );
}
+ //TODO also set the private annotation with the .default suffix
connect(setMetadataJob, SIGNAL(result(KJob*)), this, SLOT(onMetadataSetDone(KJob*)));
setMetadataJob->start();
}
diff --git a/migrationutility/kolabaccount.cpp b/migrationutility/kolabaccount.cpp
index 86eb78b..99a2313 100644
--- a/migrationutility/kolabaccount.cpp
+++ b/migrationutility/kolabaccount.cpp
@@ -253,8 +253,7 @@ void KolabAccount::createFolder(const QString &name, const QByteArray &annotatio
setMetadataJob->setMailBox(createJob->mailBox());
if ( mCapabilities.contains( "METADATA" ) ) {
setMetadataJob->setServerCapability( KIMAP::MetaDataJobBase::Metadata );
- setMetadataJob->setEntry( KOLAB_FOLDER_TYPE_ANNOTATION );
- setMetadataJob->addMetaData( KOLAB_FOLDER_TYPE_ANNOTATION, annotation );
+ setMetadataJob->addMetaData( "/shared" KOLAB_FOLDER_TYPE_ANNOTATION, annotation );
} else {
setMetadataJob->setServerCapability( KIMAP::MetaDataJobBase::Annotatemore );
setMetadataJob->setEntry( KOLAB_FOLDER_TYPE_ANNOTATION );