Bug 135479

Summary: Ignore thread doesn't mark ignored mails as read on IMAP
Product: [Applications] kmail Reporter: Diego Elio Pettenò <flameeyes>
Component: IMAPAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:

Description Diego Elio Pettenò 2006-10-12 00:34:12 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Gentoo Packages
Compiler:          gcc (GCC) 4.1.1 (Gentoo 4.1.1-r1)
 
OS:                Linux

(This is most likely related to bug #130491, but not sure if it's a proper dupe).

When the "Mark thread as ignored" action is set for a thread in a folder, the thread is marked correctly as read and the count of the unread messages of the folder updated as needed... when new messages are retrieved with IMAP for that folder, the count is updated without considering ignored threads (I suppose this is a protocol limitation); then when you enter the folder, the count is updated to consider the ignored threads, but as soon as you exit from the folder and check the mail again, the count is restored to the previous one: the ignored threads are not marked as read for the server.

The result is that ignore thread in mailing lists is pretty much useless, because the count of unread message continue to increase even ignoring threads.
Comment 1 Oliver Kellogg 2006-10-23 21:14:21 UTC
SVN commit 598502 by okellogg:

removeAllAssociations(): Do not increment the iterator when positioned on an
 association. Remove the association from m_List unconditionally.
BUG:135479


 M  +4 -0      ChangeLog  
 M  +1 -1      VERSION  
 M  +7 -6      umbrello/umlcanvasobject.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #598501:598502
@@ -1,3 +1,7 @@
+Version 1.5.51
+* This is an interim release that fixes a serious regression in version 1.5.5
+  which is detailed at http://bugs.kde.org/135749 (Crash when opening a document)
+
 Version 1.5.5
 
 * PHP5 generator creates stub methods for all interfaces a class implements (C. Brunsdon)
--- branches/KDE/3.5/kdesdk/umbrello/VERSION #598501:598502
@@ -1 +1 @@
-1.5.5
+1.5.51
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umlcanvasobject.cpp #598501:598502
@@ -95,17 +95,18 @@
 
 void UMLCanvasObject::removeAllAssociations() {
     UMLObject *o;
-    for (UMLObjectListIt oit(m_List); (o = oit.current()) != NULL; ++oit) {
-        if (o->getBaseType() != Uml::ot_Association)
+    for (UMLObjectListIt oit(m_List); (o = oit.current()) != NULL; ) {
+        if (o->getBaseType() != Uml::ot_Association) {
+            ++oit;
             continue;
+        }
         UMLAssociation *assoc = static_cast<UMLAssociation*>(o);
         //umldoc->slotRemoveUMLObject(assoc);
         UMLObject* objA = assoc->getObject(Uml::A);
         UMLObject* objB = assoc->getObject(Uml::B);
         UMLCanvasObject *roleAObj = dynamic_cast<UMLCanvasObject*>(objA);
         if (roleAObj) {
-            if (roleAObj->removeAssociation(assoc) < 0)
-                m_List.remove(assoc);
+            roleAObj->removeAssociation(assoc);
         } else if (objA)
             kdDebug() << "UMLCanvasObject::removeAllAssociations(" << m_Name
                 << "): objA " << objA->getName() << " is not a UMLCanvasObject"
@@ -115,8 +116,7 @@
                 << "): objA is NULL" << endl;
         UMLCanvasObject *roleBObj = dynamic_cast<UMLCanvasObject*>(objB);
         if (roleBObj) {
-            if (roleBObj->removeAssociation(assoc) < 0)
-                m_List.remove(assoc);
+            roleBObj->removeAssociation(assoc);
         } else if (objB)
             kdDebug() << "UMLCanvasObject::removeAllAssociations(" << m_Name
                 << "): objB " << objB->getName() << " is not a UMLCanvasObject"
@@ -124,6 +124,7 @@
         else
             kdDebug() << "UMLCanvasObject::removeAllAssociations(" << m_Name
                 << "): objB is NULL" << endl;
+        m_List.remove(assoc);
         //delete assoc;  should not do this here, we are only a CLIENT of the assoc
     }
 }
Comment 2 Oliver Kellogg 2006-10-23 21:34:16 UTC
Ouch! Sorry, I got the bug number wrong. The comment #1 was intended
for bug 135749.
Comment 3 Bram Schoenmakers 2007-03-09 00:01:33 UTC

*** This bug has been marked as a duplicate of 130773 ***