D10048: [PATCH 2/4] Add refresh widgets if underlying field changes

Andre Heinecke noreply at phabricator.kde.org
Tue Feb 20 12:45:00 UTC 2018


aheinecke added inline comments.

INLINE COMMENTS

> aacid wrote in document.cpp:1139
> This is problematic since it will leave a dangling event pointer for any Action::Script action executed through Document::processAction that doesn't come from this function.

Sorry I can't follow you here.

If an action is processed from somewhere else the scripter won't have an event set and the event pointer in the scripter is null.

If the processAction is triggered here for text fields (and probably more in the future) we "reset" the event pointer after it was set in the scripter in line 1148 after the action is processed and keep using the event here until it goes out of scope and is destroyed by the shared pointer.

I don't see a codepath were we leave it dangling.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10048

To: aheinecke, #okular
Cc: aacid, michaelweghorn, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20180220/40d46ed5/attachment.html>


More information about the Okular-devel mailing list