From c17165b088718169dcf023981686fd11fb9977a0 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Wed, 20 Dec 2023 14:14:35 +1000 Subject: [PATCH] Avoid QtCore import, which results in ALL Qt core headers being imported --- Pdf4QtLibCore/sources/pdfcatalog.h | 2 -- Pdf4QtLibCore/sources/pdfcms.cpp | 3 +++ Pdf4QtLibCore/sources/pdfdocument.h | 1 - Pdf4QtLibCore/sources/pdfdocumentbuilder.h | 1 + Pdf4QtLibCore/sources/pdfdocumentreader.h | 2 +- Pdf4QtLibCore/sources/pdfdocumentwriter.cpp | 1 + Pdf4QtLibCore/sources/pdffont.cpp | 2 ++ Pdf4QtLibCore/sources/pdffont.h | 1 + Pdf4QtLibCore/sources/pdffunction.cpp | 2 ++ Pdf4QtLibCore/sources/pdfglobal.h | 2 +- Pdf4QtLibCore/sources/pdficontheme.cpp | 1 + Pdf4QtLibCore/sources/pdfobjectutils.h | 2 -- Pdf4QtLibCore/sources/pdfpage.h | 1 + Pdf4QtLibCore/sources/pdfparser.cpp | 1 + Pdf4QtLibCore/sources/pdfparser.h | 1 - Pdf4QtLibCore/sources/pdfpattern.cpp | 1 + Pdf4QtLibCore/sources/pdfsecurityhandler.h | 2 ++ Pdf4QtLibCore/sources/pdfsignaturehandler.cpp | 3 +++ Pdf4QtLibCore/sources/pdftextlayout.cpp | 4 ++++ Pdf4QtLibCore/sources/pdftextlayout.h | 2 ++ Pdf4QtLibCore/sources/pdfxfaengine.cpp | 1 + Pdf4QtLibCore/sources/pdfxreftable.cpp | 1 + Pdf4QtLibCore/sources/pdfxreftable.h | 2 -- 23 files changed, 29 insertions(+), 10 deletions(-) diff --git a/Pdf4QtLibCore/sources/pdfcatalog.h b/Pdf4QtLibCore/sources/pdfcatalog.h index 17203c1..a90a011 100644 --- a/Pdf4QtLibCore/sources/pdfcatalog.h +++ b/Pdf4QtLibCore/sources/pdfcatalog.h @@ -24,8 +24,6 @@ #include "pdfoutline.h" #include "pdfaction.h" -#include - #include #include #include diff --git a/Pdf4QtLibCore/sources/pdfcms.cpp b/Pdf4QtLibCore/sources/pdfcms.cpp index 19de17f..a105808 100644 --- a/Pdf4QtLibCore/sources/pdfcms.cpp +++ b/Pdf4QtLibCore/sources/pdfcms.cpp @@ -20,7 +20,10 @@ #include "pdfexecutionpolicy.h" #include "pdfdbgheap.h" +#include #include +#include +#include #include #ifdef PDF4QT_COMPILER_CLANG diff --git a/Pdf4QtLibCore/sources/pdfdocument.h b/Pdf4QtLibCore/sources/pdfdocument.h index 977f825..be96d65 100644 --- a/Pdf4QtLibCore/sources/pdfdocument.h +++ b/Pdf4QtLibCore/sources/pdfdocument.h @@ -23,7 +23,6 @@ #include "pdfcatalog.h" #include "pdfsecurityhandler.h" -#include #include #include #include diff --git a/Pdf4QtLibCore/sources/pdfdocumentbuilder.h b/Pdf4QtLibCore/sources/pdfdocumentbuilder.h index 0cd2384..fe6c35f 100644 --- a/Pdf4QtLibCore/sources/pdfdocumentbuilder.h +++ b/Pdf4QtLibCore/sources/pdfdocumentbuilder.h @@ -23,6 +23,7 @@ #include "pdfannotation.h" class QPdfWriter; +class QBuffer; namespace pdf { diff --git a/Pdf4QtLibCore/sources/pdfdocumentreader.h b/Pdf4QtLibCore/sources/pdfdocumentreader.h index e3643da..7b02f3f 100644 --- a/Pdf4QtLibCore/sources/pdfdocumentreader.h +++ b/Pdf4QtLibCore/sources/pdfdocumentreader.h @@ -24,8 +24,8 @@ #include "pdfprogress.h" #include "pdfxreftable.h" -#include #include +#include namespace pdf { diff --git a/Pdf4QtLibCore/sources/pdfdocumentwriter.cpp b/Pdf4QtLibCore/sources/pdfdocumentwriter.cpp index df1d6fb..1564667 100644 --- a/Pdf4QtLibCore/sources/pdfdocumentwriter.cpp +++ b/Pdf4QtLibCore/sources/pdfdocumentwriter.cpp @@ -21,6 +21,7 @@ #include "pdfparser.h" #include "pdfdbgheap.h" +#include #include #include diff --git a/Pdf4QtLibCore/sources/pdffont.cpp b/Pdf4QtLibCore/sources/pdffont.cpp index e725b5a..41e7aee 100644 --- a/Pdf4QtLibCore/sources/pdffont.cpp +++ b/Pdf4QtLibCore/sources/pdffont.cpp @@ -30,6 +30,8 @@ #include #include +#include +#include #include #include #include diff --git a/Pdf4QtLibCore/sources/pdffont.h b/Pdf4QtLibCore/sources/pdffont.h index 74a5bbf..737b2ae 100644 --- a/Pdf4QtLibCore/sources/pdffont.h +++ b/Pdf4QtLibCore/sources/pdffont.h @@ -23,6 +23,7 @@ #include "pdfobject.h" #include +#include #include #include diff --git a/Pdf4QtLibCore/sources/pdffunction.cpp b/Pdf4QtLibCore/sources/pdffunction.cpp index 6694929..bd00627 100644 --- a/Pdf4QtLibCore/sources/pdffunction.cpp +++ b/Pdf4QtLibCore/sources/pdffunction.cpp @@ -23,6 +23,8 @@ #include "pdfutils.h" #include "pdfdbgheap.h" +#include + #include #include #include diff --git a/Pdf4QtLibCore/sources/pdfglobal.h b/Pdf4QtLibCore/sources/pdfglobal.h index 8645633..4c48d43 100644 --- a/Pdf4QtLibCore/sources/pdfglobal.h +++ b/Pdf4QtLibCore/sources/pdfglobal.h @@ -18,8 +18,8 @@ #ifndef PDFGLOBAL_H #define PDFGLOBAL_H -#include #include +#include #include #include diff --git a/Pdf4QtLibCore/sources/pdficontheme.cpp b/Pdf4QtLibCore/sources/pdficontheme.cpp index ac66789..8ca455c 100644 --- a/Pdf4QtLibCore/sources/pdficontheme.cpp +++ b/Pdf4QtLibCore/sources/pdficontheme.cpp @@ -19,6 +19,7 @@ #include "pdfdbgheap.h" #include +#include namespace pdf { diff --git a/Pdf4QtLibCore/sources/pdfobjectutils.h b/Pdf4QtLibCore/sources/pdfobjectutils.h index 52dba51..9b93dcb 100644 --- a/Pdf4QtLibCore/sources/pdfobjectutils.h +++ b/Pdf4QtLibCore/sources/pdfobjectutils.h @@ -20,8 +20,6 @@ #include "pdfobject.h" -#include - #include #include #include diff --git a/Pdf4QtLibCore/sources/pdfpage.h b/Pdf4QtLibCore/sources/pdfpage.h index 001e766..20c8ae9 100644 --- a/Pdf4QtLibCore/sources/pdfpage.h +++ b/Pdf4QtLibCore/sources/pdfpage.h @@ -21,6 +21,7 @@ #include "pdfobject.h" #include +#include #include #include diff --git a/Pdf4QtLibCore/sources/pdfparser.cpp b/Pdf4QtLibCore/sources/pdfparser.cpp index 934549d..679ffe3 100644 --- a/Pdf4QtLibCore/sources/pdfparser.cpp +++ b/Pdf4QtLibCore/sources/pdfparser.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include diff --git a/Pdf4QtLibCore/sources/pdfparser.h b/Pdf4QtLibCore/sources/pdfparser.h index 41f5deb..abcfd16 100644 --- a/Pdf4QtLibCore/sources/pdfparser.h +++ b/Pdf4QtLibCore/sources/pdfparser.h @@ -23,7 +23,6 @@ #include "pdfobject.h" #include "pdfflatmap.h" -#include #include #include diff --git a/Pdf4QtLibCore/sources/pdfpattern.cpp b/Pdf4QtLibCore/sources/pdfpattern.cpp index 77de70d..de5a5cd 100644 --- a/Pdf4QtLibCore/sources/pdfpattern.cpp +++ b/Pdf4QtLibCore/sources/pdfpattern.cpp @@ -24,6 +24,7 @@ #include "pdfconstants.h" #include "pdfdbgheap.h" +#include #include #include diff --git a/Pdf4QtLibCore/sources/pdfsecurityhandler.h b/Pdf4QtLibCore/sources/pdfsecurityhandler.h index 32930a5..adc8b34 100644 --- a/Pdf4QtLibCore/sources/pdfsecurityhandler.h +++ b/Pdf4QtLibCore/sources/pdfsecurityhandler.h @@ -24,6 +24,8 @@ #include #include +class QRandomGenerator; + #include #include diff --git a/Pdf4QtLibCore/sources/pdfsignaturehandler.cpp b/Pdf4QtLibCore/sources/pdfsignaturehandler.cpp index 42d9262..256f577 100644 --- a/Pdf4QtLibCore/sources/pdfsignaturehandler.cpp +++ b/Pdf4QtLibCore/sources/pdfsignaturehandler.cpp @@ -40,10 +40,13 @@ #include #include +#include +#include #include #include #include #include +#include #include #ifdef Q_OS_UNIX diff --git a/Pdf4QtLibCore/sources/pdftextlayout.cpp b/Pdf4QtLibCore/sources/pdftextlayout.cpp index aca2d9c..d8a0da8 100644 --- a/Pdf4QtLibCore/sources/pdftextlayout.cpp +++ b/Pdf4QtLibCore/sources/pdftextlayout.cpp @@ -20,7 +20,11 @@ #include "pdfexecutionpolicy.h" #include "pdfdbgheap.h" +#include +#include #include +#include +#include #include diff --git a/Pdf4QtLibCore/sources/pdftextlayout.h b/Pdf4QtLibCore/sources/pdftextlayout.h index 79983a9..617d4c6 100644 --- a/Pdf4QtLibCore/sources/pdftextlayout.h +++ b/Pdf4QtLibCore/sources/pdftextlayout.h @@ -25,6 +25,8 @@ #include #include +class QMutex; + #include #include diff --git a/Pdf4QtLibCore/sources/pdfxfaengine.cpp b/Pdf4QtLibCore/sources/pdfxfaengine.cpp index 316200f..4ae73f2 100644 --- a/Pdf4QtLibCore/sources/pdfxfaengine.cpp +++ b/Pdf4QtLibCore/sources/pdfxfaengine.cpp @@ -21,6 +21,7 @@ #include "pdffont.h" #include "pdfdbgheap.h" +#include #include #include #include diff --git a/Pdf4QtLibCore/sources/pdfxreftable.cpp b/Pdf4QtLibCore/sources/pdfxreftable.cpp index 90d175b..99ed65f 100644 --- a/Pdf4QtLibCore/sources/pdfxreftable.cpp +++ b/Pdf4QtLibCore/sources/pdfxreftable.cpp @@ -22,6 +22,7 @@ #include "pdfstreamfilters.h" #include "pdfdbgheap.h" +#include #include namespace pdf diff --git a/Pdf4QtLibCore/sources/pdfxreftable.h b/Pdf4QtLibCore/sources/pdfxreftable.h index d75f660..abfa71a 100644 --- a/Pdf4QtLibCore/sources/pdfxreftable.h +++ b/Pdf4QtLibCore/sources/pdfxreftable.h @@ -21,8 +21,6 @@ #include "pdfglobal.h" #include "pdfobject.h" -#include - #include namespace pdf