Bug 270693

Summary: Next/Previous unread folder actions sometimes skip folders
Product: [Applications] kmail2 Reporter: Thiago Macieira <thiago>
Component: message listAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: smartins, winter
Priority: NOR    
Version: 2.0.89   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Thiago Macieira 2011-04-11 16:43:22 UTC
Version:           2.0.89 (using Devel) 
OS:                Linux

When you're in KMail2 and you press Ctrl+Plus (Next unread folder) or Ctrl+Minus (Previous unread folder), sometimes it skips one or more folders and goes to another folder with unread emails.

Note that the same folder that was skipped is almost always reachable with the opposite direction. To be sure I have read all my email, I have to cycle all the way with Ctrl+Plus, then repeat with Ctrl+Minus.

This does not happen to all folders. I have no clue what causes a folder to have this behaviour. However, once this behaviour is set, it happens every time to that particular folder, in a given direction.

Restarting KMail does not help. This setting is permanent.

The setting "Act on unread/new email on this folder" in the folder's properties is active. Toggling that setting on and off does not help.

The only way I've seen to make the folder be reachable again is to delete it and recreate.

Reproducible: Sometimes

Steps to Reproduce:
1. Go to one folder
2. Ensure that there's another folder with unread email
3. Press Ctrl+Plus

Actual Results:  
The folder with unread email is skipped.

Expected Results:  
The folder with unread email is reached.

OS: Linux (i686) release 2.6.36.2-server-1mnb
Compiler: gcc
Comment 1 Allen Winter 2011-04-11 16:44:10 UTC
adding this regression bug to the showstoppers
Comment 2 Sergio Martins 2011-04-14 13:33:12 UTC
Git commit 798b5588e7d5ae70a147be1fa0ecc57345c73276 by Sergio Martins.
Committed on 14/04/2011 at 05:36.
Pushed by smartins into branch 'master'.

Don't skip model indexes.

When the current index is the last child, the first parent's sibling
wasn't being checked.

Thiago, are you sure Ctrl+Minus also skips folders? I can only
reproduce with Ctrl+Plus, and that's fixed now.

CCBUG: 270693

M  +6    -0    mailcommon/mailutil.cpp     

http://commits.kde.org/kdepim/798b5588e7d5ae70a147be1fa0ecc57345c73276
Comment 3 Thiago Macieira 2011-04-14 13:39:00 UTC
To be honest, I'm not sure. I don't test Ctrl+Minus that often. I think I saw it once, but I could be wrong. I'll keep testing.
Comment 4 Sergio Martins 2011-04-15 16:55:14 UTC
Closing then, I tested corner-cases and didn't find any bug with Ctrl+Minus.

If you reopen, please describe the hierarchy, or attach a printscreen.