Forward port of the fix for getting annotations for newly appearing folder

from proko2 who's commit message I can't quote due to ktown being on the
laggy side, mail wise.

svn path=/trunk/kdepim/; revision=401799
wilder-work
Till Adam 21 years ago
parent 6417cdb091
commit 4ef0727659
  1. 1
      kmailicalifaceimpl.cpp
  2. 14
      kmfoldercachedimap.cpp

@ -1379,6 +1379,7 @@ void KMailICalIfaceImpl::readConfig()
}
return;
}
mUseResourceIMAP = enabled;
// Read remaining options
const bool hideFolders = GlobalSettings::hideGroupwareFolders();

@ -847,23 +847,27 @@ void KMFolderCachedImap::serverSyncInternal()
break;
}
case SYNC_STATE_GET_ANNOTATIONS:
case SYNC_STATE_GET_ANNOTATIONS: {
#define KOLAB_FOLDERTYPE "/vendor/kolab/folder-type"
#define KOLAB_INCIDENCESFOR "/vendor/kolab/incidences-for"
//#define KOLAB_FOLDERTYPE "/comment" //for testing, while cyrus-imap doesn't support /vendor/*
mSyncState = SYNC_STATE_SET_ANNOTATIONS;
bool needToGetInitialAnnotations = false;
if ( !noContent() ) {
// for a folder we didn't create ourselves: get annotation from server
if ( mAnnotationFolderType == "FROMSERVER" )
if ( mAnnotationFolderType == "FROMSERVER" ) {
needToGetInitialAnnotations = true;
mAnnotationFolderType = QString::null;
else
} else {
updateAnnotationFolderType();
}
}
// First retrieve the annotation, so that we know we have to set it if it's not set.
// On the other hand, if the user changed the contentstype, there's no need to get first.
if ( !noContent() && mAccount->hasAnnotationSupport() && kmkernel->iCalIface().isEnabled() ) {
if ( !noContent() && mAccount->hasAnnotationSupport() &&
( kmkernel->iCalIface().isEnabled() || needToGetInitialAnnotations ) ) {
QStringList annotations; // list of annotations to be fetched
if ( !mAnnotationFolderTypeChanged || mAnnotationFolderType.isEmpty() )
annotations << KOLAB_FOLDERTYPE;
@ -886,7 +890,7 @@ void KMFolderCachedImap::serverSyncInternal()
break;
}
}
} // case
case SYNC_STATE_SET_ANNOTATIONS:
mSyncState = SYNC_STATE_SET_ACLS;

Loading…
Cancel
Save