[Kde-pim] two itemChanged signals fired by Akonadi::Monitor for a single modifyJob

Christian Mollekopf chrigi_1 at fastmail.fm
Wed Dec 22 18:12:14 GMT 2010


Hi,

I am trying to detect if an Akonadi::Item changed because of the 
Akonadi::ItemModifyJob which I issued, or because another program changed the 
Item.

To monitor the item, I created an Akonadi::Monitor and connected to the 
itemChanged signal. Since I couldn't find any better method, I thought I could 
just set a flag when issuing the modifyJob, and clear it as soon as the 
itemChanged signal arrives  from the monitor. If an itemChanged signal arrives 
and the flag is not set, I can detecte that another application changed the 
item.

Now the problem is, that sometimes I get two itemChanged signals for the same 
modifyJob, for no apparent reason. This happens only occasionally, not always.

Are there any circumstances under which this could happen (I wouldn't know 
that I have any program which works on the same akonadi items), or is there a 
better solution to check who changed the item?

(I know i can check the modifyJob, but then I would have to disconnect the 
monitor in the meantime, and I wouldn't know when to reconnect the signals)

Thanks for your help,

Chris
_______________________________________________
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