[Kde-pim] Re: two itemChanged signals fired by Akonadi::Monitor for a single modifyJob
Stephen Kelly
steveire at gmail.com
Thu Dec 23 09:47:34 GMT 2010
Christian Mollekopf wrote:
> 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.
You can run your autosave jobs in a custom session, and not monitor that
session.
myMonitor->ignoreSession(m_autosaveSession);
http://api.kde.org/4.x-api/kdepimlibs-
apidocs/akonadi/html/classAkonadi_1_1Monitor.html#a2a9b82068b614c07e5d5d1f95a30a6f4
Cheers,
Steve.
_______________________________________________
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