summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'kde-base/kmail/files/kmail-4.3.1-fix-rename-folder-on-disconnected-IMAP.patch')
-rw-r--r--kde-base/kmail/files/kmail-4.3.1-fix-rename-folder-on-disconnected-IMAP.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/kde-base/kmail/files/kmail-4.3.1-fix-rename-folder-on-disconnected-IMAP.patch b/kde-base/kmail/files/kmail-4.3.1-fix-rename-folder-on-disconnected-IMAP.patch
new file mode 100644
index 000000000000..d0a7739cb77e
--- /dev/null
+++ b/kde-base/kmail/files/kmail-4.3.1-fix-rename-folder-on-disconnected-IMAP.patch
@@ -0,0 +1,75 @@
+Index: kmail/cachedimapjob.cpp
+===================================================================
+--- kmail/cachedimapjob.cpp (revision 1022962)
++++ kmail/cachedimapjob.cpp (revision 1022963)
+@@ -510,7 +510,7 @@
+ bool b = kmkernel->iCalIface().isResourceQuiet();
+ kmkernel->iCalIface().setResourceQuiet( true );
+
+- mFolder->take( i );
++ mFolder->takeTemporarily( i );
+ mFolder->addMsgKeepUID( mMsg );
+ mMsg->setTransferInProgress( false );
+
+Index: kmail/kmfoldercachedimap.cpp
+===================================================================
+--- kmail/kmfoldercachedimap.cpp (revision 1022962)
++++ kmail/kmfoldercachedimap.cpp (revision 1022963)
+@@ -527,6 +527,11 @@
+ return KMFolderMaildir::take( idx );
+ }
+
++void KMFolderCachedImap::takeTemporarily( int idx )
++{
++ KMFolderMaildir::take( idx );
++}
++
+ int KMFolderCachedImap::addMsgInternal( KMMessage *msg, bool newMail, int *index_return )
+ {
+ // Possible optimization: Only dirty if not filtered below
+Index: kmail/kmfoldercachedimap.h
+===================================================================
+--- kmail/kmfoldercachedimap.h (revision 1022962)
++++ kmail/kmfoldercachedimap.h (revision 1022963)
+@@ -228,10 +228,23 @@
+ /** Reimplemented from KMFolder. Moving is not supported, so aParent must be 0. */
+ virtual int rename( const QString &aName, KMFolderDir *aParent = 0 );
+
+- /** Reimplemented from KMFolderMaildir */
+- virtual KMMessage *take( int idx );
+ bool canDeleteMessages() const;
+
++ /**
++ * Reimplemented from KMFolderMaildir
++ * This deletes the message permanently, also from the server. For this,
++ * rememberDeletion() is called, so that the message can be deleted from
++ * the server on the next sync.
++ */
++ virtual KMMessage* take( int idx );
++
++ /**
++ * Like take(), only that the deletion is not remembered, i.e. the
++ * message will not be deleted from the server. Calling this can cause
++ * inconsistencies, so make sure you re-add the message later!
++ */
++ void takeTemporarily( int idx );
++
+ /** Reimplemented from KMFolderMaildir */
+ virtual int addMsg( KMMessage *msg, int *index_return = 0 );
+
+Index: kmail/kmfoldercachedimap.cpp
+===================================================================
+--- kmail/kmfoldercachedimap.cpp (revision 1022963)
++++ kmail/kmfoldercachedimap.cpp (revision 1022964)
+@@ -1678,6 +1678,11 @@
+ job->start();
+ return true;
+ } else {
++
++ // Nothing to delete on the server, make sure the map is clear again.
++ // Normally this wouldn't be necessary, but there can be stale maps because of
++ // https://issues.kolab.org/issue3833.
++ mDeletedUIDsSinceLastSync.clear();
+ return false;
+ }
+ }