[poppler] qt5/src

Albert Astals Cid aacid at kemper.freedesktop.org
Tue Jan 2 23:47:24 UTC 2018


 qt5/src/poppler-annotation.cc |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit e70990c5b2d95a9099b8f4a1c69ca9e5b2a559a4
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Jan 3 00:46:42 2018 +0100

    qt5: make the check for rendition a bit earlier

diff --git a/qt5/src/poppler-annotation.cc b/qt5/src/poppler-annotation.cc
index dbe336dc..4da4cf20 100644
--- a/qt5/src/poppler-annotation.cc
+++ b/qt5/src/poppler-annotation.cc
@@ -544,18 +544,15 @@ QList<Annotation*> AnnotationPrivate::findAnnotations(::Page *pdfPage, DocumentD
                 if (!wantScreenAnnotations)
                     continue;
                 AnnotScreen * screenann = static_cast< AnnotScreen * >( ann );
-                if (!screenann->getAction())
+                // TODO Support other link types than Link::Rendition in ScreenAnnotation
+                if (!screenann->getAction() || screenann->getAction()->getKind() != actionRendition)
                   continue;
                 ScreenAnnotation * s = new ScreenAnnotation();
                 annotation = s;
 
                 // -> screen
                 Link * popplerLink = PageData::convertLinkActionToLink( screenann->getAction(), doc, QRectF() );
-                // TODO Support other link types than Link::Rendition in ScreenAnnotation
-                if (popplerLink->linkType() == Link::Rendition)
-                    s->setAction( static_cast<Poppler::LinkRendition *>(popplerLink) );
-                else
-                    delete popplerLink;
+                s->setAction( static_cast<Poppler::LinkRendition *>(popplerLink) );
 
                 // -> screenTitle
                 GooString * screentitle = screenann->getTitle();


More information about the poppler mailing list