diff --git a/CMakeLists.txt b/CMakeLists.txt
index cf36cf7..3a1f5da 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -59,7 +59,7 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_AUTORCC_OPTIONS "--threshold;0;--compress;9")
if (MSVC)
- add_compile_options(/bigobj)
+ add_compile_options(/bigobj /W4 /wd5054 /wd4127 /wd4702)
endif()
if (MINGW)
diff --git a/CodeGenerator/CodeGenerator.pro b/CodeGenerator/CodeGenerator.pro
deleted file mode 100644
index e126d81..0000000
--- a/CodeGenerator/CodeGenerator.pro
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright (C) 2018-2021 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-QT += core gui xml widgets
-
-# The following define makes your compiler emit warnings if you use
-# any Qt feature that has been marked deprecated (the exact warnings
-# depend on your compiler). Please consult the documentation of the
-# deprecated API in order to know how to port your code away from it.
-DEFINES += QT_DEPRECATED_WARNINGS
-
-# You can also make your code fail to compile if it uses deprecated APIs.
-# In order to do so, uncomment the following line.
-# You can also select to disable deprecated APIs only up to a certain version of Qt.
-#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
-
-include(../Pdf4Qt.pri)
-
-DESTDIR = $$OUT_PWD/..
-
-LIBS += -L$$OUT_PWD/..
-
-
-SOURCES += \
- codegenerator.cpp \
- main.cpp \
- generatormainwindow.cpp
-
-HEADERS += \
- codegenerator.h \
- generatormainwindow.h
-
-FORMS += \
- generatormainwindow.ui
-
diff --git a/CodeGenerator/CodeGenerator.qbs b/CodeGenerator/CodeGenerator.qbs
deleted file mode 100644
index 4bf6b63..0000000
--- a/CodeGenerator/CodeGenerator.qbs
+++ /dev/null
@@ -1,9 +0,0 @@
-Pdf4QtApp {
- name: "CodeGenerator"
- files: [
- "*.cpp",
- "*.h",
- "*.ui",
- ]
- Depends { name: "Qt"; submodules: ["xml"] }
-}
diff --git a/JBIG2_Viewer/JBIG2_Viewer.pro b/JBIG2_Viewer/JBIG2_Viewer.pro
deleted file mode 100644
index cb58567..0000000
--- a/JBIG2_Viewer/JBIG2_Viewer.pro
+++ /dev/null
@@ -1,34 +0,0 @@
-QT += core gui
-
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
-
-# The following define makes your compiler emit warnings if you use
-# any Qt feature that has been marked deprecated (the exact warnings
-# depend on your compiler). Please consult the documentation of the
-# deprecated API in order to know how to port your code away from it.
-DEFINES += QT_DEPRECATED_WARNINGS
-
-# You can also make your code fail to compile if it uses deprecated APIs.
-# In order to do so, uncomment the following line.
-# You can also select to disable deprecated APIs only up to a certain version of Qt.
-#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
-
-include(../Pdf4Qt.pri)
-
-INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
-
-DESTDIR = $$OUT_PWD/..
-
-LIBS += -L$$OUT_PWD/..
-
-LIBS += -lPDF4QtLib
-
-SOURCES += \
- main.cpp \
- mainwindow.cpp
-
-HEADERS += \
- mainwindow.h
-
-FORMS += \
- mainwindow.ui
diff --git a/JBIG2_Viewer/JBIG2_Viewer.qbs b/JBIG2_Viewer/JBIG2_Viewer.qbs
deleted file mode 100644
index 9165413..0000000
--- a/JBIG2_Viewer/JBIG2_Viewer.qbs
+++ /dev/null
@@ -1,9 +0,0 @@
-Pdf4QtApp {
- name: "JBIG2_Viewer"
- files: [
- "*.cpp",
- "*.h",
- "*.ui",
- ]
- Depends { name: "Qt"; submodules: ["widgets"] }
-}
diff --git a/Pdf4Qt.pri b/Pdf4Qt.pri
deleted file mode 100644
index 8268a3f..0000000
--- a/Pdf4Qt.pri
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright (C) 2018-2022 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-win32-msvc*: {
- QMAKE_CXXFLAGS += /std:c++latest /utf-8 /bigobj
- QMAKE_CXXFLAGS_WARN_ON -= -W3
- QMAKE_CXXFLAGS_WARN_ON += -W4 -wd5054 -wd4127 -wd4702
-}
-
-win32-*g++|unix: {
- CONFIG += link_pkgconfig
- QMAKE_CXXFLAGS += -std=c++20
- win32: {
- QMAKE_CXXFLAGS += -Wa,-mbig-obj
- }
-}
-
-win32 {
- CONFIG += skip_target_version_ext
-} else {
- CONFIG += unversioned_libname
-}
-
-VERSION = 1.2.1
-DEFINES += PDF4QT_PROJECT_VERSION=$$VERSION
diff --git a/Pdf4Qt.pro b/Pdf4Qt.pro
deleted file mode 100644
index 56a21cf..0000000
--- a/Pdf4Qt.pro
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright (C) 2018-2021 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-TEMPLATE = subdirs
-
-SUBDIRS += \
- Pdf4QtLib \
- CodeGenerator \
- JBIG2_Viewer \
- PdfExampleGenerator \
- PdfTool \
- UnitTests \
- Pdf4QtViewer \
- Pdf4QtViewerPlugins \
- Pdf4QtViewerProfi \
- Pdf4QtViewerLite \
- Pdf4QtDocPageOrganizer \
- Pdf4QtDocDiff
-
-CodeGenerator.depends = Pdf4QtLib
-JBIG2_Viewer.depends = Pdf4QtLib
-PdfExampleGenerator.depends = Pdf4QtLib
-PdfTool.depends = Pdf4QtLib
-UnitTests.depends = Pdf4QtLib
-Pdf4QtViewer.depends = Pdf4QtLib
-Pdf4QtViewerPlugins.depends = Pdf4QtLib
-Pdf4QtViewerProfi.depends = Pdf4QtViewer
-Pdf4QtViewerLite.depends = Pdf4QtViewer
-Pdf4QtDocPageOrganizer.depends = Pdf4QtLib
-Pdf4QtDocDiff.depends = Pdf4QtLib
diff --git a/Pdf4Qt.qbs b/Pdf4Qt.qbs
deleted file mode 100644
index 0218a85..0000000
--- a/Pdf4Qt.qbs
+++ /dev/null
@@ -1,56 +0,0 @@
-import qbs
-import qbs.FileInfo
-import qbs.Probes
-
-Project {
- name: "Pdf4Qt"
- qbsSearchPaths: ["qbs"]
- property string conanLibDirectory: FileInfo.joinPaths(conan.generatedFilesPath, "lib")
-
- Probes.ConanfileProbe {
- id: conan
- conanfilePath: project.sourceDirectory + "/conanfile.txt"
- generators: "qbs"
- }
-
- references: {
- var ref = ["Pdf4QtLib/Pdf4QtLib.qbs",
- "Pdf4QtViewer/Pdf4QtViewer.qbs",
- "Pdf4QtViewerPlugins/AudioBookPlugin/AudioBookPlugin.qbs",
- "Pdf4QtViewerPlugins/DimensionsPlugin/DimensionsPlugin.qbs",
- "Pdf4QtViewerPlugins/OutputPreviewPlugin/OutputPreviewPlugin.qbs",
- "Pdf4QtViewerPlugins/RedactPlugin/RedactPlugin.qbs",
- "Pdf4QtViewerPlugins/SoftProofingPlugin/SoftProofingPlugin.qbs",
- "Pdf4QtViewerPlugins/SignaturePlugin/SignaturePlugin.qbs",
- ];
- ref.push(conan.generatedFilesPath + "/conanbuildinfo.qbs");
- return ref;
- }
- SubProject {
- filePath: "Pdf4QtViewerProfi/Pdf4QtViewerProfi.qbs"
- }
- SubProject {
- filePath: "CodeGenerator/CodeGenerator.qbs"
- }
- SubProject {
- filePath: "JBIG2_Viewer/JBIG2_Viewer.qbs"
- }
- SubProject {
- filePath: "Pdf4QtDocPageOrganizer/Pdf4QtDocPageOrganizer.qbs"
- }
- SubProject {
- filePath: "Pdf4QtViewerLite/Pdf4QtViewerLite.qbs"
- }
- SubProject {
- filePath: "Pdf4QtDocDiff/Pdf4QtDocDiff.qbs"
- }
- SubProject {
- filePath: "PdfExampleGenerator/PdfExampleGenerator.qbs"
- }
- SubProject {
- filePath: "PdfTool/PdfTool.qbs"
- }
- SubProject {
- filePath: "UnitTests/UnitTests.qbs"
- }
-}
diff --git a/Pdf4QtDocDiff/Pdf4QtDocDiff.pro b/Pdf4QtDocDiff/Pdf4QtDocDiff.pro
deleted file mode 100644
index 417b0ae..0000000
--- a/Pdf4QtDocDiff/Pdf4QtDocDiff.pro
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright (C) 2021-2022 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-QT += core gui widgets winextras
-
-TARGET = Pdf4QtDocDiff
-TEMPLATE = app
-
-include(../Pdf4Qt.pri)
-
-RC_ICONS = $$PWD/app-icon.ico
-
-QMAKE_TARGET_DESCRIPTION = "PDF Document Diff"
-QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2022"
-
-DEFINES += QT_DEPRECATED_WARNINGS
-
-INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
-DESTDIR = $$OUT_PWD/..
-LIBS += -L$$OUT_PWD/..
-LIBS += -lPDF4QtLib
-CONFIG += force_debug_info no_check_exist
-
-application.files = $$DESTDIR/Pdf4QtDocDiff.exe
-application.path = $$DESTDIR/install
-application.CONFIG += no_check_exist
-INSTALLS += application
-
-SOURCES += \
- aboutdialog.cpp \
- differencesdockwidget.cpp \
- main.cpp \
- mainwindow.cpp \
- settingsdockwidget.cpp \
- utils.cpp
-
-FORMS += \
- aboutdialog.ui \
- differencesdockwidget.ui \
- mainwindow.ui \
- settingsdockwidget.ui
-
-HEADERS += \
- aboutdialog.h \
- differencesdockwidget.h \
- mainwindow.h \
- settings.h \
- settingsdockwidget.h \
- utils.h
-
-RESOURCES += \
- resources.qrc
diff --git a/Pdf4QtDocDiff/Pdf4QtDocDiff.qbs b/Pdf4QtDocDiff/Pdf4QtDocDiff.qbs
deleted file mode 100644
index bda4077..0000000
--- a/Pdf4QtDocDiff/Pdf4QtDocDiff.qbs
+++ /dev/null
@@ -1,12 +0,0 @@
-Pdf4QtApp {
- name: "Pdf4QtDocDiff"
- files: [
- "*.cpp",
- "*.h",
- "*.ui",
- "resources.qrc",
- ]
- cpp.includePaths: ["."]
- Depends { name: "Qt"; submodules: ["widgets"] }
- Depends { name: "Qt.winextras"; condition: qbs.hostOS.contains("windows") }
-}
diff --git a/Pdf4QtDocPageOrganizer/Pdf4QtDocPageOrganizer.pro b/Pdf4QtDocPageOrganizer/Pdf4QtDocPageOrganizer.pro
deleted file mode 100644
index ddeca48..0000000
--- a/Pdf4QtDocPageOrganizer/Pdf4QtDocPageOrganizer.pro
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright (C) 2022 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-QT += core gui widgets winextras
-
-TARGET = Pdf4QtDocPageOrganizer
-TEMPLATE = app
-
-include(../Pdf4Qt.pri)
-
-RC_ICONS = $$PWD/app-icon.ico
-
-QMAKE_TARGET_DESCRIPTION = "PDF Document Page Organizer"
-QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2022"
-
-DEFINES += QT_DEPRECATED_WARNINGS
-
-INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
-DESTDIR = $$OUT_PWD/..
-LIBS += -L$$OUT_PWD/..
-LIBS += -lPDF4QtLib
-CONFIG += force_debug_info no_check_exist
-
-application.files = $$DESTDIR/Pdf4QtDocPageOrganizer.exe
-application.path = $$DESTDIR/install
-application.CONFIG += no_check_exist
-INSTALLS += application
-
-SOURCES += \
- aboutdialog.cpp \
- assembleoutputsettingsdialog.cpp \
- main.cpp \
- mainwindow.cpp \
- pageitemdelegate.cpp \
- pageitemmodel.cpp \
- selectbookmarkstoregroupdialog.cpp
-
-FORMS += \
- aboutdialog.ui \
- assembleoutputsettingsdialog.ui \
- mainwindow.ui \
- selectbookmarkstoregroupdialog.ui
-
-HEADERS += \
- aboutdialog.h \
- assembleoutputsettingsdialog.h \
- mainwindow.h \
- pageitemdelegate.h \
- pageitemmodel.h \
- selectbookmarkstoregroupdialog.h
-
-RESOURCES += \
- resources.qrc
diff --git a/Pdf4QtDocPageOrganizer/Pdf4QtDocPageOrganizer.qbs b/Pdf4QtDocPageOrganizer/Pdf4QtDocPageOrganizer.qbs
deleted file mode 100644
index d5c3b4c..0000000
--- a/Pdf4QtDocPageOrganizer/Pdf4QtDocPageOrganizer.qbs
+++ /dev/null
@@ -1,11 +0,0 @@
-Pdf4QtApp {
- name: "Pdf4QtDocPageOrganizer"
- files: [
- "*.cpp",
- "*.h",
- "*.ui",
- "resources.qrc",
- ]
- cpp.includePaths: ["."]
- Depends { name: "Qt"; submodules: ["widgets"] }
-}
diff --git a/Pdf4QtDocPageOrganizer/pageitemdelegate.cpp b/Pdf4QtDocPageOrganizer/pageitemdelegate.cpp
index 27c1911..84c2ea1 100644
--- a/Pdf4QtDocPageOrganizer/pageitemdelegate.cpp
+++ b/Pdf4QtDocPageOrganizer/pageitemdelegate.cpp
@@ -95,7 +95,7 @@ void PageItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& opti
if (option.state.testFlag(QStyle::State_Selected))
{
QColor selectedColor = option.palette.color(QPalette::Active, QPalette::Highlight);
- selectedColor.setAlphaF(0.3);
+ selectedColor.setAlphaF(0.3f);
painter->fillRect(rect, selectedColor);
}
diff --git a/Pdf4QtLib/Pdf4QtLib.pro b/Pdf4QtLib/Pdf4QtLib.pro
deleted file mode 100644
index cab50fe..0000000
--- a/Pdf4QtLib/Pdf4QtLib.pro
+++ /dev/null
@@ -1,338 +0,0 @@
-# Copyright (C) 2018-2022 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-QT += gui widgets xml svg
-
-TARGET = Pdf4QtLib
-TEMPLATE = lib
-
-include(../Pdf4Qt.pri)
-
-QMAKE_TARGET_DESCRIPTION = "PDF rendering / editing library for Qt"
-QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2022"
-
-DEFINES += PDF4QTLIB_LIBRARY
-
-# The following define makes your compiler emit warnings if you use
-# any feature of Qt which has been marked as deprecated (the exact warnings
-# depend on your compiler). Please consult the documentation of the
-# deprecated API in order to know how to port your code away from it.
-DEFINES += QT_DEPRECATED_WARNINGS
-
-# You can also make your code fail to compile if you use deprecated APIs.
-# In order to do so, uncomment the following line.
-# You can also select to disable deprecated APIs only up to a certain version of Qt.
-#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
-
-DESTDIR = $$OUT_PWD/..
-
-SOURCES += \
- sources/pdfaction.cpp \
- sources/pdfadvancedtools.cpp \
- sources/pdfalgorithmlcs.cpp \
- sources/pdfannotation.cpp \
- sources/pdfblendfunction.cpp \
- sources/pdfccittfaxdecoder.cpp \
- sources/pdfcertificatemanager.cpp \
- sources/pdfcertificatemanagerdialog.cpp \
- sources/pdfcms.cpp \
- sources/pdfcompiler.cpp \
- sources/pdfcreatecertificatedialog.cpp \
- sources/pdfdiff.cpp \
- sources/pdfdocumentbuilder.cpp \
- sources/pdfdocumentmanipulator.cpp \
- sources/pdfdocumenttextflow.cpp \
- sources/pdfdocumenttextfloweditormodel.cpp \
- sources/pdfdocumentwriter.cpp \
- sources/pdfexecutionpolicy.cpp \
- sources/pdffile.cpp \
- sources/pdfform.cpp \
- sources/pdficontheme.cpp \
- sources/pdfitemmodels.cpp \
- sources/pdfjavascriptscanner.cpp \
- sources/pdfjbig2decoder.cpp \
- sources/pdfmultimedia.cpp \
- sources/pdfobject.cpp \
- sources/pdfobjecteditormodel.cpp \
- sources/pdfobjecteditorwidget.cpp \
- sources/pdfobjectutils.cpp \
- sources/pdfoptimizer.cpp \
- sources/pdfoptionalcontent.cpp \
- sources/pdfoutline.cpp \
- sources/pdfpagecontenteditorstylesettings.cpp \
- sources/pdfpagecontenteditortools.cpp \
- sources/pdfpagecontenteditorwidget.cpp \
- sources/pdfpagecontentelements.cpp \
- sources/pdfpagenavigation.cpp \
- sources/pdfpagetransition.cpp \
- sources/pdfpainterutils.cpp \
- sources/pdfparser.cpp \
- sources/pdfdocument.cpp \
- sources/pdfdocumentreader.cpp \
- sources/pdfpattern.cpp \
- sources/pdfplugin.cpp \
- sources/pdfprogress.cpp \
- sources/pdfredact.cpp \
- sources/pdfsecurityhandler.cpp \
- sources/pdfselectpagesdialog.cpp \
- sources/pdfsignaturehandler.cpp \
- sources/pdfsnapper.cpp \
- sources/pdfstructuretree.cpp \
- sources/pdftexteditpseudowidget.cpp \
- sources/pdftextlayout.cpp \
- sources/pdftransparencyrenderer.cpp \
- sources/pdfutils.cpp \
- sources/pdfwidgettool.cpp \
- sources/pdfwidgetutils.cpp \
- sources/pdfxfaengine.cpp \
- sources/pdfxreftable.cpp \
- sources/pdfvisitor.cpp \
- sources/pdfencoding.cpp \
- sources/pdfcatalog.cpp \
- sources/pdfpage.cpp \
- sources/pdfstreamfilters.cpp \
- sources/pdfdrawspacecontroller.cpp \
- sources/pdfdrawwidget.cpp \
- sources/pdfcolorspaces.cpp \
- sources/pdfrenderer.cpp \
- sources/pdfpagecontentprocessor.cpp \
- sources/pdfpainter.cpp \
- sources/pdfrenderingerrorswidget.cpp \
- sources/pdffunction.cpp \
- sources/pdfnametounicode.cpp \
- sources/pdffont.cpp \
- sources/pdfimage.cpp
-
-HEADERS += \
- sources/pdfaction.h \
- sources/pdfadvancedtools.h \
- sources/pdfalgorithmlcs.h \
- sources/pdfannotation.h \
- sources/pdfblendfunction.h \
- sources/pdfccittfaxdecoder.h \
- sources/pdfcertificatemanager.h \
- sources/pdfcertificatemanagerdialog.h \
- sources/pdfcms.h \
- sources/pdfcompiler.h \
- sources/pdfcreatecertificatedialog.h \
- sources/pdfdbgheap.h \
- sources/pdfdiff.h \
- sources/pdfdocumentbuilder.h \
- sources/pdfdocumentdrawinterface.h \
- sources/pdfdocumentmanipulator.h \
- sources/pdfdocumenttextflow.h \
- sources/pdfdocumenttextfloweditormodel.h \
- sources/pdfdocumentwriter.h \
- sources/pdfexecutionpolicy.h \
- sources/pdffile.h \
- sources/pdfform.h \
- sources/pdficontheme.h \
- sources/pdfitemmodels.h \
- sources/pdfjavascriptscanner.h \
- sources/pdfjbig2decoder.h \
- sources/pdfmeshqualitysettings.h \
- sources/pdfmultimedia.h \
- sources/pdfnametreeloader.h \
- sources/pdfobject.h \
- sources/pdfobjecteditormodel.h \
- sources/pdfobjecteditorwidget.h \
- sources/pdfobjecteditorwidget_impl.h \
- sources/pdfobjectutils.h \
- sources/pdfoperationcontrol.h \
- sources/pdfoptimizer.h \
- sources/pdfoptionalcontent.h \
- sources/pdfoutline.h \
- sources/pdfpagecontenteditorstylesettings.h \
- sources/pdfpagecontenteditortools.h \
- sources/pdfpagecontenteditorwidget.h \
- sources/pdfpagecontentelements.h \
- sources/pdfpagenavigation.h \
- sources/pdfpagetransition.h \
- sources/pdfpainterutils.h \
- sources/pdfparser.h \
- sources/pdfglobal.h \
- sources/pdfconstants.h \
- sources/pdfdocument.h \
- sources/pdfdocumentreader.h \
- sources/pdfpattern.h \
- sources/pdfplugin.h \
- sources/pdfprogress.h \
- sources/pdfredact.h \
- sources/pdfsecurityhandler.h \
- sources/pdfselectpagesdialog.h \
- sources/pdfsignaturehandler.h \
- sources/pdfsignaturehandler_impl.h \
- sources/pdfsnapper.h \
- sources/pdfstructuretree.h \
- sources/pdftexteditpseudowidget.h \
- sources/pdftextlayout.h \
- sources/pdftransparencyrenderer.h \
- sources/pdfwidgettool.h \
- sources/pdfwidgetutils.h \
- sources/pdfxfaengine.h \
- sources/pdfxreftable.h \
- sources/pdfflatmap.h \
- sources/pdfvisitor.h \
- sources/pdfencoding.h \
- sources/pdfcatalog.h \
- sources/pdfnumbertreeloader.h \
- sources/pdfpage.h \
- sources/pdfstreamfilters.h \
- sources/pdfdrawspacecontroller.h \
- sources/pdfdrawwidget.h \
- sources/pdfflatarray.h \
- sources/pdfcolorspaces.h \
- sources/pdfrenderer.h \
- sources/pdfpagecontentprocessor.h \
- sources/pdfpainter.h \
- sources/pdfutils.h \
- sources/pdfrenderingerrorswidget.h \
- sources/pdffunction.h \
- sources/pdfnametounicode.h \
- sources/pdffont.h \
- sources/pdfexception.h \
- sources/pdfimage.h
-
-FORMS += \
- sources/pdfcertificatemanagerdialog.ui \
- sources/pdfcreatecertificatedialog.ui \
- sources/pdfpagecontenteditorstylesettings.ui \
- sources/pdfpagecontenteditorwidget.ui \
- sources/pdfrenderingerrorswidget.ui \
- sources/pdfselectpagesdialog.ui
-
-RESOURCES += cmaps.qrc
-
-Pdf4Qt_DEPENDENCIES_PATH = $$absolute_path(../../PdfforQt-Dependencies, $$PWD)
-Pdf4Qt_OPENSSL_PATH = $$absolute_path(../../Tools, $$[QT_INSTALL_PREFIX])
-
-CONFIG(debug, debug|release) {
-SUFFIX = d
-}
-
-win32-msvc*: {
- # Link to freetype library
- LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/FreeType/ -lfreetype$${SUFFIX}
- INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/FreeType/include
- DEPENDPATH += $$Pdf4Qt_DEPENDENCIES_PATH/FreeType/include
-
- # Link to OpenJPEG library
- LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/OpenJPEG/lib/ -lopenjp2$${SUFFIX}
- INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/OpenJPEG/include/openjpeg-2.3
- DEPENDPATH += $$Pdf4Qt_DEPENDENCIES_PATH/OpenJPEG/include/openjpeg-2.3
- DEFINES += OPJ_STATIC
-
- # Link to Independent JPEG Groups libjpeg
- LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/libjpeg/bin/ -ljpeg$${SUFFIX}
- INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/libjpeg/include
- DEPENDPATH += $$Pdf4Qt_DEPENDENCIES_PATH/libjpeg/include
-
- # Link OpenSSL
- LIBS += -L$$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/bin -L$$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/lib -llibcrypto -llibssl
- INCLUDEPATH += $$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/include
- DEPENDPATH += $$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/include
-
- # Add OpenSSL to installations
- openssl_lib.files = $$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/bin/libcrypto-1_1-x64.dll $$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/bin/libssl-1_1-x64.dll
- openssl_lib.path = $$DESTDIR/install
- INSTALLS += openssl_lib
-
- # Link zlib
- LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/zlib/bin/ -lzlibstatic$${SUFFIX}
- INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/zlib/include
- DEPENDPATH += $$Pdf4Qt_DEPENDENCIES_PATH/zlib/include
-
- # Link lcms2
- LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/lcms2/bin$${SUFFIX}/ -llcms2_static
- INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/lcms2/include
- DEPENDPATH += $$Pdf4Qt_DEPENDENCIES_PATH/lcms2/include
-}
-
-win32-*g++|unix: {
- PKGCONFIG += freetype2 libopenjp2 libjpeg lcms2 libssl libcrypto zlib
- LIBS += -ltbb
- win32: {
- LIBS += -lmscms -lcrypt32 -lsecur32
- }
-}
-
-# ensure debug info even for RELEASE build
-CONFIG += force_debug_info
-
-
-QMAKE_RESOURCE_FLAGS += -threshold 0 -compress 9
-
-PdfforQt_library.files = $$DESTDIR/Pdf4QtLib.dll
-PdfforQt_library.path = $$DESTDIR/install
-PdfforQt_library.CONFIG += no_check_exist
-
-INSTALLS += PdfforQt_library
-
-qt_libraries.files = $$[QT_INSTALL_BINS]/Qt?Widgets$${SUFFIX}.dll \
- $$[QT_INSTALL_BINS]/Qt?Gui$${SUFFIX}.dll \
- $$[QT_INSTALL_BINS]/Qt?Core$${SUFFIX}.dll \
- $$[QT_INSTALL_BINS]/Qt?WinExtras$${SUFFIX}.dll \
- $$[QT_INSTALL_BINS]/Qt?Svg$${SUFFIX}.dll \
- $$[QT_INSTALL_BINS]/Qt?PrintSupport$${SUFFIX}.dll \
- $$[QT_INSTALL_BINS]/Qt?TextToSpeech$${SUFFIX}.dll \
- $$[QT_INSTALL_BINS]/Qt?Network$${SUFFIX}.dll \
- $$[QT_INSTALL_BINS]/Qt?Xml$${SUFFIX}.dll
-qt_libraries.path = $$DESTDIR/install
-INSTALLS += qt_libraries
-
-qt_plugin_platform.files = $$[QT_INSTALL_PLUGINS]/platforms/qwindows$${SUFFIX}.dll
-qt_plugin_platform.path = $$DESTDIR/install/platforms
-INSTALLS += qt_plugin_platform
-
-qt_plugin_style.files = $$[QT_INSTALL_PLUGINS]/styles/qwindowsvistastyle$${SUFFIX}.dll
-qt_plugin_style.path = $$DESTDIR/install/styles
-INSTALLS += qt_plugin_style
-
-qt_plugin_imageformat.files = $$[QT_INSTALL_PLUGINS]/imageformats/qgif$${SUFFIX}.dll \
- $$[QT_INSTALL_PLUGINS]/imageformats/qicns$${SUFFIX}.dll \
- $$[QT_INSTALL_PLUGINS]/imageformats/qico$${SUFFIX}.dll \
- $$[QT_INSTALL_PLUGINS]/imageformats/qjpeg$${SUFFIX}.dll \
- $$[QT_INSTALL_PLUGINS]/imageformats/qsvg$${SUFFIX}.dll \
- $$[QT_INSTALL_PLUGINS]/imageformats/qtga$${SUFFIX}.dll \
- $$[QT_INSTALL_PLUGINS]/imageformats/qtiff$${SUFFIX}.dll \
- $$[QT_INSTALL_PLUGINS]/imageformats/qwbpm$${SUFFIX}.dll \
- $$[QT_INSTALL_PLUGINS]/imageformats/qwebp$${SUFFIX}.dll
-qt_plugin_imageformat.path = $$DESTDIR/install/imageformats
-INSTALLS += qt_plugin_imageformat
-
-qt_plugin_iconengine.files = $$[QT_INSTALL_PLUGINS]/iconengines/qsvgicon$${SUFFIX}.dll
-qt_plugin_iconengine.path = $$DESTDIR/install/iconengines
-INSTALLS += qt_plugin_iconengine
-
-qt_plugin_printsupport.files = $$[QT_INSTALL_PLUGINS]/printsupport/windowsprintersupport$${SUFFIX}.dll
-qt_plugin_printsupport.path = $$DESTDIR/install/printsupport
-INSTALLS += qt_plugin_printsupport
-
-qt_plugin_texttospeech.files = $$[QT_INSTALL_PLUGINS]/texttospeech/qtexttospeech_sapi$${SUFFIX}.dll
-qt_plugin_texttospeech.path = $$DESTDIR/install/texttospeech
-INSTALLS += qt_plugin_texttospeech
-
-VC_REDIST_FILES = $$files($$(VCToolsRedistDir)/$$(VSCMD_ARG_TGT_ARCH)/Microsoft.VC143.CRT/*.dll)
-vc_redist.files = $$VC_REDIST_FILES
-vc_redist.path = $$DESTDIR/install
-INSTALLS += vc_redist
-
-# Debug code for list of all variables and its values
-#for(var, $$list($$enumerate_vars())) {
-# value = $$eval($$var)
-# message($$var = $$value)
-#}
diff --git a/Pdf4QtLib/Pdf4QtLib.qbs b/Pdf4QtLib/Pdf4QtLib.qbs
deleted file mode 100644
index fbd5375..0000000
--- a/Pdf4QtLib/Pdf4QtLib.qbs
+++ /dev/null
@@ -1,52 +0,0 @@
-import qbs
-
-Pdf4QtLibrary {
- name: "Pdf4QtLib"
- Depends { name: "Qt"; submodules: ["core", "gui", "widgets", "xml", "svg"] }
- Depends { name: "openssl" }
- Depends { name: "freetype" }
- Depends { name: "libjpeg" }
- Depends { name: "openjpeg" }
- Depends { name: "lcms" }
- Depends {
- condition: qbs.toolchain.contains("gcc") && !qbs.toolchain.contains("mingw")
- name: "tbb"
- }
- Depends {
- condition: qbs.hostOS.contains("linux")
- name: "fontconfig"
- }
- Properties {
- condition: qbs.toolchain.contains("msvc") || qbs.toolchain.contains("clang")
- cpp.cxxFlags: "/bigobj"
- }
- Properties {
- condition: qbs.hostOS.contains("windows")
- cpp.defines: "PDF4QTLIB_LIBRARY"
- }
-
- files: [
- "sources/*.cpp",
- "sources/*.h",
- "sources/*.ui",
- "cmaps.qrc",
- ]
- Export {
- Depends { name: "cpp" }
- Depends { name: "Qt"; submodules: ["core", "gui", "widgets", "xml", "svg"] }
- cpp.includePaths: ["sources"]
- Depends { name: "openssl" }
- Depends { name: "freetype" }
- Depends { name: "libjpeg" }
- Depends { name: "openjpeg" }
- Depends { name: "lcms" }
- Depends {
- condition: qbs.toolchain.contains("gcc") && !qbs.toolchain.contains("mingw")
- name: "tbb"
- }
- Depends {
- condition: qbs.hostOS.contains("linux")
- name: "fontconfig"
- }
- }
-}
diff --git a/Pdf4QtLib/sources/pdfadvancedtools.cpp b/Pdf4QtLib/sources/pdfadvancedtools.cpp
index cae75b3..ab9706d 100644
--- a/Pdf4QtLib/sources/pdfadvancedtools.cpp
+++ b/Pdf4QtLib/sources/pdfadvancedtools.cpp
@@ -206,7 +206,7 @@ PDFCreateLineTypeTool::PDFCreateLineTypeTool(PDFDrawWidgetProxy* proxy, PDFToolM
addTool(m_pickTool);
connect(m_pickTool, &PDFPickTool::pointPicked, this, &PDFCreateLineTypeTool::onPointPicked);
- m_fillColor.setAlphaF(0.2);
+ m_fillColor.setAlphaF(0.2f);
updateActions();
}
@@ -495,7 +495,7 @@ PDFCreateEllipseTool::PDFCreateEllipseTool(PDFDrawWidgetProxy* proxy, PDFToolMan
addTool(m_pickTool);
connect(m_pickTool, &PDFPickTool::rectanglePicked, this, &PDFCreateEllipseTool::onRectanglePicked);
- m_fillColor.setAlphaF(0.2);
+ m_fillColor.setAlphaF(0.2f);
updateActions();
}
diff --git a/Pdf4QtLib/sources/pdfannotation.cpp b/Pdf4QtLib/sources/pdfannotation.cpp
index d563ed1..b455b0c 100644
--- a/Pdf4QtLib/sources/pdfannotation.cpp
+++ b/Pdf4QtLib/sources/pdfannotation.cpp
@@ -1309,7 +1309,7 @@ void PDFAnnotationManager::drawWidgetAnnotationHighlight(QRectF annotationRectan
if (color.isValid())
{
- color.setAlphaF(0.2);
+ color.setAlphaF(0.2f);
// Draw annotation rectangle by highlight color
QPainterPath highlightArea;
@@ -2128,8 +2128,8 @@ void PDFWidgetAnnotationManager::createWidgetsForMarkupAnnotations(QWidget* pare
const PDFMarkupAnnotation* markupMainAnnotation = pageAnnotation.annotation->asMarkupAnnotation();
QColor color = markupMainAnnotation->getDrawColorFromAnnotationColor(markupMainAnnotation->getColor(), 1.0);
- QColor titleColor = QColor::fromHslF(color.hueF(), color.saturationF(), 0.2, 1.0);
- QColor backgroundColor = QColor::fromHslF(color.hueF(), color.saturationF(), 0.9, 1.0);
+ QColor titleColor = QColor::fromHslF(color.hueF(), color.saturationF(), 0.2f, 1.0f);
+ QColor backgroundColor = QColor::fromHslF(color.hueF(), color.saturationF(), 0.9f, 1.0f);
QString style = "QGroupBox { "
"border: 2px solid black; "
diff --git a/Pdf4QtLib/sources/pdfcertificatemanager.cpp b/Pdf4QtLib/sources/pdfcertificatemanager.cpp
index 263010a..18f8743 100644
--- a/Pdf4QtLib/sources/pdfcertificatemanager.cpp
+++ b/Pdf4QtLib/sources/pdfcertificatemanager.cpp
@@ -26,6 +26,11 @@
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
+#if defined(PDF4QT_COMPILER_MSVC)
+#pragma warning(push)
+#pragma warning(disable: 4996)
+#endif
+
#include
#include
#include
@@ -258,3 +263,7 @@ bool PDFSignatureFactory::sign(QString certificateName, QString password, QByteA
#if defined(PDF4QT_COMPILER_MINGW) || defined(PDF4QT_COMPILER_GCC)
#pragma GCC diagnostic pop
#endif
+
+#if defined(PDF4QT_COMPILER_MSVC)
+#pragma warning(pop)
+#endif
diff --git a/Pdf4QtLib/sources/pdfcolorspaces.cpp b/Pdf4QtLib/sources/pdfcolorspaces.cpp
index 752b791..a64cb79 100644
--- a/Pdf4QtLib/sources/pdfcolorspaces.cpp
+++ b/Pdf4QtLib/sources/pdfcolorspaces.cpp
@@ -2052,7 +2052,7 @@ std::vector PDFIndexedColorSpace::transformColorsToBaseColorS
const int byteOffset = int(colorIndex * colorComponentCount);
// We must point into the array. Check first and last component.
- Q_ASSERT(byteOffset + colorComponentCount - 1 < m_colors.size());
+ Q_ASSERT(byteOffset + colorComponentCount - 1 < static_cast(m_colors.size()));
const char* bytePointer = m_colors.constData() + byteOffset;
diff --git a/Pdf4QtLib/sources/pdfdocumentreader.cpp b/Pdf4QtLib/sources/pdfdocumentreader.cpp
index 96857c9..ef663ae 100644
--- a/Pdf4QtLib/sources/pdfdocumentreader.cpp
+++ b/Pdf4QtLib/sources/pdfdocumentreader.cpp
@@ -171,7 +171,7 @@ PDFInteger PDFDocumentReader::findXrefTableOffset(const QByteArray& buffer)
throw PDFException(tr("Start of object reference table not found."));
}
- Q_ASSERT(startXRefPosition + std::strlen(PDF_START_OF_XREF_MARK) < buffer.size());
+ Q_ASSERT(startXRefPosition + std::strlen(PDF_START_OF_XREF_MARK) < static_cast(buffer.size()));
PDFLexicalAnalyzer analyzer(buffer.constData() + startXRefPosition + std::strlen(PDF_START_OF_XREF_MARK), buffer.constData() + buffer.size());
const PDFLexicalAnalyzer::Token token = analyzer.fetch();
if (token.type != PDFLexicalAnalyzer::TokenType::Integer)
diff --git a/Pdf4QtLib/sources/pdfdocumenttextflow.cpp b/Pdf4QtLib/sources/pdfdocumenttextflow.cpp
index 573d1bd..2fe049b 100644
--- a/Pdf4QtLib/sources/pdfdocumenttextflow.cpp
+++ b/Pdf4QtLib/sources/pdfdocumenttextflow.cpp
@@ -245,7 +245,7 @@ void PDFStructureTreeTextContentProcessor::finishText()
if (trimmedText.size() < m_currentText.size())
{
// Fix character bounding boxes...
- if (m_characterBoundingRects.size() == m_currentText.size())
+ if (m_characterBoundingRects.size() == static_cast(m_currentText.size()))
{
std::vector boundingRects(std::next(m_characterBoundingRects.cbegin(), index), std::next(m_characterBoundingRects.cbegin(), index + trimmedText.length()));
m_characterBoundingRects = std::move(boundingRects);
@@ -266,7 +266,7 @@ void PDFStructureTreeTextContentProcessor::finishText()
m_currentText = qMove(reversed);
std::reverse(m_characterBoundingRects.begin(), m_characterBoundingRects.end());
}
- Q_ASSERT(m_currentText.size() == m_characterBoundingRects.size() || m_characterBoundingRects.empty());
+ Q_ASSERT(static_cast(m_currentText.size()) == m_characterBoundingRects.size() || m_characterBoundingRects.empty());
m_textSequence.emplace_back(PDFStructureTreeTextItem::createText(std::move(m_currentText), m_pageIndex, m_currentBoundingBox, std::move(m_characterBoundingRects)));
}
m_currentText = QString();
diff --git a/Pdf4QtLib/sources/pdfpagecontentelements.cpp b/Pdf4QtLib/sources/pdfpagecontentelements.cpp
index d0bf9c1..f5d6638 100644
--- a/Pdf4QtLib/sources/pdfpagecontentelements.cpp
+++ b/Pdf4QtLib/sources/pdfpagecontentelements.cpp
@@ -2286,9 +2286,9 @@ void PDFPageContentElementManipulator::drawPage(QPainter* painter,
PDFPainterStateGuard guard(painter);
QPen pen(Qt::SolidLine);
pen.setWidthF(2.0);
- pen.setColor(QColor::fromRgbF(0.8, 0.8, 0.1, 0.7));
+ pen.setColor(QColor::fromRgbF(0.8f, 0.8f, 0.1f, 0.7f));
QBrush brush(Qt::SolidPattern);
- brush.setColor(QColor::fromRgbF(1.0, 1.0, 0.0, 0.2));
+ brush.setColor(QColor::fromRgbF(1.0f, 1.0f, 0.0f, 0.2f));
painter->setPen(std::move(pen));
painter->setBrush(std::move(brush));
diff --git a/Pdf4QtLib/sources/pdfparser.cpp b/Pdf4QtLib/sources/pdfparser.cpp
index 78c8221..b78104b 100644
--- a/Pdf4QtLib/sources/pdfparser.cpp
+++ b/Pdf4QtLib/sources/pdfparser.cpp
@@ -705,7 +705,7 @@ PDFObject PDFParser::getObject()
{
case PDFLexicalAnalyzer::TokenType::Boolean:
{
- Q_ASSERT(m_lookAhead1.data.typeId() == QVariant::Bool);
+ Q_ASSERT(m_lookAhead1.data.typeId() == QMetaType::Bool);
const bool value = m_lookAhead1.data.toBool();
shift();
return PDFObject::createBool(value);
@@ -713,7 +713,7 @@ PDFObject PDFParser::getObject()
case PDFLexicalAnalyzer::TokenType::Integer:
{
- Q_ASSERT(m_lookAhead1.data.typeId() == QVariant::LongLong);
+ Q_ASSERT(m_lookAhead1.data.typeId() == QMetaType::LongLong);
const PDFInteger value = m_lookAhead1.data.toLongLong();
shift();
@@ -723,7 +723,7 @@ PDFObject PDFParser::getObject()
m_lookAhead2.type == PDFLexicalAnalyzer::TokenType::Command &&
m_lookAhead2.data.toByteArray() == PDF_REFERENCE_COMMAND)
{
- Q_ASSERT(m_lookAhead1.data.typeId() == QVariant::LongLong);
+ Q_ASSERT(m_lookAhead1.data.typeId() == QMetaType::LongLong);
const PDFInteger generation = m_lookAhead1.data.toLongLong();
shift();
shift();
@@ -738,7 +738,7 @@ PDFObject PDFParser::getObject()
case PDFLexicalAnalyzer::TokenType::Real:
{
- Q_ASSERT(m_lookAhead1.data.typeId() == QVariant::Double);
+ Q_ASSERT(m_lookAhead1.data.typeId() == QMetaType::Double);
const PDFReal value = m_lookAhead1.data.toDouble();
shift();
return PDFObject::createReal(value);
@@ -746,7 +746,7 @@ PDFObject PDFParser::getObject()
case PDFLexicalAnalyzer::TokenType::String:
{
- Q_ASSERT(m_lookAhead1.data.typeId() == QVariant::ByteArray);
+ Q_ASSERT(m_lookAhead1.data.typeId() == QMetaType::QByteArray);
QByteArray array = m_lookAhead1.data.toByteArray();
array.shrink_to_fit();
shift();
@@ -755,7 +755,7 @@ PDFObject PDFParser::getObject()
case PDFLexicalAnalyzer::TokenType::Name:
{
- Q_ASSERT(m_lookAhead1.data.typeId() == QVariant::ByteArray);
+ Q_ASSERT(m_lookAhead1.data.typeId() == QMetaType::QByteArray);
QByteArray array = m_lookAhead1.data.toByteArray();
array.shrink_to_fit();
shift();
diff --git a/Pdf4QtLib/sources/pdfsecurityhandler.cpp b/Pdf4QtLib/sources/pdfsecurityhandler.cpp
index a6df1b9..cb8d71e 100644
--- a/Pdf4QtLib/sources/pdfsecurityhandler.cpp
+++ b/Pdf4QtLib/sources/pdfsecurityhandler.cpp
@@ -31,6 +31,11 @@
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
+#if defined(PDF4QT_COMPILER_MSVC)
+#pragma warning(push)
+#pragma warning(disable: 4996)
+#endif
+
#include
#include
#include
@@ -2605,7 +2610,7 @@ PDFObject PDFPublicKeySecurityHandler::createEncryptionDictionaryObject() const
factory << PDFInteger(int32_t(m_permissions));
factory.endDictionaryItem();
- // Jakub Melka: 131105 is mysterious value set by Adobe Acrobat Pro
+ // Jakub Melka: 131105 is mysterious value set by Acrobat Pro
// when using public key security
factory.beginDictionaryItem("R");
factory << PDFInteger(131105);
@@ -2622,3 +2627,6 @@ PDFObject PDFPublicKeySecurityHandler::createEncryptionDictionaryObject() const
#pragma GCC diagnostic pop
#endif
+#if defined(PDF4QT_COMPILER_MSVC)
+#pragma warning(pop)
+#endif
diff --git a/Pdf4QtLib/sources/pdfsignaturehandler.cpp b/Pdf4QtLib/sources/pdfsignaturehandler.cpp
index f4ce77c..42d9262 100644
--- a/Pdf4QtLib/sources/pdfsignaturehandler.cpp
+++ b/Pdf4QtLib/sources/pdfsignaturehandler.cpp
@@ -28,6 +28,11 @@
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
+#if defined(PDF4QT_COMPILER_MSVC)
+#pragma warning(push)
+#pragma warning(disable: 4996)
+#endif
+
#include
#include
#include
@@ -2109,3 +2114,7 @@ pdf::PDFCertificateStore::CertificateEntries pdf::PDFCertificateStore::getSystem
#if defined(PDF4QT_COMPILER_MINGW) || defined(PDF4QT_COMPILER_GCC)
#pragma GCC diagnostic pop
#endif
+
+#if defined(PDF4QT_COMPILER_MSVC)
+#pragma warning(pop)
+#endif
diff --git a/Pdf4QtLib/sources/pdfwidgettool.cpp b/Pdf4QtLib/sources/pdfwidgettool.cpp
index ec77638..fef32e0 100644
--- a/Pdf4QtLib/sources/pdfwidgettool.cpp
+++ b/Pdf4QtLib/sources/pdfwidgettool.cpp
@@ -1394,7 +1394,7 @@ void PDFSelectTableTool::drawPage(QPainter* painter,
if (isTablePicked() && pageIndex == m_pageIndex)
{
PDFPainterStateGuard guard(painter);
- QColor color = QColor::fromRgbF(0.0, 0.0, 0.5, 0.2);
+ QColor color = QColor::fromRgbF(0.0f, 0.0f, 0.5f, 0.2f);
QRectF rectangle = pagePointToDevicePointMatrix.mapRect(m_pickedRectangle);
const PDFReal lineWidth = PDFWidgetUtils::scaleDPI_x(getProxy()->getWidget(), 2.0);
diff --git a/Pdf4QtLib/sources/pdfxfaengine.cpp b/Pdf4QtLib/sources/pdfxfaengine.cpp
index 6d22694..316200f 100644
--- a/Pdf4QtLib/sources/pdfxfaengine.cpp
+++ b/Pdf4QtLib/sources/pdfxfaengine.cpp
@@ -10360,7 +10360,7 @@ void PDFXFALayoutEngine::layoutFlow(LayoutParameters& layoutParameters, bool bre
QStringList colWidths = layoutParameters.colWidths.split(' ', Qt::SkipEmptyParts);
for (size_t i = 0; i < columnWidths.size(); ++i)
{
- if (i >= colWidths.size())
+ if (i >= static_cast(colWidths.size()))
{
break;
}
@@ -12134,19 +12134,19 @@ void PDFXFAEngineImpl::drawUi(const xfa::XFA_ui* ui,
passwordEdit || signature || textEdit;
const bool isDefaultUi = !isNonDefaultUi || defaultUi;
- if (textEdit || (isDefaultUi && value.value.typeId() == QVariant::String))
+ if (textEdit || (isDefaultUi && value.value.typeId() == QMetaType::QString))
{
drawUiTextEdit(textEdit, value, errors, nominalExtentArea, paragraphSettingsIndex, painter);
}
- else if (checkButton || (isDefaultUi && value.value.typeId() == QVariant::Bool))
+ else if (checkButton || (isDefaultUi && value.value.typeId() == QMetaType::Bool))
{
drawUiCheckButton(checkButton, value, nominalExtentArea, painter);
}
- else if (imageEdit || (isDefaultUi && value.value.typeId() == QVariant::Image))
+ else if (imageEdit || (isDefaultUi && value.value.typeId() == QMetaType::QImage))
{
drawUiImageEdit(imageEdit, value, errors, nominalExtentArea, painter);
}
- else if (numericEdit || (isDefaultUi && value.value.typeId() == QVariant::Double))
+ else if (numericEdit || (isDefaultUi && value.value.typeId() == QMetaType::Double))
{
drawUiNumericEdit(numericEdit, value, errors, nominalExtentArea, paragraphSettingsIndex, painter);
}
@@ -12166,9 +12166,9 @@ void PDFXFAEngineImpl::drawUi(const xfa::XFA_ui* ui,
{
errors << PDFRenderError(RenderErrorType::NotImplemented, PDFTranslationContext::tr("XFA: Buttons not implemented."));
}
- else if (dateTimeEdit || (isDefaultUi && (value.value.typeId() == QVariant::DateTime ||
- value.value.typeId() == QVariant::Date ||
- value.value.typeId() == QVariant::Time)))
+ else if (dateTimeEdit || (isDefaultUi && (value.value.typeId() == QMetaType::QDateTime ||
+ value.value.typeId() == QMetaType::QDate ||
+ value.value.typeId() == QMetaType::QTime)))
{
drawUiDateTimeEdit(dateTimeEdit, value, errors, nominalExtentArea, paragraphSettingsIndex, painter);
}
@@ -12391,15 +12391,15 @@ void PDFXFAEngineImpl::drawUiDateTimeEdit(const xfa::XFA_dateTimeEdit* dateTimeE
QString text;
- if (value.value.typeId() == QVariant::DateTime)
+ if (value.value.typeId() == QMetaType::QDateTime)
{
text = value.value.toDateTime().toString();
}
- else if (value.value.typeId() == QVariant::Time)
+ else if (value.value.typeId() == QMetaType::QTime)
{
text = value.value.toTime().toString();
}
- else if (value.value.typeId() == QVariant::Date)
+ else if (value.value.typeId() == QMetaType::QDate)
{
text = value.value.toDate().toString();
}
diff --git a/Pdf4QtViewer/Pdf4QtViewer.pro b/Pdf4QtViewer/Pdf4QtViewer.pro
deleted file mode 100644
index 148e64e..0000000
--- a/Pdf4QtViewer/Pdf4QtViewer.pro
+++ /dev/null
@@ -1,114 +0,0 @@
-# Copyright (C) 2018-2022 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-QT += core gui widgets winextras printsupport texttospeech network xml
-
-TARGET = Pdf4QtViewer
-TEMPLATE = lib
-
-include(../Pdf4Qt.pri)
-
-DEFINES += PDF4QTVIEWER_LIBRARY
-
-QMAKE_TARGET_DESCRIPTION = "PDF viewer support library"
-QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2022"
-
-DEFINES += QT_DEPRECATED_WARNINGS
-
-win32-*g++|unix: {
- LIBS += -ltbb
-}
-
-INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
-DESTDIR = $$OUT_PWD/..
-LIBS += -L$$OUT_PWD/..
-LIBS += -lPDF4QtLib
-
-SOURCES += \
- pdfaboutdialog.cpp \
- pdfadvancedfindwidget.cpp \
- pdfdocumentpropertiesdialog.cpp \
- pdfencryptionsettingsdialog.cpp \
- pdfencryptionstrengthhintwidget.cpp \
- pdfoptimizedocumentdialog.cpp \
- pdfprogramcontroller.cpp \
- pdfrecentfilemanager.cpp \
- pdfrendertoimagesdialog.cpp \
- pdfsendmail.cpp \
- pdfsidebarwidget.cpp \
- pdftexttospeech.cpp \
- pdfundoredomanager.cpp \
- pdfviewermainwindow.cpp \
- pdfviewermainwindowlite.cpp \
- pdfviewersettings.cpp \
- pdfviewersettingsdialog.cpp
-
-HEADERS += \
- pdfaboutdialog.h \
- pdfadvancedfindwidget.h \
- pdfdocumentpropertiesdialog.h \
- pdfencryptionsettingsdialog.h \
- pdfencryptionstrengthhintwidget.h \
- pdfoptimizedocumentdialog.h \
- pdfprogramcontroller.h \
- pdfrecentfilemanager.h \
- pdfrendertoimagesdialog.h \
- pdfsendmail.h \
- pdfsidebarwidget.h \
- pdftexttospeech.h \
- pdfundoredomanager.h \
- pdfviewerglobal.h \
- pdfviewermainwindow.h \
- pdfviewermainwindowlite.h \
- pdfviewersettings.h \
- pdfviewersettingsdialog.h
-
-FORMS += \
- pdfaboutdialog.ui \
- pdfadvancedfindwidget.ui \
- pdfdocumentpropertiesdialog.ui \
- pdfencryptionsettingsdialog.ui \
- pdfoptimizedocumentdialog.ui \
- pdfrendertoimagesdialog.ui \
- pdfsidebarwidget.ui \
- pdfviewermainwindow.ui \
- pdfviewermainwindowlite.ui \
- pdfviewersettingsdialog.ui
-
-CONFIG += force_debug_info
-
-viewer_library.files = $$DESTDIR/Pdf4QtViewer.dll
-viewer_library.path = $$DESTDIR/install
-viewer_library.CONFIG += no_check_exist
-INSTALLS += viewer_library
-
-plugins.files = $$DESTDIR/pdfplugins/ObjectInspectorPlugin.dll \
- $$DESTDIR/pdfplugins/OutputPreviewPlugin.dll \
- $$DESTDIR/pdfplugins/DimensionsPlugin.dll \
- $$DESTDIR/pdfplugins/SoftProofingPlugin.dll \
- $$DESTDIR/pdfplugins/RedactPlugin.dll \
- $$DESTDIR/pdfplugins/AudioBookPlugin.dll \
- $$DESTDIR/pdfplugins/SignaturePlugin.dll
-
-plugins.path = $$DESTDIR/install/pdfplugins
-plugins.CONFIG += no_check_exist
-INSTALLS += plugins
-
-RESOURCES += \
- pdf4qtviewer.qrc
-
-DEFINES += QT_INSTALL_DIRECTORY=\"\\\"$$[QT_INSTALL_BINS]\\\"\"
diff --git a/Pdf4QtViewer/Pdf4QtViewer.qbs b/Pdf4QtViewer/Pdf4QtViewer.qbs
deleted file mode 100644
index f37692b..0000000
--- a/Pdf4QtViewer/Pdf4QtViewer.qbs
+++ /dev/null
@@ -1,30 +0,0 @@
-import qbs.Utilities
-
-Pdf4QtLibrary {
- name: "Pdf4QtViewer"
- files: [
- "*.h",
- "*.cpp",
- "*.ui",
- "pdf4qtviewer.qrc",
- ]
- cpp.includePaths: ["."]
- Properties {
- condition: qbs.hostOS.contains("windows")
- cpp.defines: ["PDF4QTVIEWER_LIBRARY", "QT_INSTALL_DIRECTORY=" + Utilities.cStringQuote(Qt.core.binPath)]
- }
- Properties {
- condition: qbs.hostOS.contains("linux")
- cpp.defines: ["QT_INSTALL_DIRECTORY=" + Utilities.cStringQuote(Qt.core.binPath)]
- }
- cpp.defines: base.concat(["QT_INSTALL_DIRECTORY=" + Utilities.cStringQuote(Qt.core.binPath)])
- Depends { name: "Qt"; submodules: ["printsupport", "texttospeech", "network", "xml"] }
- Depends { name: "Qt.winextras"; condition: qbs.hostOS.contains("windows") }
- Depends { name: "Pdf4QtLib" }
- Export {
- Depends { name: "cpp" }
- cpp.includePaths: ["."]
- Depends { name: "Pdf4QtLib" }
- Depends { name: "Qt.winextras"; condition: qbs.hostOS.contains("windows") }
- }
-}
diff --git a/Pdf4QtViewer/pdfdocumentpropertiesdialog.cpp b/Pdf4QtViewer/pdfdocumentpropertiesdialog.cpp
index 071917e..fc401ef 100644
--- a/Pdf4QtViewer/pdfdocumentpropertiesdialog.cpp
+++ b/Pdf4QtViewer/pdfdocumentpropertiesdialog.cpp
@@ -130,7 +130,7 @@ void PDFDocumentPropertiesDialog::initializeProperties(const pdf::PDFDocument* d
{
QString key = QString::fromLatin1(item.first);
QVariant valueVariant = item.second;
- QString value = (valueVariant.typeId() == QVariant::DateTime) ? locale.toString(valueVariant.toDateTime()) : valueVariant.toString();
+ QString value = (valueVariant.typeId() == QMetaType::QDateTime) ? locale.toString(valueVariant.toDateTime()) : valueVariant.toString();
new QTreeWidgetItem(customRoot, { key, value });
}
ui->propertiesTreeWidget->addTopLevelItem(customRoot);
diff --git a/Pdf4QtViewer/pdfrecentfilemanager.cpp b/Pdf4QtViewer/pdfrecentfilemanager.cpp
index c85bc99..835c311 100644
--- a/Pdf4QtViewer/pdfrecentfilemanager.cpp
+++ b/Pdf4QtViewer/pdfrecentfilemanager.cpp
@@ -97,7 +97,7 @@ void PDFRecentFileManager::onRecentFileActionTriggered()
Q_ASSERT(action);
QVariant data = action->data();
- if (data.typeId() == QVariant::String)
+ if (data.typeId() == QMetaType::QString)
{
emit fileOpenRequest(data.toString());
}
diff --git a/Pdf4QtViewer/pdfviewersettingsdialog.cpp b/Pdf4QtViewer/pdfviewersettingsdialog.cpp
index 78796ff..ca80b09 100644
--- a/Pdf4QtViewer/pdfviewersettingsdialog.cpp
+++ b/Pdf4QtViewer/pdfviewersettingsdialog.cpp
@@ -811,9 +811,9 @@ void PDFViewerSettingsDialog::setSpeechEngine(const QString& engine, const QStri
QVector locales = textToSpeech.availableLocales();
ui->speechLocaleComboBox->setUpdatesEnabled(false);
ui->speechLocaleComboBox->clear();
- for (const QLocale& locale : locales)
+ for (const QLocale& currentLocale : locales)
{
- ui->speechLocaleComboBox->addItem(QString("%1 (%2)").arg(locale.nativeLanguageName(), locale.nativeCountryName()), locale.name());
+ ui->speechLocaleComboBox->addItem(QString("%1 (%2)").arg(currentLocale.nativeLanguageName(), currentLocale.nativeCountryName()), currentLocale.name());
}
ui->speechLocaleComboBox->setUpdatesEnabled(true);
}
diff --git a/Pdf4QtViewerLite/Pdf4QtViewerLite.pro b/Pdf4QtViewerLite/Pdf4QtViewerLite.pro
deleted file mode 100644
index ff87b49..0000000
--- a/Pdf4QtViewerLite/Pdf4QtViewerLite.pro
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright (C) 2018-2022 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-QT += core gui widgets winextras
-
-TARGET = Pdf4QtViewerLite
-TEMPLATE = app
-
-include(../Pdf4Qt.pri)
-
-RC_ICONS = $$PWD/app-icon.ico
-
-QMAKE_TARGET_DESCRIPTION = "PDF viewer for Qt, Lite version"
-QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2022"
-
-DEFINES += QT_DEPRECATED_WARNINGS
-
-win32-*g++|unix: {
- LIBS += -ltbb
-}
-
-INCLUDEPATH += $$PWD/../PDF4QtLib/Sources $$PWD/../PDF4QtViewer
-DESTDIR = $$OUT_PWD/..
-LIBS += -L$$OUT_PWD/..
-LIBS += -lPDF4QtLib -lPDF4QtViewer
-CONFIG += force_debug_info
-
-application.files = $$DESTDIR/Pdf4QtViewerLite.exe
-application.path = $$DESTDIR/install
-application.CONFIG += no_check_exist
-INSTALLS += application
-
-SOURCES += \
- main.cpp
diff --git a/Pdf4QtViewerLite/Pdf4QtViewerLite.qbs b/Pdf4QtViewerLite/Pdf4QtViewerLite.qbs
deleted file mode 100644
index aa6beec..0000000
--- a/Pdf4QtViewerLite/Pdf4QtViewerLite.qbs
+++ /dev/null
@@ -1,7 +0,0 @@
-Pdf4QtApp {
- name: "Pdf4QtViewerLite"
- files: [
- "*.cpp"
- ]
- Depends { name: "Pdf4QtViewer" }
-}
diff --git a/Pdf4QtViewerPlugins/AudioBookPlugin/AudioBookPlugin.pro b/Pdf4QtViewerPlugins/AudioBookPlugin/AudioBookPlugin.pro
deleted file mode 100644
index 23ad2b2..0000000
--- a/Pdf4QtViewerPlugins/AudioBookPlugin/AudioBookPlugin.pro
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright (C) 2021 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-TEMPLATE = lib
-DEFINES += AUDIOBOOKPLUGIN_LIBRARY
-
-QT += gui widgets
-
-include(../../Pdf4Qt.pri)
-
-LIBS += -L$$OUT_PWD/../..
-
-LIBS += -lPdf4QtLib
-
-win32-*g++: {
- LIBS += -lole32 -lsapi
-}
-
-INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
-
-DESTDIR = $$OUT_PWD/../../pdfplugins
-
-SOURCES += \
- audiobookcreator.cpp \
- audiobookplugin.cpp \
- audiotextstreameditordockwidget.cpp
-
-HEADERS += \
- audiobookcreator.h \
- audiobookplugin.h \
- audiotextstreameditordockwidget.h
-
-CONFIG += force_debug_info
-
-DISTFILES += \
- AudioBookPlugin.json
-
-RESOURCES += \
- icons.qrc
-
-FORMS += \
- audiotextstreameditordockwidget.ui
-
diff --git a/Pdf4QtViewerPlugins/AudioBookPlugin/AudioBookPlugin.qbs b/Pdf4QtViewerPlugins/AudioBookPlugin/AudioBookPlugin.qbs
deleted file mode 100644
index a6d3d63..0000000
--- a/Pdf4QtViewerPlugins/AudioBookPlugin/AudioBookPlugin.qbs
+++ /dev/null
@@ -1,15 +0,0 @@
-import qbs
-
-Pdf4QtPlugin {
- name: "AudioBookPlugin"
- files: [
- "*.h",
- "*.cpp",
- "*.ui",
- "icons.qrc",
- ]
- Properties {
- condition: qbs.hostOS.contains("windows")
- cpp.defines: "AUDIOBOOKPLUGIN_LIBRARY"
- }
-}
diff --git a/Pdf4QtViewerPlugins/AudioBookPlugin/audiobookplugin.cpp b/Pdf4QtViewerPlugins/AudioBookPlugin/audiobookplugin.cpp
index 63721e4..3a40ecc 100644
--- a/Pdf4QtViewerPlugins/AudioBookPlugin/audiobookplugin.cpp
+++ b/Pdf4QtViewerPlugins/AudioBookPlugin/audiobookplugin.cpp
@@ -200,7 +200,7 @@ void AudioBookPlugin::drawPage(QPainter* painter,
QColor strokeColor = color;
QColor fillColor = color;
- fillColor.setAlphaF(0.2);
+ fillColor.setAlphaF(0.2f);
pen.setColor(strokeColor);
painter->setPen(pen);
diff --git a/Pdf4QtViewerPlugins/DimensionsPlugin/DimensionsPlugin.pro b/Pdf4QtViewerPlugins/DimensionsPlugin/DimensionsPlugin.pro
deleted file mode 100644
index 9f99efc..0000000
--- a/Pdf4QtViewerPlugins/DimensionsPlugin/DimensionsPlugin.pro
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright (C) 2020-2021 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-TEMPLATE = lib
-DEFINES += DIMENSIONPLUGIN_LIBRARY
-
-QT += gui widgets
-
-include(../../Pdf4Qt.pri)
-
-LIBS += -L$$OUT_PWD/../..
-
-LIBS += -lPdf4QtLib
-
-INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
-
-DESTDIR = $$OUT_PWD/../../pdfplugins
-
-SOURCES += \
- dimensionsplugin.cpp \
- dimensiontool.cpp \
- settingsdialog.cpp
-
-HEADERS += \
- dimensionsplugin.h \
- dimensiontool.h \
- settingsdialog.h
-
-CONFIG += force_debug_info
-
-DISTFILES += \
- DimensionsPlugin.json
-
-RESOURCES += \
- icons.qrc
-
-FORMS += \
- settingsdialog.ui
diff --git a/Pdf4QtViewerPlugins/DimensionsPlugin/DimensionsPlugin.qbs b/Pdf4QtViewerPlugins/DimensionsPlugin/DimensionsPlugin.qbs
deleted file mode 100644
index 64e7f7f..0000000
--- a/Pdf4QtViewerPlugins/DimensionsPlugin/DimensionsPlugin.qbs
+++ /dev/null
@@ -1,15 +0,0 @@
-import qbs
-
-Pdf4QtPlugin {
- name: "DimensionsPlugin"
- files: [
- "*.h",
- "*.cpp",
- "*.ui",
- "icons.qrc",
- ]
- Properties {
- condition: qbs.hostOS.contains("windows")
- cpp.defines: "DIMENSIONPLUGIN_LIBRARY"
- }
-}
diff --git a/Pdf4QtViewerPlugins/DimensionsPlugin/dimensionsplugin.cpp b/Pdf4QtViewerPlugins/DimensionsPlugin/dimensionsplugin.cpp
index a33526e..5e3d1a2 100644
--- a/Pdf4QtViewerPlugins/DimensionsPlugin/dimensionsplugin.cpp
+++ b/Pdf4QtViewerPlugins/DimensionsPlugin/dimensionsplugin.cpp
@@ -232,7 +232,7 @@ void DimensionsPlugin::drawPage(QPainter* painter,
pen.setCosmetic(true);
QColor brushColor = Qt::black;
- brushColor.setAlphaF(0.1);
+ brushColor.setAlphaF(0.1f);
painter->setPen(qMove(pen));
painter->setBrush(QBrush(brushColor, isArea ? Qt::SolidPattern : Qt::DiagCrossPattern));
diff --git a/Pdf4QtViewerPlugins/ObjectInspectorPlugin/ObjectInspectorPlugin.pro b/Pdf4QtViewerPlugins/ObjectInspectorPlugin/ObjectInspectorPlugin.pro
deleted file mode 100644
index f1c8a6e..0000000
--- a/Pdf4QtViewerPlugins/ObjectInspectorPlugin/ObjectInspectorPlugin.pro
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright (C) 2021 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-TEMPLATE = lib
-DEFINES += OBJECTINSPECTORPLUGIN_LIBRARY
-
-QT += gui widgets
-
-include(../../Pdf4Qt.pri)
-
-LIBS += -L$$OUT_PWD/../..
-
-LIBS += -lPdf4QtLib
-
-INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
-
-DESTDIR = $$OUT_PWD/../../pdfplugins
-
-SOURCES += \
- objectinspectordialog.cpp \
- objectinspectorplugin.cpp \
- objectstatisticsdialog.cpp \
- objectviewerwidget.cpp \
- pdfobjectinspectortreeitemmodel.cpp \
- statisticsgraphwidget.cpp
-
-HEADERS += \
- objectinspectordialog.h \
- objectinspectorplugin.h \
- objectstatisticsdialog.h \
- objectviewerwidget.h \
- pdfobjectinspectortreeitemmodel.h \
- statisticsgraphwidget.h
-
-CONFIG += force_debug_info
-
-DISTFILES += \
- ObjectInspectorPlugin.json
-
-RESOURCES += \
- icons.qrc
-
-FORMS += \
- objectinspectordialog.ui \
- objectstatisticsdialog.ui \
- objectviewerwidget.ui \
- statisticsgraphwidget.ui
-
-win32-*g++|unix: {
- LIBS += -ltbb
-}
diff --git a/Pdf4QtViewerPlugins/ObjectInspectorPlugin/statisticsgraphwidget.cpp b/Pdf4QtViewerPlugins/ObjectInspectorPlugin/statisticsgraphwidget.cpp
index 79c27f6..a4c29da 100644
--- a/Pdf4QtViewerPlugins/ObjectInspectorPlugin/statisticsgraphwidget.cpp
+++ b/Pdf4QtViewerPlugins/ObjectInspectorPlugin/statisticsgraphwidget.cpp
@@ -88,7 +88,7 @@ StatisticsGraphWidget::GeometryHint StatisticsGraphWidget::getGeometryHint() con
for (const auto& item : m_statistics.items)
{
- Q_ASSERT(item.texts.size() == hint.textWidths.size());
+ Q_ASSERT(static_cast(item.texts.size()) == hint.textWidths.size());
for (int i = 0; i < item.texts.size(); ++i)
{
@@ -152,7 +152,7 @@ void StatisticsGraphWidget::paintEvent(QPaintEvent* event)
top = currentRect.bottom();
QColor color = (m_selectedColorBox == i) ? selectedColor: item.color;
- color.setAlphaF(0.8);
+ color.setAlphaF(0.8f);
painter.fillRect(currentRect, color);
m_colorBoxes.push_back(currentRect);
}
diff --git a/Pdf4QtViewerPlugins/OutputPreviewPlugin/OutputPreviewPlugin.pro b/Pdf4QtViewerPlugins/OutputPreviewPlugin/OutputPreviewPlugin.pro
deleted file mode 100644
index a0b7012..0000000
--- a/Pdf4QtViewerPlugins/OutputPreviewPlugin/OutputPreviewPlugin.pro
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright (C) 2021 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-TEMPLATE = lib
-DEFINES += OUTPUTPREVIEWPLUGIN_LIBRARY
-
-QT += gui widgets
-
-include(../../Pdf4Qt.pri)
-
-LIBS += -L$$OUT_PWD/../..
-
-LIBS += -lPdf4QtLib
-
-INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
-
-DESTDIR = $$OUT_PWD/../../pdfplugins
-
-SOURCES += \
- inkcoveragedialog.cpp \
- outputpreviewdialog.cpp \
- outputpreviewplugin.cpp \
- outputpreviewwidget.cpp
-
-HEADERS += \
- inkcoveragedialog.h \
- outputpreviewdialog.h \
- outputpreviewplugin.h \
- outputpreviewwidget.h
-
-CONFIG += force_debug_info
-
-DISTFILES += \
- OutputPreviewPlugin.json
-
-RESOURCES += \
- icons.qrc
-
-FORMS += \
- inkcoveragedialog.ui \
- outputpreviewdialog.ui
diff --git a/Pdf4QtViewerPlugins/OutputPreviewPlugin/OutputPreviewPlugin.qbs b/Pdf4QtViewerPlugins/OutputPreviewPlugin/OutputPreviewPlugin.qbs
deleted file mode 100644
index 1112b4f..0000000
--- a/Pdf4QtViewerPlugins/OutputPreviewPlugin/OutputPreviewPlugin.qbs
+++ /dev/null
@@ -1,16 +0,0 @@
-import qbs
-
-Pdf4QtPlugin {
- name: "OutputPreviewPlugin"
- files: [
- "*.h",
- "*.cpp",
- "*.ui",
- "icons.qrc",
- ]
- cpp.includePaths: ["."]
- Properties {
- condition: qbs.hostOS.contains("windows")
- cpp.defines: "OUTPUTPREVIEWPLUGIN_LIBRARY"
- }
-}
diff --git a/Pdf4QtViewerPlugins/Pdf4QtViewerPlugins.pro b/Pdf4QtViewerPlugins/Pdf4QtViewerPlugins.pro
deleted file mode 100644
index 54cc8b6..0000000
--- a/Pdf4QtViewerPlugins/Pdf4QtViewerPlugins.pro
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright (C) 2020-2021 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-
-TEMPLATE = subdirs
-
-SUBDIRS += \
- DimensionsPlugin \
- SoftProofingPlugin \
- RedactPlugin \
- OutputPreviewPlugin \
- ObjectInspectorPlugin \
- AudioBookPlugin \
- SignaturePlugin
-
-
diff --git a/Pdf4QtViewerPlugins/RedactPlugin/RedactPlugin.pro b/Pdf4QtViewerPlugins/RedactPlugin/RedactPlugin.pro
deleted file mode 100644
index 11e0cff..0000000
--- a/Pdf4QtViewerPlugins/RedactPlugin/RedactPlugin.pro
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright (C) 2020-2021 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-TEMPLATE = lib
-DEFINES += REDACTPLUGIN_LIBRARY
-
-QT += gui widgets
-
-include(../../Pdf4Qt.pri)
-
-LIBS += -L$$OUT_PWD/../..
-
-LIBS += -lPdf4QtLib
-
-INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
-
-DESTDIR = $$OUT_PWD/../../pdfplugins
-
-SOURCES += \
- createredacteddocumentdialog.cpp \
- redactplugin.cpp
-
-HEADERS += \
- createredacteddocumentdialog.h \
- redactplugin.h
-
-CONFIG += force_debug_info
-
-DISTFILES += \
- RedactPlugin.json
-
-RESOURCES += \
- icons.qrc
-
-FORMS += \
- createredacteddocumentdialog.ui
-
-
diff --git a/Pdf4QtViewerPlugins/RedactPlugin/RedactPlugin.qbs b/Pdf4QtViewerPlugins/RedactPlugin/RedactPlugin.qbs
deleted file mode 100644
index a134afa..0000000
--- a/Pdf4QtViewerPlugins/RedactPlugin/RedactPlugin.qbs
+++ /dev/null
@@ -1,16 +0,0 @@
-import qbs
-
-Pdf4QtPlugin {
- name: "RedactPlugin"
- files: [
- "*.h",
- "*.cpp",
- "*.ui",
- "icons.qrc",
- ]
- cpp.includePaths: ["."]
- Properties {
- condition: qbs.hostOS.contains("windows")
- cpp.defines: "REDACTPLUGIN_LIBRARY"
- }
-}
diff --git a/Pdf4QtViewerPlugins/SignaturePlugin/SignaturePlugin.pro b/Pdf4QtViewerPlugins/SignaturePlugin/SignaturePlugin.pro
deleted file mode 100644
index 3e76625..0000000
--- a/Pdf4QtViewerPlugins/SignaturePlugin/SignaturePlugin.pro
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright (C) 2022 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-TEMPLATE = lib
-DEFINES += SIGNATUREPLUGIN_LIBRARY
-
-QT += gui widgets
-
-LIBS += -L$$OUT_PWD/../..
-
-LIBS += -lPdf4QtLib
-
-QMAKE_CXXFLAGS += /std:c++latest /utf-8
-
-INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
-
-DESTDIR = $$OUT_PWD/../../pdfplugins
-
-CONFIG += c++11
-
-Pdf4Qt_OPENSSL_PATH = $$absolute_path(../../Tools, $$[QT_INSTALL_PREFIX])
-
-# Link OpenSSL
-LIBS += -L$$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/bin -L$$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/lib -llibcrypto -llibssl
-INCLUDEPATH += $$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/include
-DEPENDPATH += $$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/include
-
-SOURCES += \
- signatureplugin.cpp \
- signdialog.cpp
-
-HEADERS += \
- signatureplugin.h \
- signdialog.h
-
-CONFIG += force_debug_info
-
-DISTFILES += \
- SignaturePlugin.json
-
-RESOURCES += \
- icons.qrc
-
-FORMS += \
- signdialog.ui
-
diff --git a/Pdf4QtViewerPlugins/SignaturePlugin/SignaturePlugin.qbs b/Pdf4QtViewerPlugins/SignaturePlugin/SignaturePlugin.qbs
deleted file mode 100644
index 4004868..0000000
--- a/Pdf4QtViewerPlugins/SignaturePlugin/SignaturePlugin.qbs
+++ /dev/null
@@ -1,15 +0,0 @@
-import qbs
-
-Pdf4QtPlugin {
- name: "SignaturePlugin"
- files: [
- "*.h",
- "*.cpp",
- "*.ui",
- "icons.qrc",
- ]
- Properties {
- condition: qbs.hostOS.contains("windows")
- cpp.defines: "SIGNATUREPLUGIN_LIBRARY"
- }
-}
diff --git a/Pdf4QtViewerPlugins/SoftProofingPlugin/SoftProofingPlugin.pro b/Pdf4QtViewerPlugins/SoftProofingPlugin/SoftProofingPlugin.pro
deleted file mode 100644
index 29745ec..0000000
--- a/Pdf4QtViewerPlugins/SoftProofingPlugin/SoftProofingPlugin.pro
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright (C) 2020-2021 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-TEMPLATE = lib
-DEFINES += SOFTPROOFINGPLUGIN_LIBRARY
-
-QT += gui widgets
-
-include(../../Pdf4Qt.pri)
-
-LIBS += -L$$OUT_PWD/../..
-
-LIBS += -lPdf4QtLib
-
-INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
-
-DESTDIR = $$OUT_PWD/../../pdfplugins
-
-SOURCES += \
- softproofingplugin.cpp \
- settingsdialog.cpp
-
-HEADERS += \
- softproofingplugin.h \
- settingsdialog.h
-
-CONFIG += force_debug_info
-
-DISTFILES += \
- SoftProofingPlugin.json
-
-RESOURCES += \
- icons.qrc
-
-FORMS += \
- settingsdialog.ui
diff --git a/Pdf4QtViewerPlugins/SoftProofingPlugin/SoftProofingPlugin.qbs b/Pdf4QtViewerPlugins/SoftProofingPlugin/SoftProofingPlugin.qbs
deleted file mode 100644
index c216064..0000000
--- a/Pdf4QtViewerPlugins/SoftProofingPlugin/SoftProofingPlugin.qbs
+++ /dev/null
@@ -1,16 +0,0 @@
-import qbs
-
-Pdf4QtPlugin {
- name: "SoftProofingPlugin"
- files: [
- "*.h",
- "*.cpp",
- "*.ui",
- "icons.qrc",
- ]
- cpp.includePaths: ["."]
- Properties {
- condition: qbs.hostOS.contains("windows")
- cpp.defines: "SOFTPROOFINGPLUGIN_LIBRARY"
- }
-}
diff --git a/Pdf4QtViewerProfi/Pdf4QtViewerProfi.pro b/Pdf4QtViewerProfi/Pdf4QtViewerProfi.pro
deleted file mode 100644
index a91cd0c..0000000
--- a/Pdf4QtViewerProfi/Pdf4QtViewerProfi.pro
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright (C) 2018-2022 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-QT += core gui widgets winextras
-
-TARGET = Pdf4QtViewerProfi
-TEMPLATE = app
-
-include(../Pdf4Qt.pri)
-
-RC_ICONS = $$PWD/app-icon.ico
-
-QMAKE_TARGET_DESCRIPTION = "PDF viewer for Qt, Profi version"
-QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2022"
-
-DEFINES += QT_DEPRECATED_WARNINGS
-
-win32-*g++|unix: {
- LIBS += -ltbb
-}
-
-INCLUDEPATH += $$PWD/../PDF4QtLib/Sources $$PWD/../PDF4QtViewer
-DESTDIR = $$OUT_PWD/..
-LIBS += -L$$OUT_PWD/..
-LIBS += -lPDF4QtLib -lPDF4QtViewer
-CONFIG += force_debug_info
-
-application.files = $$DESTDIR/Pdf4QtViewerProfi.exe
-application.path = $$DESTDIR/install
-application.CONFIG += no_check_exist
-INSTALLS += application
-
-SOURCES += \
- main.cpp
diff --git a/Pdf4QtViewerProfi/Pdf4QtViewerProfi.qbs b/Pdf4QtViewerProfi/Pdf4QtViewerProfi.qbs
deleted file mode 100644
index 5e01572..0000000
--- a/Pdf4QtViewerProfi/Pdf4QtViewerProfi.qbs
+++ /dev/null
@@ -1,8 +0,0 @@
-Pdf4QtApp {
- name: "Pdf4QtViewerProfi"
- files: [
- "*.cpp",
- "app-icon.ico"
- ]
- Depends { name: "Pdf4QtViewer" }
-}
diff --git a/PdfExampleGenerator/PdfExampleGenerator.pro b/PdfExampleGenerator/PdfExampleGenerator.pro
deleted file mode 100644
index 6ae757c..0000000
--- a/PdfExampleGenerator/PdfExampleGenerator.pro
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright (C) 2018-2021 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-QT += gui widgets
-
-include(../Pdf4Qt.pri)
-
-CONFIG += console
-CONFIG -= app_bundle
-
-# The following define makes your compiler emit warnings if you use
-# any Qt feature that has been marked deprecated (the exact warnings
-# depend on your compiler). Please consult the documentation of the
-# deprecated API in order to know how to port your code away from it.
-DEFINES += QT_DEPRECATED_WARNINGS
-
-# You can also make your code fail to compile if it uses deprecated APIs.
-# In order to do so, uncomment the following line.
-# You can also select to disable deprecated APIs only up to a certain version of Qt.
-#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
-
-INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
-
-DESTDIR = $$OUT_PWD/..
-
-LIBS += -L$$OUT_PWD/..
-
-LIBS += -lPDF4QtLib
-
-SOURCES += \
- main.cpp \
- pdfexamplesgenerator.cpp
-
-HEADERS += \
- pdfexamplesgenerator.h
diff --git a/PdfExampleGenerator/PdfExampleGenerator.qbs b/PdfExampleGenerator/PdfExampleGenerator.qbs
deleted file mode 100644
index bf4d966..0000000
--- a/PdfExampleGenerator/PdfExampleGenerator.qbs
+++ /dev/null
@@ -1,7 +0,0 @@
-Pdf4QtApp {
- name: "PdfExampleGenerator"
- files: [
- "*.cpp",
- "*.h",
- ]
-}
diff --git a/PdfTool/PdfTool.pro b/PdfTool/PdfTool.pro
deleted file mode 100644
index 066ea77..0000000
--- a/PdfTool/PdfTool.pro
+++ /dev/null
@@ -1,109 +0,0 @@
-# Copyright (C) 2020-2022 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-CONFIG += console
-CONFIG -= app_bundle
-
-include(../Pdf4Qt.pri)
-
-TARGET = PdfTool
-
-QMAKE_TARGET_DESCRIPTION = "PDF tool for Qt"
-QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2022"
-
-# You can make your code fail to compile if it uses deprecated APIs.
-# In order to do so, uncomment the following line.
-#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
-
-win32-*g++|unix: {
- LIBS += -ltbb
- win32: {
- LIBS += -lole32 -lsapi
- }
-}
-
-INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
-
-DESTDIR = $$OUT_PWD/..
-
-LIBS += -L$$OUT_PWD/..
-
-LIBS += -lPDF4QtLib
-
-SOURCES += \
- main.cpp \
- pdfoutputformatter.cpp \
- pdftoolabstractapplication.cpp \
- pdftoolattachments.cpp \
- pdftoolaudiobook.cpp \
- pdftoolcertstore.cpp \
- pdftoolcolorprofiles.cpp \
- pdftooldecrypt.cpp \
- pdftooldiff.cpp \
- pdftoolencrypt.cpp \
- pdftoolfetchimages.cpp \
- pdftoolfetchtext.cpp \
- pdftoolinfo.cpp \
- pdftoolinfofonts.cpp \
- pdftoolinfoinks.cpp \
- pdftoolinfojavascript.cpp \
- pdftoolinfometadata.cpp \
- pdftoolinfonameddestinations.cpp \
- pdftoolinfopageboxes.cpp \
- pdftoolinfostructuretree.cpp \
- pdftoolinkcoverage.cpp \
- pdftooloptimize.cpp \
- pdftoolrender.cpp \
- pdftoolseparate.cpp \
- pdftoolstatistics.cpp \
- pdftoolunite.cpp \
- pdftoolverifysignatures.cpp \
- pdftoolxml.cpp
-
-application.files = $$DESTDIR/PdfTool.exe
-application.path = $$DESTDIR/install
-application.CONFIG += no_check_exist
-INSTALLS += application
-
-HEADERS += \
- pdfoutputformatter.h \
- pdftoolabstractapplication.h \
- pdftoolattachments.h \
- pdftoolaudiobook.h \
- pdftoolcertstore.h \
- pdftoolcolorprofiles.h \
- pdftooldecrypt.h \
- pdftooldiff.h \
- pdftoolencrypt.h \
- pdftoolfetchimages.h \
- pdftoolfetchtext.h \
- pdftoolinfo.h \
- pdftoolinfofonts.h \
- pdftoolinfoinks.h \
- pdftoolinfojavascript.h \
- pdftoolinfometadata.h \
- pdftoolinfonameddestinations.h \
- pdftoolinfopageboxes.h \
- pdftoolinfostructuretree.h \
- pdftoolinkcoverage.h \
- pdftooloptimize.h \
- pdftoolrender.h \
- pdftoolseparate.h \
- pdftoolstatistics.h \
- pdftoolunite.h \
- pdftoolverifysignatures.h \
- pdftoolxml.h
diff --git a/PdfTool/PdfTool.qbs b/PdfTool/PdfTool.qbs
deleted file mode 100644
index 8fb5757..0000000
--- a/PdfTool/PdfTool.qbs
+++ /dev/null
@@ -1,7 +0,0 @@
-Pdf4QtApp {
- name: "PdfTool"
- files: [
- "*.h",
- "*.cpp",
- ]
-}
diff --git a/PdfTool/pdftoolinfo.cpp b/PdfTool/pdftoolinfo.cpp
index a028852..e937f73 100644
--- a/PdfTool/pdftoolinfo.cpp
+++ b/PdfTool/pdftoolinfo.cpp
@@ -155,7 +155,7 @@ int PDFToolInfoApplication::execute(const PDFToolOptions& options)
{
QString key = QString::fromLatin1(item.first);
QVariant valueVariant = item.second;
- QString value = (valueVariant.typeId() == QVariant::DateTime) ? convertDateTimeToString(valueVariant.toDateTime().toLocalTime(), options.outputDateFormat) : valueVariant.toString();
+ QString value = (valueVariant.typeId() == QMetaType::QDateTime) ? convertDateTimeToString(valueVariant.toDateTime().toLocalTime(), options.outputDateFormat) : valueVariant.toString();
writeProperty("custom-property", key, value);
}
}
diff --git a/UnitTests/UnitTests.pro b/UnitTests/UnitTests.pro
deleted file mode 100644
index 1fb2360..0000000
--- a/UnitTests/UnitTests.pro
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright (C) 2018-2021 Jakub Melka
-#
-# This file is part of PDF4QT.
-#
-# PDF4QT is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# with the written consent of the copyright owner, any later version.
-#
-# PDF4QT is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PDF4QT. If not, see .
-
-QT += testlib
-
-CONFIG += qt console warn_on depend_includepath testcase
-CONFIG -= app_bundle
-
-TEMPLATE = app
-
-include(../Pdf4Qt.pri)
-
-INCLUDEPATH += $$PWD/../Pdf4QtLib/Sources
-
-DESTDIR = $$OUT_PWD/..
-
-LIBS += -L$$OUT_PWD/..
-
-LIBS += -lPdf4QtLib
-
-SOURCES += \
- tst_lexicalanalyzertest.cpp
-
-target.path = $$DESTDIR/install
-INSTALLS += target
diff --git a/UnitTests/UnitTests.qbs b/UnitTests/UnitTests.qbs
deleted file mode 100644
index 1c0a06c..0000000
--- a/UnitTests/UnitTests.qbs
+++ /dev/null
@@ -1,7 +0,0 @@
-Pdf4QtApp {
- name: "UnitTests"
- files: [
- "*.cpp",
- ]
- Depends { name: "Qt"; submodules: ["test"] }
-}
diff --git a/UnitTests/tst_lexicalanalyzertest.cpp b/UnitTests/tst_lexicalanalyzertest.cpp
index 998e99d..4f1cfb2 100644
--- a/UnitTests/tst_lexicalanalyzertest.cpp
+++ b/UnitTests/tst_lexicalanalyzertest.cpp
@@ -221,20 +221,20 @@ void LexicalAnalyzerTest::test_invalid_input()
bigNumber.front() = '1';
bigNumber.back() = 0;
- QVERIFY_EXCEPTION_THROWN(scanWholeStream("(\\9adoctalnumber)"), pdf::PDFException);
- QVERIFY_EXCEPTION_THROWN(scanWholeStream("(\\)"), pdf::PDFException);
- QVERIFY_EXCEPTION_THROWN(scanWholeStream("123 456 +4-5"), pdf::PDFException);
- QVERIFY_EXCEPTION_THROWN(scanWholeStream("123 456 +"), pdf::PDFException);
- QVERIFY_EXCEPTION_THROWN(scanWholeStream("123 456 + 45"), pdf::PDFException);
- QVERIFY_EXCEPTION_THROWN(scanWholeStream(bigNumber.constData()), pdf::PDFException);
- QVERIFY_EXCEPTION_THROWN(scanWholeStream("/#Q1FF"), pdf::PDFException);
- QVERIFY_EXCEPTION_THROWN(scanWholeStream("/#1QFF"), pdf::PDFException);
- QVERIFY_EXCEPTION_THROWN(scanWholeStream("/# "), pdf::PDFException);
- QVERIFY_EXCEPTION_THROWN(scanWholeStream(""), pdf::PDFException);
- QVERIFY_EXCEPTION_THROWN(scanWholeStream("<1FA3"), pdf::PDFException);
- QVERIFY_EXCEPTION_THROWN(scanWholeStream("<1FA"), pdf::PDFException);
- QVERIFY_EXCEPTION_THROWN(scanWholeStream("> albatros"), pdf::PDFException);
- QVERIFY_EXCEPTION_THROWN(scanWholeStream(")"), pdf::PDFException);
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("(\\9adoctalnumber)"));
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("(\\)"));
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("123 456 +4-5"));
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("123 456 +"));
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("123 456 + 45"));
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream(bigNumber.constData()));
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("/#Q1FF"));
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("/#1QFF"));
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("/# "));
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream(""));
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("<1FA3"));
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("<1FA"));
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("> albatros"));
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream(")"));
}
void LexicalAnalyzerTest::test_header_regexp()
@@ -434,7 +434,7 @@ void LexicalAnalyzerTest::test_sampled_function()
}
// Test invalid inputs
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
const char data[] = " << "
" /FunctionType 0 "
@@ -452,10 +452,10 @@ void LexicalAnalyzerTest::test_sampled_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
// Test invalid inputs
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
const char data[] = " << "
" /FunctionType 0 "
@@ -473,10 +473,10 @@ void LexicalAnalyzerTest::test_sampled_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
// Test invalid inputs
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
const char data[] = " << "
" /FunctionType 0 "
@@ -494,10 +494,10 @@ void LexicalAnalyzerTest::test_sampled_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
// Test invalid inputs
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
const char data[] = " << "
" /FunctionType 0 "
@@ -515,10 +515,10 @@ void LexicalAnalyzerTest::test_sampled_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
// Test invalid inputs
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
const char data[] = " << "
" /FunctionType 0 "
@@ -536,10 +536,10 @@ void LexicalAnalyzerTest::test_sampled_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
// Test invalid inputs
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
const char data[] = " << "
" /FunctionType 0 "
@@ -558,10 +558,10 @@ void LexicalAnalyzerTest::test_sampled_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
// Test invalid inputs
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
const char data[] = " << "
" /FunctionType 0 "
@@ -580,10 +580,10 @@ void LexicalAnalyzerTest::test_sampled_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
// Test invalid inputs
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
const char data[] = " << "
" /FunctionType 0 "
@@ -600,10 +600,10 @@ void LexicalAnalyzerTest::test_sampled_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
// Test invalid inputs
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
const char data[] = " << "
" /FunctionType 0 "
@@ -620,7 +620,7 @@ void LexicalAnalyzerTest::test_sampled_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
}
void LexicalAnalyzerTest::test_exponential_function()
@@ -724,7 +724,7 @@ void LexicalAnalyzerTest::test_exponential_function()
}
// Test invalid inputs
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
QByteArray data = " << "
" /FunctionType 2 "
@@ -738,9 +738,9 @@ void LexicalAnalyzerTest::test_exponential_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
QByteArray data = " << "
" /FunctionType 2 "
@@ -753,9 +753,9 @@ void LexicalAnalyzerTest::test_exponential_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
QByteArray data = " << "
" /FunctionType 2 "
@@ -768,9 +768,9 @@ void LexicalAnalyzerTest::test_exponential_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
QByteArray data = " << "
" /FunctionType 2 "
@@ -783,9 +783,9 @@ void LexicalAnalyzerTest::test_exponential_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
QByteArray data = " << "
" /FunctionType 2 "
@@ -801,9 +801,9 @@ void LexicalAnalyzerTest::test_exponential_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
QByteArray data = " << "
" /FunctionType 2 "
@@ -818,9 +818,9 @@ void LexicalAnalyzerTest::test_exponential_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
QByteArray data = " << "
" /FunctionType 2 "
@@ -835,9 +835,9 @@ void LexicalAnalyzerTest::test_exponential_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
QByteArray data = " << "
" /FunctionType 2 "
@@ -852,7 +852,7 @@ void LexicalAnalyzerTest::test_exponential_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
}
void LexicalAnalyzerTest::test_stitching_function()
@@ -882,7 +882,7 @@ void LexicalAnalyzerTest::test_stitching_function()
}
}
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
QByteArray data = " << "
" /FunctionType 3 "
@@ -897,9 +897,9 @@ void LexicalAnalyzerTest::test_stitching_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
QByteArray data = " << "
" /FunctionType 3 "
@@ -914,9 +914,9 @@ void LexicalAnalyzerTest::test_stitching_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
QByteArray data = " << "
" /FunctionType 3 "
@@ -931,9 +931,9 @@ void LexicalAnalyzerTest::test_stitching_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
QByteArray data = " << "
" /FunctionType 3 "
@@ -947,9 +947,9 @@ void LexicalAnalyzerTest::test_stitching_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
- QVERIFY_EXCEPTION_THROWN(
+ QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
{
QByteArray data = " << "
" /FunctionType 3 "
@@ -963,7 +963,7 @@ void LexicalAnalyzerTest::test_stitching_function()
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
QVERIFY(!function);
- }, pdf::PDFException);
+ });
}
void LexicalAnalyzerTest::test_postscript_function()
diff --git a/qbs/imports/Pdf4QtApp.qbs b/qbs/imports/Pdf4QtApp.qbs
deleted file mode 100644
index 21cab5d..0000000
--- a/qbs/imports/Pdf4QtApp.qbs
+++ /dev/null
@@ -1,16 +0,0 @@
-import qbs.FileInfo
-
-Pdf4QtProduct {
- Depends { name: "cpp" }
- type: "application"
- cpp.rpaths: [FileInfo.joinPaths(cpp.rpathOrigin, "..", "lib"), conanLibDirectory]
-
- Depends { name: "Pdf4QtLib" }
- Group {
- fileTagsFilter: product.type
- qbs.install: true
- qbs.installDir: targetInstallDir
- qbs.installSourceBase: buildDirectory
- }
- targetInstallDir: pdf4qtbuildconfig.appInstallDir
-}
diff --git a/qbs/imports/Pdf4QtLibrary.qbs b/qbs/imports/Pdf4QtLibrary.qbs
deleted file mode 100644
index 178a4be..0000000
--- a/qbs/imports/Pdf4QtLibrary.qbs
+++ /dev/null
@@ -1,16 +0,0 @@
-Pdf4QtProduct {
- Depends { name: "cpp" }
- property stringList libType: "dynamiclibrary"
- type: libType
- cpp.sonamePrefix: qbs.targetOS.contains("macos") ? "@rpath" : undefined
- cpp.rpaths: cpp.rpathOrigin
-
- Group {
- fileTagsFilter: "dynamiclibrary"
- qbs.install: install
- qbs.installDir: targetInstallDir
- qbs.installSourceBase: buildDirectory
- }
- targetInstallDir: pdf4qtbuildconfig.libInstallDir
-}
-
diff --git a/qbs/imports/Pdf4QtPlugin.qbs b/qbs/imports/Pdf4QtPlugin.qbs
deleted file mode 100644
index f1bb408..0000000
--- a/qbs/imports/Pdf4QtPlugin.qbs
+++ /dev/null
@@ -1,11 +0,0 @@
-Pdf4QtLibrary {
- Depends { name: "Pdf4QtLib" }
-
- Group {
- fileTagsFilter: "dynamiclibrary"
- qbs.install: install
- qbs.installDir: "bin/pdfplugins"
- qbs.installSourceBase: buildDirectory
- }
-}
-
diff --git a/qbs/imports/Pdf4QtProduct.qbs b/qbs/imports/Pdf4QtProduct.qbs
deleted file mode 100644
index ed69700..0000000
--- a/qbs/imports/Pdf4QtProduct.qbs
+++ /dev/null
@@ -1,10 +0,0 @@
-Product {
- Depends { name: "pdf4qtbuildconfig" }
- Depends { name: "cpp" }
- Depends { name: "Qt.core" }
- cpp.cxxLanguageVersion: "c++20"
- cpp.minimumWindowsVersion: "6.1" // Require at least Windows 7, older versions will be ignored
- property bool install: true
- property string targetInstallDir
-}
-
diff --git a/qbs/modules/pdf4qtbuildconfig/pdf4qtbuildconfig.qbs b/qbs/modules/pdf4qtbuildconfig/pdf4qtbuildconfig.qbs
deleted file mode 100644
index 5d3c664..0000000
--- a/qbs/modules/pdf4qtbuildconfig/pdf4qtbuildconfig.qbs
+++ /dev/null
@@ -1,6 +0,0 @@
-Module {
- property string libDirName: "lib"
- property string appInstallDir: "bin"
- property string libInstallDir: qbs.targetOS.contains("windows") ? "bin" : libDirName
-}
-