Fix displaying ITIP invitations
ClosedPublic

Authored by dvratil on Apr 29 2016, 10:08 PM.

Details

Summary

Probably some OTP refactoring broke displaying of ITIP invitation.
This patch fixes the problem. It may not fix the root cause of the problem,
but at least it makes ITIP invitations work again.

What happens is that OTP::parseObjectTreeInternal() first calls
Formatter::format() without the asyncResultObserver. Without this patch
it still creates the new memento, but does not connect it to the observer.
Then OTP calls the Formatter again immediatelly after, but this time with
a valid asyncResultObserver. Because the memento already exists, this only
triggers the codepath that checks whether the memento is finished (which
it is not) and exists. When the memento is finished nothing happens, because
it wasn't initially connected to the observer to force update of the Viewer.

With this patch we don't create the memento if there is no asyncResultObserver.
That means that the next time the Formatter is called with a valid
asyncResultObserver we create the memento and connect it to the observer.
Once the memento is finished, the Viewer is updated and the invitation
is displayed correctly.

Diff Detail

Repository
R43 KDE PIM
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dvratil updated this revision to Diff 3565.Apr 29 2016, 10:08 PM
dvratil retitled this revision from to Fix displaying ITIP invitations.
dvratil updated this object.
dvratil edited the test plan for this revision. (Show Details)
Restricted Application added a project: KDE PIM. · View Herald TranscriptApr 29 2016, 10:08 PM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
dvratil updated this revision to Diff 3567.Apr 29 2016, 10:16 PM
mlaurent accepted this revision.Apr 30 2016, 12:18 PM
mlaurent edited edge metadata.

Seems logical.

This revision is now accepted and ready to land.Apr 30 2016, 12:18 PM
This revision was automatically updated to reflect the committed changes.