Add support for Poppler >= 0.83

Follow change "Make globalParams a std::unique_ptr"

Signed-off-by: OBATA Akio <obache@wizdas.com>
pull/23/head
OBATA Akio 4 years ago committed by TDE Gitea
parent cc5ec0c71a
commit 7e349b852e

@ -1,6 +1,7 @@
#cmakedefine VERSION "@VERSION@"
// poppler-tqt
#cmakedefine HAVE_POPPLER_083
#cmakedefine HAVE_POPPLER_082
#cmakedefine HAVE_POPPLER_076
#cmakedefine HAVE_POPPLER_072

@ -24,7 +24,7 @@ check_cxx_source_compiles("
HAVE_POPPLER_030 )
tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
foreach( _poppler_ver 0.58 0.64 0.70 0.71 0.72 0.76 0.82 )
foreach( _poppler_ver 0.58 0.64 0.70 0.71 0.72 0.76 0.82 0.83 )
string( REPLACE "." "" _poppler_str "${_poppler_ver}" )
if( NOT DEFINED HAVE_POPPLER_${_poppler_str} )
message( STATUS "Performing Test HAVE_POPPLER_${_poppler_str}" )

@ -42,7 +42,12 @@ namespace Poppler {
Document *Document::load(const TQString &filePath)
{
if (!globalParams) {
globalParams = new GlobalParams();
globalParams =
#if defined(HAVE_POPPLER_083)
std::make_unique<GlobalParams>();
#else
new GlobalParams();
#endif
}
DocumentData *doc = new DocumentData(new GooString(TQFile::encodeName(filePath)), NULL);

Loading…
Cancel
Save