On 05/25/2012 05:50 PM, Sl�vek Banko wrote: > On Friday 25 of May 2012 22:03:59 Fran�ois ANDRIOT wrote: >> Le 25/05/2012 16:39, Sl�vek Banko a �crit : >>> Darrell, David, Fran�ois, >>> >>> I found that the first part of the commit c94de3af causes incorrect >>> computation of unread messages in KMail - in the tray icon. Every time >>> you switch to any folder, the number of unread messages is increased. >>> >>> I could easily revert that part, but I fear that it will return a problem >>> with gcc 4.7. You look at it? I do not know if a problem does not even >>> rename "it" in the second part - for KOrganizer. >>> >>> Sl�vek >> >> Hello, >> I think that you should keep the current patch (do not revert), then add >> the following: >> >> in file kmail/kmsystemtray.cpp on line 496, you should replace: >> int diff = unread - it.data(); >> with >> int diff = unread - unread_it.data(); >> >> I did not test it though, since I do not use kmail at all. >> >> Fran�ois >> > > Great. I did not simply return the patch, but I wanted such a solution, as > thou hast sent. I will test it and if it is okay, I push it into the GIT. > > Sl�vek OK, I see how that happened, but I still don't think I could have discerned whether the 'it' at 496 went with the 'it' from 475 or the 'it' from 485 since it is within the code-block for TQMap<TQGuardedPtr<KMFolder>, bool>::Iterator it, but it is _not_ expressly in the code-block for TQMap<TQGuardedPtr<KMFolder>, int>::Iterator unread_it How would you know which 'it' needed to go to 'unread_it' or 'it' in this case? When we went over it before, the way was to start with the inner-most 'it' and work out from there to separate code-blocks. That didn't work in this case. Any other tricks? -- David C. Rankin, J.D.,P.E.