diff options
author | OBATA Akio <[email protected]> | 2020-01-13 17:02:28 +0900 |
---|---|---|
committer | TDE Gitea <[email protected]> | 2020-02-02 19:53:38 +0000 |
commit | 7e349b852ed28ad8b39a4c42adab1c7d3f9dbccb (patch) | |
tree | a7a6b6fc05bf6382ff4e0088b3e5d6253e2169eb | |
parent | cc5ec0c71abf322ca4fbde633875933097b05b52 (diff) | |
download | tdegraphics-7e349b852ed28ad8b39a4c42adab1c7d3f9dbccb.tar.gz tdegraphics-7e349b852ed28ad8b39a4c42adab1c7d3f9dbccb.zip |
Add support for Poppler >= 0.83
Follow change "Make globalParams a std::unique_ptr"
Signed-off-by: OBATA Akio <[email protected]>
-rw-r--r-- | config.h.cmake | 1 | ||||
-rw-r--r-- | tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake | 2 | ||||
-rw-r--r-- | tdefile-plugins/dependencies/poppler-tqt/poppler-document.cc | 7 |
3 files changed, 8 insertions, 2 deletions
diff --git a/config.h.cmake b/config.h.cmake index 4cb152be..30f9fcec 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -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 diff --git a/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake b/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake index 477c105c..65a62f95 100644 --- a/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake +++ b/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake @@ -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}" ) diff --git a/tdefile-plugins/dependencies/poppler-tqt/poppler-document.cc b/tdefile-plugins/dependencies/poppler-tqt/poppler-document.cc index d35e4645..db403c5e 100644 --- a/tdefile-plugins/dependencies/poppler-tqt/poppler-document.cc +++ b/tdefile-plugins/dependencies/poppler-tqt/poppler-document.cc @@ -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); |