summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2023-08-21 13:15:16 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-09-12 19:27:30 +0000
commitad12349a41ada22ad7b24dc275b3e0dbe79a71f6 (patch)
tree27506c9155273b52ee616dc400e7a4361581edb4
parent9a959bd6225b13eff75da8e759ccbffa574c1efd (diff)
QtPdf: migrate to autogenerated cpp exports
This is a prerequisite for using QT_PDF_REMOVED_SINCE. Change-Id: I46adece3ba1ff1a4c95218a1bc731dea05afc1f3 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 34f93ea4294e2254c95478521fa9886dfed43910) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/pdf/CMakeLists.txt2
-rw-r--r--src/pdf/qpdfdocument_p.h1
-rw-r--r--src/pdf/qtpdfglobal.h19
3 files changed, 4 insertions, 18 deletions
diff --git a/src/pdf/CMakeLists.txt b/src/pdf/CMakeLists.txt
index f51e461ac..8070eb39a 100644
--- a/src/pdf/CMakeLists.txt
+++ b/src/pdf/CMakeLists.txt
@@ -38,6 +38,8 @@ qt_internal_add_module(Pdf
PUBLIC_LIBRARIES
Qt::Core
Qt::Gui
+ GENERATE_CPP_EXPORTS
+ GENERATE_PRIVATE_CPP_EXPORTS
)
add_subdirectory(plugins/imageformats/pdf)
diff --git a/src/pdf/qpdfdocument_p.h b/src/pdf/qpdfdocument_p.h
index d52aabe4b..4adbf695e 100644
--- a/src/pdf/qpdfdocument_p.h
+++ b/src/pdf/qpdfdocument_p.h
@@ -16,6 +16,7 @@
//
#include "qpdfdocument.h"
+#include "private/qtpdfexports_p.h"
#include "third_party/pdfium/public/fpdfview.h"
#include "third_party/pdfium/public/fpdf_dataavail.h"
diff --git a/src/pdf/qtpdfglobal.h b/src/pdf/qtpdfglobal.h
index d38eafaab..2d0900029 100644
--- a/src/pdf/qtpdfglobal.h
+++ b/src/pdf/qtpdfglobal.h
@@ -5,24 +5,7 @@
#define QTPDFGLOBAL_H
#include <QtCore/qglobal.h>
-
-QT_BEGIN_NAMESPACE
-
-#ifndef Q_PDF_EXPORT
-# ifndef QT_STATIC
-# if defined(QT_BUILD_PDF_LIB)
-# define Q_PDF_EXPORT Q_DECL_EXPORT
-# else
-# define Q_PDF_EXPORT Q_DECL_IMPORT
-# endif
-# else
-# define Q_PDF_EXPORT
-# endif
-#endif
-
-#define Q_PDF_PRIVATE_EXPORT Q_PDF_EXPORT
-
-QT_END_NAMESPACE
+#include <QtPdf/qtpdfexports.h>
#endif // QTPDFGLOBAL_H