aheinecke added a subscriber: aacid.
aheinecke added inline comments.

INLINE COMMENTS

> generator_pdf.cpp:475
> +        // poppler links
> +        popplerLink->setNextLinks( QVector< Poppler::Link * >() );
> +    }

@aacid When you commited the corresponding poppler patch you did not add this 
API.

The problem here is:

- In the LinkPrivate dtor we delete the nextLinks list.
- createLinkFromPopplerLink deletes the parsed the link.

My solution for this was to add API to change the nextLinks so that they can be 
"taken" from a Link.

Maybe in poppler we could add "Poppler::Link::takeNextLinks()" to have a more 
explicit API for that?

Alternatively changing "createLinkFromPopplerLink" to optionally not delete the 
link it parses? I think that is a bit more error prone as we have to make sure 
we catch everything. For example the movie and rendition actions have their own 
deletion.

REPOSITORY
  R223 Okular

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

To: aheinecke, #okular
Cc: aacid, michaelweghorn, ngraham

Reply via email to