[Kde-pim] Review Request: KNode, small fix for big pointer passing trouble...
Michael Leupold
lemma at confuego.org
Fri Mar 27 15:36:46 GMT 2009
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/436/
-----------------------------------------------------------
Review request for KDE PIM.
Summary
-------
KNode's job backend stores a pointer to an article and updates the article object on retrieval. This is usually fine but fails on "orphaned" articles, articles which aren't managed/deleted by KNArticleManager. This leads to the bug I quoted because the article might be deleted earlier than the job (KNJobData) that belongs to it.
This patch is one of several possibilites to fix it by providing means to canel pending jobs. Obviously the right thing to do would be to not pass pointers and untangle the KNJobData objects. Other possibilities I tried (and was less happier with):
- Using a QPointer to get rid of dangling pointers in KNJobData
- Adding a KNJobData pointer to KNJobItem to cancel the job inside its destructor
Refactoring seems not to be worth it currently - especially with the rise of akonadi.
This addresses bug 71102.
https://bugs.kde.org/show_bug.cgi?id=71102
Diffs
-----
/trunk/KDE/kdepim/knode/articlewidget.h 945063
/trunk/KDE/kdepim/knode/articlewidget.cpp 945063
/trunk/KDE/kdepim/knode/knjobdata.h 945063
/trunk/KDE/kdepim/knode/knjobdata.cpp 945063
Diff: http://reviewboard.kde.org/r/436/diff
Testing
-------
Thanks,
Michael
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list