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
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
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.