Bug 490742

Summary: KMail sometimes fails to mark opened emails as read
Product: [Applications] kmail2 Reporter: Holmes <social.calamari468>
Component: UIAssignee: Andreas Hartmetz <ahartmetz>
Status: RESOLVED UPSTREAM    
Severity: normal CC: ahartmetz
Priority: NOR    
Version First Reported In: 6.1.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Holmes 2024-07-24 06:02:16 UTC
SUMMARY
When opening an email, KMail sometimes fails to mark it as read. The email will remain unread forever, no matter how many times you open it. Only way to mark it as read is to manually mark it as read.

STEPS TO REPRODUCE
1. Open KMail
2. Open an email that has not been read yet

OBSERVED RESULT
KMail does not mark the mail as read when you open it

EXPECTED RESULT
KMail should mark the mail as read when you open it

Operating System: Arch Linux 
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Graphics Platform: Wayland
Comment 1 Holmes 2025-09-21 19:14:35 UTC
Bumping this to make sure this doesn't get forgotten for decades.
Comment 2 Andreas Hartmetz 2025-10-30 12:37:02 UTC
Assigning to me. There are many things that I see not updating: moving messages, read status and others. It works after restarting KMail but not Akonadi - even previously made changes appear after the restart. So it seems like changes make it from KMail to Akonadi (and probably IMAP server, in my case), but not back to KMail. Strange. At least it seems like a single bug with a single fix to fix many kinds of updates.

Both the breakage and it going away after a KMail restart seem to reproduce every time for me, there is no randomness.
Comment 3 Andreas Hartmetz 2025-11-23 16:07:23 UTC
I have root-caused this to a Qt (arguably) bug, and I have a fix, too: https://codereview.qt-project.org/c/qt/qtbase/+/693140
If that one doesn't get accepted or takes too long to roll out, workarounds are possible now that the problem is understood.