[Kde-pim] Review Request: KNode, small fix for big pointer passing trouble...

Michael Leupold lemma at confuego.org
Mon Mar 30 18:56:27 BST 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/436/
-----------------------------------------------------------

(Updated 2009-03-30 10:56:27.445097)


Review request for KDE PIM.


Changes
-------

Oh, you're right. I added that earlier but it turned out I didn't need it. Scrapped the declaration.


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 (updated)
-----

  /trunk/KDE/kdepim/knode/articlewidget.cpp 945820 
  /trunk/KDE/kdepim/knode/knjobdata.h 945820 
  /trunk/KDE/kdepim/knode/knjobdata.cpp 945820 

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