Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 19a216a2 authored by Albert Astals Cid's avatar Albert Astals Cid

Don't ask for link annotations, they are slow and we don't use them

Needs poppler 0.28 that is yet to be released

BUGS: 317891
parent c1ed6357
......@@ -125,9 +125,21 @@ int main()
}
" HAVE_POPPLER_0_24)
check_cxx_source_compiles("
#include <poppler-qt4.h>
int main()
{
Poppler::Page *p = 0;
p->annotations( QSet<Poppler::Annotation::SubType>() << Poppler::Annotation::ASound );
return 0;
}
" HAVE_POPPLER_0_28)
set(CMAKE_REQUIRED_INCLUDES)
set(CMAKE_REQUIRED_LIBRARIES)
if (HAVE_POPPLER_0_24)
if (HAVE_POPPLER_0_28)
set(popplerVersionMessage "0.28")
elseif (HAVE_POPPLER_0_24)
set(popplerVersionMessage "0.24")
elseif (HAVE_POPPLER_0_22)
set(popplerVersionMessage "0.22")
......@@ -137,9 +149,9 @@ int main()
set(popplerVersionMessage "0.16")
elseif (HAVE_POPPLER_0_12_1)
set(popplerVersionMessage "0.12.1")
else (HAVE_POPPLER_0_24)
else (HAVE_POPPLER_0_28)
set(popplerVersionMessage "0.5.4")
endif (HAVE_POPPLER_0_24)
endif (HAVE_POPPLER_0_28)
if (NOT Poppler_FIND_QUIETLY)
message(STATUS "Found Poppler-Qt4: ${POPPLER_LIBRARY}, (>= ${popplerVersionMessage})")
endif (NOT Poppler_FIND_QUIETLY)
......
......@@ -12,3 +12,6 @@
/* Defined if we have the 0.24 version of the Poppler library */
#cmakedefine HAVE_POPPLER_0_24 1
/* Defined if we have the 0.28 version of the Poppler library */
#cmakedefine HAVE_POPPLER_0_28 1
......@@ -1429,7 +1429,25 @@ void PDFGenerator::addSynopsisChildren( QDomNode * parent, QDomNode * parentDest
void PDFGenerator::addAnnotations( Poppler::Page * popplerPage, Okular::Page * page )
{
#ifdef HAVE_POPPLER_0_28
QSet<Poppler::Annotation::SubType> subtypes;
subtypes << Poppler::Annotation::AFileAttachment
<< Poppler::Annotation::ASound
<< Poppler::Annotation::AMovie
<< Poppler::Annotation::AWidget
<< Poppler::Annotation::AScreen
<< Poppler::Annotation::AText
<< Poppler::Annotation::ALine
<< Poppler::Annotation::AGeom
<< Poppler::Annotation::AHighlight
<< Poppler::Annotation::AInk
<< Poppler::Annotation::AStamp
<< Poppler::Annotation::ACaret;
QList<Poppler::Annotation*> popplerAnnotations = popplerPage->annotations( subtypes );
#else
QList<Poppler::Annotation*> popplerAnnotations = popplerPage->annotations();
#endif
foreach(Poppler::Annotation *a, popplerAnnotations)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment