when the fetched unified mailbox collections and loaded mailboxes differ then
trying to get a loaded mailbox using the collection name may fail.
wrapping the call in a try-catch block fixes the crash
Details
Details
Diff Detail
Diff Detail
- Repository
- R206 KMail
- Branch
- fix_unified_mailbox_crash (branched from master)
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 8953 Build 8971: arc lint + arc unit
agents/unifiedmailboxagent/unifiedmailboxmanager.cpp | ||
---|---|---|
391–396 | We don't use exception in kde apps in general std::unordered_map<....>::const_iterator got = mymap.find(col.name()); if (got ==mMainBoxes.end()) { qWarning()... } else { .... setCollectionId(...) } |
agents/unifiedmailboxagent/unifiedmailboxmanager.cpp | ||
---|---|---|
391–396 | Normally i would do that too. But there is a similar try-catch block in the function UnifiedMailboxManager::createDefaultBoxes. I just wanted to follow the coding style already used. |
agents/unifiedmailboxagent/unifiedmailboxmanager.cpp | ||
---|---|---|
391–396 | Do you still want me to change it? |
Comment Actions
Yep I prefer.
I will create a patch for removing it in UnifiedMailboxManager::createDefaultBoxes
I prefer to not using exception when it's not really necessary
Comment Actions
Thanks for reviewing.
Looking at BKO I stumbled over bug #404347 which may be related. I did have a similar behaviour while the unified mailbox agent still crashed.