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

Christian Mollekopf chrigi_1 at fastmail.fm
Wed Dec 22 23:30:26 GMT 2010


On Wednesday 22 December 2010 19:22:07 Kevin Krammer wrote:
> Hi,
> 
> On Wednesday, 2010-12-22, Christian Mollekopf wrote:
> > 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.
> 
> What is the larger use case at hand, i.e. why do you need to decide who
> change the item.

I have an editor for a note (Akonotes resource), and I want to do periodic 
autosaves. For the case that the item was modified from outside, i monitor the 
item for a change, and in case of a change I update the editor content. 
If I make now an autosave from this editor, I don't want to update the content 
of the editor (because the cursor would move) since it is already up to date.
> 
> > 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?
> 
> Maybe the resource reacts to the change it that way. What kind of data type
> are we talking about and which resource is handling the collection?
> 
Im working with Akonote::notes and Kcal::Incidences, but we can focus on just 
akonotes if you prefer.

Cheers,

Chris
> Cheers,
> Kevin
_______________________________________________
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