mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Add support for building with mingw-w64 GCC. Fix warnings
This commit is contained in:
committed by
Jakub Melka
parent
2c5aca7ea6
commit
d4ee4b890b
@ -17,8 +17,6 @@
|
|||||||
|
|
||||||
QT += core gui xml widgets
|
QT += core gui xml widgets
|
||||||
|
|
||||||
CONFIG += c++11
|
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
# The following define makes your compiler emit warnings if you use
|
||||||
# any Qt feature that has been marked deprecated (the exact warnings
|
# any Qt feature that has been marked deprecated (the exact warnings
|
||||||
# depend on your compiler). Please consult the documentation of the
|
# depend on your compiler). Please consult the documentation of the
|
||||||
@ -30,7 +28,7 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
|||||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
# 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
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
include(../Pdf4Qt.pri)
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/..
|
DESTDIR = $$OUT_PWD/..
|
||||||
|
|
||||||
|
@ -2,8 +2,6 @@ QT += core gui
|
|||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
|
|
||||||
CONFIG += c++11
|
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
# The following define makes your compiler emit warnings if you use
|
||||||
# any Qt feature that has been marked deprecated (the exact warnings
|
# any Qt feature that has been marked deprecated (the exact warnings
|
||||||
# depend on your compiler). Please consult the documentation of the
|
# depend on your compiler). Please consult the documentation of the
|
||||||
@ -15,7 +13,7 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
|||||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
# 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
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
include(../Pdf4Qt.pri)
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
||||||
|
|
||||||
|
34
Pdf4Qt.pri
Normal file
34
Pdf4Qt.pri
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# 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 <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
win32-msvc*: {
|
||||||
|
QMAKE_CXXFLAGS += /std:c++latest /utf-8 /bigobj
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
@ -20,6 +20,8 @@ QT += core gui widgets winextras
|
|||||||
TARGET = Pdf4QtDocDiff
|
TARGET = Pdf4QtDocDiff
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
|
||||||
|
include(../Pdf4Qt.pri)
|
||||||
|
|
||||||
VERSION = 1.1.0
|
VERSION = 1.1.0
|
||||||
|
|
||||||
RC_ICONS = $$PWD/app-icon.ico
|
RC_ICONS = $$PWD/app-icon.ico
|
||||||
@ -28,7 +30,6 @@ QMAKE_TARGET_DESCRIPTION = "PDF Document Diff"
|
|||||||
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2021"
|
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2021"
|
||||||
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
DEFINES += QT_DEPRECATED_WARNINGS
|
||||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
||||||
DESTDIR = $$OUT_PWD/..
|
DESTDIR = $$OUT_PWD/..
|
||||||
|
@ -20,6 +20,8 @@ QT += core gui widgets winextras
|
|||||||
TARGET = Pdf4QtDocPageOrganizer
|
TARGET = Pdf4QtDocPageOrganizer
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
|
||||||
|
include(../Pdf4Qt.pri)
|
||||||
|
|
||||||
VERSION = 1.1.0
|
VERSION = 1.1.0
|
||||||
|
|
||||||
RC_ICONS = $$PWD/app-icon.ico
|
RC_ICONS = $$PWD/app-icon.ico
|
||||||
@ -28,7 +30,6 @@ QMAKE_TARGET_DESCRIPTION = "PDF Document Page Organizer"
|
|||||||
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2021"
|
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2021"
|
||||||
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
DEFINES += QT_DEPRECATED_WARNINGS
|
||||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
||||||
DESTDIR = $$OUT_PWD/..
|
DESTDIR = $$OUT_PWD/..
|
||||||
|
@ -1075,7 +1075,7 @@ bool PageItemModel::dropMimeData(const QMimeData* data, Qt::DropAction action, i
|
|||||||
rows.push_back(row);
|
rows.push_back(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
qSort(rows);
|
std::sort(rows.begin(), rows.end());
|
||||||
|
|
||||||
// Sanity checks on rows
|
// Sanity checks on rows
|
||||||
if (rows.empty())
|
if (rows.empty())
|
||||||
|
@ -20,7 +20,8 @@ QT += gui widgets xml
|
|||||||
TARGET = Pdf4QtLib
|
TARGET = Pdf4QtLib
|
||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
|
|
||||||
win32:TARGET_EXT = .dll
|
include(../Pdf4Qt.pri)
|
||||||
|
|
||||||
VERSION = 1.1.0
|
VERSION = 1.1.0
|
||||||
|
|
||||||
QMAKE_TARGET_DESCRIPTION = "PDF rendering / editing library for Qt"
|
QMAKE_TARGET_DESCRIPTION = "PDF rendering / editing library for Qt"
|
||||||
@ -205,6 +206,7 @@ CONFIG(debug, debug|release) {
|
|||||||
SUFFIX = d
|
SUFFIX = d
|
||||||
}
|
}
|
||||||
|
|
||||||
|
win32-msvc*: {
|
||||||
# Link to freetype library
|
# Link to freetype library
|
||||||
LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/FreeType/ -lfreetype$${SUFFIX}
|
LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/FreeType/ -lfreetype$${SUFFIX}
|
||||||
INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/FreeType/include
|
INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/FreeType/include
|
||||||
@ -240,11 +242,20 @@ DEPENDPATH += $$Pdf4Qt_DEPENDENCIES_PATH/zlib/include
|
|||||||
LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/lcms2/bin$${SUFFIX}/ -llcms2_static
|
LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/lcms2/bin$${SUFFIX}/ -llcms2_static
|
||||||
INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/lcms2/include
|
INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/lcms2/include
|
||||||
DEPENDPATH += $$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
|
# ensure debug info even for RELEASE build
|
||||||
CONFIG += force_debug_info
|
CONFIG += force_debug_info
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8 /bigobj
|
|
||||||
QMAKE_RESOURCE_FLAGS += -threshold 0 -compress 9
|
QMAKE_RESOURCE_FLAGS += -threshold 0 -compress 9
|
||||||
|
|
||||||
PdfforQt_library.files = $$DESTDIR/Pdf4QtLib.dll
|
PdfforQt_library.files = $$DESTDIR/Pdf4QtLib.dll
|
||||||
|
@ -1415,7 +1415,7 @@ void PDFAnnotationManager::drawAnnotation(const PageAnnotation& annotation,
|
|||||||
{
|
{
|
||||||
errors.push_back(PDFRenderError(RenderErrorType::Error, exception.getMessage()));
|
errors.push_back(PDFRenderError(RenderErrorType::Error, exception.getMessage()));
|
||||||
}
|
}
|
||||||
catch (PDFRendererException exception)
|
catch (const PDFRendererException &exception)
|
||||||
{
|
{
|
||||||
errors.push_back(exception.getError());
|
errors.push_back(exception.getError());
|
||||||
}
|
}
|
||||||
|
@ -293,7 +293,7 @@ QImage PDFAbstractColorSpace::getImage(const PDFImageData& imageData,
|
|||||||
|
|
||||||
fillRGBBuffer(inputColors, outputLine, intent, cms, reporter);
|
fillRGBBuffer(inputColors, outputLine, intent, cms, reporter);
|
||||||
}
|
}
|
||||||
catch (PDFException lineException)
|
catch (const PDFException &lineException)
|
||||||
{
|
{
|
||||||
QMutexLocker lock(&exceptionMutex);
|
QMutexLocker lock(&exceptionMutex);
|
||||||
if (!exception)
|
if (!exception)
|
||||||
@ -396,7 +396,7 @@ QImage PDFAbstractColorSpace::getImage(const PDFImageData& imageData,
|
|||||||
*outputLine++ = *alphaLine++;
|
*outputLine++ = *alphaLine++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (PDFException lineException)
|
catch (const PDFException &lineException)
|
||||||
{
|
{
|
||||||
QMutexLocker lock(&exceptionMutex);
|
QMutexLocker lock(&exceptionMutex);
|
||||||
if (!exception)
|
if (!exception)
|
||||||
|
@ -585,7 +585,7 @@ PDFDocument PDFDocumentReader::readFromBuffer(const QByteArray& buffer)
|
|||||||
PDFObjectStorage storage(std::move(objects), PDFObject(xrefTable.getTrailerDictionary()), qMove(m_securityHandler));
|
PDFObjectStorage storage(std::move(objects), PDFObject(xrefTable.getTrailerDictionary()), qMove(m_securityHandler));
|
||||||
return PDFDocument(std::move(storage), m_version);
|
return PDFDocument(std::move(storage), m_version);
|
||||||
}
|
}
|
||||||
catch (PDFException parserException)
|
catch (const PDFException &parserException)
|
||||||
{
|
{
|
||||||
m_result = Result::Failed;
|
m_result = Result::Failed;
|
||||||
m_errorMessage = parserException.getMessage();
|
m_errorMessage = parserException.getMessage();
|
||||||
@ -770,7 +770,7 @@ PDFDocument PDFDocumentReader::readDamagedDocumentFromBuffer(const QByteArray& b
|
|||||||
PDFObjectStorage storage(std::move(objects), PDFObject(trailerDictionaryObject), qMove(m_securityHandler));
|
PDFObjectStorage storage(std::move(objects), PDFObject(trailerDictionaryObject), qMove(m_securityHandler));
|
||||||
return PDFDocument(std::move(storage), m_version);
|
return PDFDocument(std::move(storage), m_version);
|
||||||
}
|
}
|
||||||
catch (PDFException parserException)
|
catch (const PDFException &parserException)
|
||||||
{
|
{
|
||||||
m_result = Result::Failed;
|
m_result = Result::Failed;
|
||||||
m_warnings << parserException.getMessage();
|
m_warnings << parserException.getMessage();
|
||||||
|
@ -548,9 +548,9 @@ private:
|
|||||||
|
|
||||||
void PDFStructureTreeTextFlowCollector::visitStructureTree(const PDFStructureTree* structureTree)
|
void PDFStructureTreeTextFlowCollector::visitStructureTree(const PDFStructureTree* structureTree)
|
||||||
{
|
{
|
||||||
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, QString(), PDFDocumentTextFlow::StructureItemStart});
|
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, QString(), PDFDocumentTextFlow::StructureItemStart, {} });
|
||||||
acceptChildren(structureTree);
|
acceptChildren(structureTree);
|
||||||
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, QString(), PDFDocumentTextFlow::StructureItemEnd});
|
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, QString(), PDFDocumentTextFlow::StructureItemEnd, {} });
|
||||||
}
|
}
|
||||||
|
|
||||||
void PDFStructureTreeTextFlowCollector::markHasContent()
|
void PDFStructureTreeTextFlowCollector::markHasContent()
|
||||||
@ -564,7 +564,7 @@ void PDFStructureTreeTextFlowCollector::markHasContent()
|
|||||||
void PDFStructureTreeTextFlowCollector::visitStructureElement(const PDFStructureElement* structureElement)
|
void PDFStructureTreeTextFlowCollector::visitStructureElement(const PDFStructureElement* structureElement)
|
||||||
{
|
{
|
||||||
size_t index = m_items->size();
|
size_t index = m_items->size();
|
||||||
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, QString(), PDFDocumentTextFlow::StructureItemStart});
|
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, QString(), PDFDocumentTextFlow::StructureItemStart, {} });
|
||||||
|
|
||||||
// Mark stack so we can delete unused items
|
// Mark stack so we can delete unused items
|
||||||
m_hasContentStack.push_back(false);
|
m_hasContentStack.push_back(false);
|
||||||
@ -579,37 +579,37 @@ void PDFStructureTreeTextFlowCollector::visitStructureElement(const PDFStructure
|
|||||||
if (!title.isEmpty())
|
if (!title.isEmpty())
|
||||||
{
|
{
|
||||||
markHasContent();
|
markHasContent();
|
||||||
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, QString(), PDFDocumentTextFlow::StructureTitle});
|
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, QString(), PDFDocumentTextFlow::StructureTitle, {} });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!language.isEmpty())
|
if (!language.isEmpty())
|
||||||
{
|
{
|
||||||
markHasContent();
|
markHasContent();
|
||||||
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, language, PDFDocumentTextFlow::StructureLanguage });
|
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, language, PDFDocumentTextFlow::StructureLanguage, {} });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!alternativeDescription.isEmpty())
|
if (!alternativeDescription.isEmpty())
|
||||||
{
|
{
|
||||||
markHasContent();
|
markHasContent();
|
||||||
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, alternativeDescription, PDFDocumentTextFlow::StructureAlternativeDescription });
|
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, alternativeDescription, PDFDocumentTextFlow::StructureAlternativeDescription, {} });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!expandedForm.isEmpty())
|
if (!expandedForm.isEmpty())
|
||||||
{
|
{
|
||||||
markHasContent();
|
markHasContent();
|
||||||
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, expandedForm, PDFDocumentTextFlow::StructureExpandedForm });
|
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, expandedForm, PDFDocumentTextFlow::StructureExpandedForm, {} });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!actualText.isEmpty())
|
if (!actualText.isEmpty())
|
||||||
{
|
{
|
||||||
markHasContent();
|
markHasContent();
|
||||||
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, actualText, PDFDocumentTextFlow::StructureActualText });
|
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, actualText, PDFDocumentTextFlow::StructureActualText, {} });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!phoneme.isEmpty())
|
if (!phoneme.isEmpty())
|
||||||
{
|
{
|
||||||
markHasContent();
|
markHasContent();
|
||||||
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, phoneme, PDFDocumentTextFlow::StructurePhoneme });
|
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, phoneme, PDFDocumentTextFlow::StructurePhoneme, {} });
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto& textItem : m_extractor->getText(structureElement))
|
for (const auto& textItem : m_extractor->getText(structureElement))
|
||||||
@ -623,7 +623,7 @@ void PDFStructureTreeTextFlowCollector::visitStructureElement(const PDFStructure
|
|||||||
const bool hasContent = m_hasContentStack.back();
|
const bool hasContent = m_hasContentStack.back();
|
||||||
m_hasContentStack.pop_back();
|
m_hasContentStack.pop_back();
|
||||||
|
|
||||||
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, QString(), PDFDocumentTextFlow::StructureItemEnd });
|
m_items->push_back(PDFDocumentTextFlow::Item{ QRectF(), -1, QString(), PDFDocumentTextFlow::StructureItemEnd, {} });
|
||||||
|
|
||||||
if (!hasContent)
|
if (!hasContent)
|
||||||
{
|
{
|
||||||
@ -702,12 +702,12 @@ PDFDocumentTextFlow PDFDocumentTextFlowFactory::create(const PDFDocument* docume
|
|||||||
PDFTextFlows textFlows = PDFTextFlow::createTextFlows(textLayout, PDFTextFlow::FlowFlags(PDFTextFlow::SeparateBlocks) | PDFTextFlow::RemoveSoftHyphen, pageIndex);
|
PDFTextFlows textFlows = PDFTextFlow::createTextFlows(textLayout, PDFTextFlow::FlowFlags(PDFTextFlow::SeparateBlocks) | PDFTextFlow::RemoveSoftHyphen, pageIndex);
|
||||||
|
|
||||||
PDFDocumentTextFlow::Items flowItems;
|
PDFDocumentTextFlow::Items flowItems;
|
||||||
flowItems.emplace_back(PDFDocumentTextFlow::Item{ QRectF(), pageIndex, PDFTranslationContext::tr("Page %1").arg(pageIndex + 1), PDFDocumentTextFlow::PageStart });
|
flowItems.emplace_back(PDFDocumentTextFlow::Item{ QRectF(), pageIndex, PDFTranslationContext::tr("Page %1").arg(pageIndex + 1), PDFDocumentTextFlow::PageStart, {} });
|
||||||
for (const PDFTextFlow& textFlow : textFlows)
|
for (const PDFTextFlow& textFlow : textFlows)
|
||||||
{
|
{
|
||||||
flowItems.emplace_back(PDFDocumentTextFlow::Item{ textFlow.getBoundingBox(), pageIndex, textFlow.getText(), PDFDocumentTextFlow::Text, textFlow.getBoundingBoxes() });
|
flowItems.emplace_back(PDFDocumentTextFlow::Item{ textFlow.getBoundingBox(), pageIndex, textFlow.getText(), PDFDocumentTextFlow::Text, textFlow.getBoundingBoxes() });
|
||||||
}
|
}
|
||||||
flowItems.emplace_back(PDFDocumentTextFlow::Item{ QRectF(), pageIndex, QString(), PDFDocumentTextFlow::PageEnd });
|
flowItems.emplace_back(PDFDocumentTextFlow::Item{ QRectF(), pageIndex, QString(), PDFDocumentTextFlow::PageEnd, {} });
|
||||||
|
|
||||||
QMutexLocker lock(&mutex);
|
QMutexLocker lock(&mutex);
|
||||||
items[pageIndex] = qMove(flowItems);
|
items[pageIndex] = qMove(flowItems);
|
||||||
@ -760,7 +760,7 @@ PDFDocumentTextFlow PDFDocumentTextFlowFactory::create(const PDFDocument* docume
|
|||||||
PDFDocumentTextFlow::Items flowItems;
|
PDFDocumentTextFlow::Items flowItems;
|
||||||
for (PDFInteger pageIndex : pageIndices)
|
for (PDFInteger pageIndex : pageIndices)
|
||||||
{
|
{
|
||||||
flowItems.emplace_back(PDFDocumentTextFlow::Item{ QRectF(), pageIndex, PDFTranslationContext::tr("Page %1").arg(pageIndex + 1), PDFDocumentTextFlow::PageStart });
|
flowItems.emplace_back(PDFDocumentTextFlow::Item{ QRectF(), pageIndex, PDFTranslationContext::tr("Page %1").arg(pageIndex + 1), PDFDocumentTextFlow::PageStart, {} });
|
||||||
for (const PDFStructureTreeTextItem& sequenceItem : extractor.getTextSequence(pageIndex))
|
for (const PDFStructureTreeTextItem& sequenceItem : extractor.getTextSequence(pageIndex))
|
||||||
{
|
{
|
||||||
if (sequenceItem.type == PDFStructureTreeTextItem::Type::Text)
|
if (sequenceItem.type == PDFStructureTreeTextItem::Type::Text)
|
||||||
@ -768,7 +768,7 @@ PDFDocumentTextFlow PDFDocumentTextFlowFactory::create(const PDFDocument* docume
|
|||||||
flowItems.emplace_back(PDFDocumentTextFlow::Item{ sequenceItem.boundingRect, pageIndex, sequenceItem.text, PDFDocumentTextFlow::Text, sequenceItem.characterBoundingRects });
|
flowItems.emplace_back(PDFDocumentTextFlow::Item{ sequenceItem.boundingRect, pageIndex, sequenceItem.text, PDFDocumentTextFlow::Text, sequenceItem.characterBoundingRects });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
flowItems.emplace_back(PDFDocumentTextFlow::Item{ QRectF(), pageIndex, QString(), PDFDocumentTextFlow::PageEnd });
|
flowItems.emplace_back(PDFDocumentTextFlow::Item{ QRectF(), pageIndex, QString(), PDFDocumentTextFlow::PageEnd, {} });
|
||||||
}
|
}
|
||||||
|
|
||||||
result = PDFDocumentTextFlow(qMove(flowItems));
|
result = PDFDocumentTextFlow(qMove(flowItems));
|
||||||
|
@ -707,7 +707,7 @@ void PDFPageContentProcessor::processContent(const QByteArray& content)
|
|||||||
m_operands.clear();
|
m_operands.clear();
|
||||||
m_errorList.append(PDFRenderError(RenderErrorType::Error, exception.getMessage()));
|
m_errorList.append(PDFRenderError(RenderErrorType::Error, exception.getMessage()));
|
||||||
}
|
}
|
||||||
catch (PDFRendererException exception)
|
catch (const PDFRendererException &exception)
|
||||||
{
|
{
|
||||||
m_operands.clear();
|
m_operands.clear();
|
||||||
m_errorList.append(exception.getError());
|
m_errorList.append(exception.getError());
|
||||||
@ -3401,7 +3401,7 @@ bool PDFPageContentProcessor::isContentSuppressedByOC(PDFObjectReference ocgOrOc
|
|||||||
{
|
{
|
||||||
ocmd = PDFOptionalContentMembershipObject::create(m_document, PDFObject::createReference(ocgOrOcmd));
|
ocmd = PDFOptionalContentMembershipObject::create(m_document, PDFObject::createReference(ocgOrOcmd));
|
||||||
}
|
}
|
||||||
catch (PDFException e)
|
catch (const PDFException &e)
|
||||||
{
|
{
|
||||||
m_errorList.push_back(PDFRenderError(RenderErrorType::Error, e.getMessage()));
|
m_errorList.push_back(PDFRenderError(RenderErrorType::Error, e.getMessage()));
|
||||||
}
|
}
|
||||||
|
@ -700,7 +700,7 @@ protected:
|
|||||||
/// Returns optional content activity
|
/// Returns optional content activity
|
||||||
const PDFOptionalContentActivity* getOptionalContentActivity() const { return m_optionalContentActivity; }
|
const PDFOptionalContentActivity* getOptionalContentActivity() const { return m_optionalContentActivity; }
|
||||||
|
|
||||||
class PDFTransparencyGroupGuard
|
class PDF4QTLIBSHARED_EXPORT PDFTransparencyGroupGuard
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit PDFTransparencyGroupGuard(PDFPageContentProcessor* processor, PDFTransparencyGroup&& group);
|
explicit PDFTransparencyGroupGuard(PDFPageContentProcessor* processor, PDFTransparencyGroup&& group);
|
||||||
|
@ -246,7 +246,7 @@ std::vector<PDFDependentLibraryInfo> PDFDependentLibraryInfo::getLibraryInfo()
|
|||||||
libjpegInfo.library = tr("libjpeg");
|
libjpegInfo.library = tr("libjpeg");
|
||||||
libjpegInfo.license = tr("permissive + ack.");
|
libjpegInfo.license = tr("permissive + ack.");
|
||||||
libjpegInfo.url = tr("https://www.ijg.org/");
|
libjpegInfo.url = tr("https://www.ijg.org/");
|
||||||
#if defined(Q_OS_UNIX)
|
#if defined(Q_OS_UNIX) || defined(__MINGW32__)
|
||||||
libjpegInfo.version = tr("%1").arg(JPEG_LIB_VERSION);
|
libjpegInfo.version = tr("%1").arg(JPEG_LIB_VERSION);
|
||||||
#else
|
#else
|
||||||
libjpegInfo.version = tr("%1.%2").arg(JPEG_LIB_VERSION_MAJOR).arg(JPEG_LIB_VERSION_MINOR);
|
libjpegInfo.version = tr("%1.%2").arg(JPEG_LIB_VERSION_MAJOR).arg(JPEG_LIB_VERSION_MINOR);
|
||||||
|
@ -20,7 +20,8 @@ QT += core gui widgets winextras printsupport texttospeech network xml
|
|||||||
TARGET = Pdf4QtViewer
|
TARGET = Pdf4QtViewer
|
||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
|
|
||||||
win32:TARGET_EXT = .dll
|
include(../Pdf4Qt.pri)
|
||||||
|
|
||||||
VERSION = 1.1.0
|
VERSION = 1.1.0
|
||||||
|
|
||||||
DEFINES += PDF4QTVIEWER_LIBRARY
|
DEFINES += PDF4QTVIEWER_LIBRARY
|
||||||
@ -30,7 +31,9 @@ QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2021"
|
|||||||
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
DEFINES += QT_DEPRECATED_WARNINGS
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
win32-*g++|unix: {
|
||||||
|
LIBS += -ltbb
|
||||||
|
}
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
||||||
DESTDIR = $$OUT_PWD/..
|
DESTDIR = $$OUT_PWD/..
|
||||||
|
@ -361,7 +361,7 @@ void PDFDocumentPropertiesDialog::initializeFonts(const pdf::PDFDocument* docume
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (pdf::PDFException)
|
catch (const pdf::PDFException &)
|
||||||
{
|
{
|
||||||
// Do nothing, some error occured, continue with next font
|
// Do nothing, some error occured, continue with next font
|
||||||
continue;
|
continue;
|
||||||
@ -370,7 +370,7 @@ void PDFDocumentPropertiesDialog::initializeFonts(const pdf::PDFDocument* docume
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (pdf::PDFException)
|
catch (const pdf::PDFException &)
|
||||||
{
|
{
|
||||||
// Do nothing, some error occured
|
// Do nothing, some error occured
|
||||||
}
|
}
|
||||||
|
@ -318,8 +318,8 @@ PDFProgramController::PDFProgramController(QObject* parent) :
|
|||||||
m_undoRedoManager(nullptr),
|
m_undoRedoManager(nullptr),
|
||||||
m_recentFileManager(new PDFRecentFileManager(this)),
|
m_recentFileManager(new PDFRecentFileManager(this)),
|
||||||
m_optionalContentActivity(nullptr),
|
m_optionalContentActivity(nullptr),
|
||||||
m_futureWatcher(nullptr),
|
|
||||||
m_textToSpeech(nullptr),
|
m_textToSpeech(nullptr),
|
||||||
|
m_futureWatcher(nullptr),
|
||||||
m_CMSManager(new pdf::PDFCMSManager(this)),
|
m_CMSManager(new pdf::PDFCMSManager(this)),
|
||||||
m_toolManager(nullptr),
|
m_toolManager(nullptr),
|
||||||
m_annotationManager(nullptr),
|
m_annotationManager(nullptr),
|
||||||
|
@ -663,7 +663,7 @@ void PDFSidebarWidget::onAttachmentCustomContextMenuRequested(const QPoint& pos)
|
|||||||
QMessageBox::critical(this, tr("Error"), tr("Failed to save attachment to file. %1").arg(file.errorString()));
|
QMessageBox::critical(this, tr("Error"), tr("Failed to save attachment to file. %1").arg(file.errorString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (pdf::PDFException e)
|
catch (const pdf::PDFException &e)
|
||||||
{
|
{
|
||||||
QMessageBox::critical(this, tr("Error"), tr("Failed to save attachment to file. %1").arg(e.getMessage()));
|
QMessageBox::critical(this, tr("Error"), tr("Failed to save attachment to file. %1").arg(e.getMessage()));
|
||||||
}
|
}
|
||||||
|
@ -263,11 +263,11 @@ PDFViewerSettings::Settings::Settings() :
|
|||||||
m_allowLaunchApplications(true),
|
m_allowLaunchApplications(true),
|
||||||
m_allowLaunchURI(true),
|
m_allowLaunchURI(true),
|
||||||
m_allowDeveloperMode(false),
|
m_allowDeveloperMode(false),
|
||||||
|
m_multithreadingStrategy(pdf::PDFExecutionPolicy::Strategy::AlwaysMultithreaded),
|
||||||
m_compiledPageCacheLimit(128 * 1024),
|
m_compiledPageCacheLimit(128 * 1024),
|
||||||
m_thumbnailsCacheLimit(PIXMAP_CACHE_LIMIT),
|
m_thumbnailsCacheLimit(PIXMAP_CACHE_LIMIT),
|
||||||
m_fontCacheLimit(pdf::DEFAULT_FONT_CACHE_LIMIT),
|
m_fontCacheLimit(pdf::DEFAULT_FONT_CACHE_LIMIT),
|
||||||
m_instancedFontCacheLimit(pdf::DEFAULT_REALIZED_FONT_CACHE_LIMIT),
|
m_instancedFontCacheLimit(pdf::DEFAULT_REALIZED_FONT_CACHE_LIMIT),
|
||||||
m_multithreadingStrategy(pdf::PDFExecutionPolicy::Strategy::AlwaysMultithreaded),
|
|
||||||
m_speechRate(0.0),
|
m_speechRate(0.0),
|
||||||
m_speechPitch(0.0),
|
m_speechPitch(0.0),
|
||||||
m_speechVolume(1.0),
|
m_speechVolume(1.0),
|
||||||
|
@ -69,9 +69,9 @@ PDFViewerSettingsDialog::PDFViewerSettingsDialog(const PDFViewerSettings::Settin
|
|||||||
m_settings(settings),
|
m_settings(settings),
|
||||||
m_cmsSettings(cmsSettings),
|
m_cmsSettings(cmsSettings),
|
||||||
m_otherSettings(otherSettings),
|
m_otherSettings(otherSettings),
|
||||||
m_certificateStore(certificateStore),
|
|
||||||
m_actions(),
|
m_actions(),
|
||||||
m_isLoadingData(false),
|
m_isLoadingData(false),
|
||||||
|
m_certificateStore(certificateStore),
|
||||||
m_enabledPlugins(enabledPlugins),
|
m_enabledPlugins(enabledPlugins),
|
||||||
m_plugins(plugins),
|
m_plugins(plugins),
|
||||||
m_networkAccessManager(nullptr),
|
m_networkAccessManager(nullptr),
|
||||||
|
@ -20,6 +20,8 @@ QT += core gui widgets winextras
|
|||||||
TARGET = Pdf4QtViewerLite
|
TARGET = Pdf4QtViewerLite
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
|
||||||
|
include(../Pdf4Qt.pri)
|
||||||
|
|
||||||
VERSION = 1.1.0
|
VERSION = 1.1.0
|
||||||
|
|
||||||
RC_ICONS = $$PWD/app-icon.ico
|
RC_ICONS = $$PWD/app-icon.ico
|
||||||
@ -28,7 +30,10 @@ QMAKE_TARGET_DESCRIPTION = "PDF viewer for Qt, Lite version"
|
|||||||
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2021"
|
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2021"
|
||||||
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
DEFINES += QT_DEPRECATED_WARNINGS
|
||||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
|
||||||
|
win32-*g++|unix: {
|
||||||
|
LIBS += -ltbb
|
||||||
|
}
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources $$PWD/../PDF4QtViewer
|
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources $$PWD/../PDF4QtViewer
|
||||||
DESTDIR = $$OUT_PWD/..
|
DESTDIR = $$OUT_PWD/..
|
||||||
|
@ -20,18 +20,20 @@ DEFINES += AUDIOBOOKPLUGIN_LIBRARY
|
|||||||
|
|
||||||
QT += gui widgets
|
QT += gui widgets
|
||||||
|
|
||||||
|
include(../../Pdf4Qt.pri)
|
||||||
|
|
||||||
LIBS += -L$$OUT_PWD/../..
|
LIBS += -L$$OUT_PWD/../..
|
||||||
|
|
||||||
LIBS += -lPdf4QtLib
|
LIBS += -lPdf4QtLib
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
win32-*g++: {
|
||||||
|
LIBS += -lole32 -lsapi
|
||||||
|
}
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/../../pdfplugins
|
DESTDIR = $$OUT_PWD/../../pdfplugins
|
||||||
|
|
||||||
CONFIG += c++11
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
audiobookcreator.cpp \
|
audiobookcreator.cpp \
|
||||||
audiobookplugin.cpp \
|
audiobookplugin.cpp \
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include "audiobookcreator.h"
|
#include "audiobookcreator.h"
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
#include <windows.h>
|
||||||
#include <sapi.h>
|
#include <sapi.h>
|
||||||
#if defined(PDF4QT_USE_PRAGMA_LIB)
|
#if defined(PDF4QT_USE_PRAGMA_LIB)
|
||||||
#pragma comment(lib, "ole32")
|
#pragma comment(lib, "ole32")
|
||||||
|
@ -20,18 +20,16 @@ DEFINES += DIMENSIONPLUGIN_LIBRARY
|
|||||||
|
|
||||||
QT += gui widgets
|
QT += gui widgets
|
||||||
|
|
||||||
|
include(../../Pdf4Qt.pri)
|
||||||
|
|
||||||
LIBS += -L$$OUT_PWD/../..
|
LIBS += -L$$OUT_PWD/../..
|
||||||
|
|
||||||
LIBS += -lPdf4QtLib
|
LIBS += -lPdf4QtLib
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/../../pdfplugins
|
DESTDIR = $$OUT_PWD/../../pdfplugins
|
||||||
|
|
||||||
CONFIG += c++11
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
dimensionsplugin.cpp \
|
dimensionsplugin.cpp \
|
||||||
dimensiontool.cpp \
|
dimensiontool.cpp \
|
||||||
|
@ -20,18 +20,16 @@ DEFINES += OBJECTINSPECTORPLUGIN_LIBRARY
|
|||||||
|
|
||||||
QT += gui widgets
|
QT += gui widgets
|
||||||
|
|
||||||
|
include(../../Pdf4Qt.pri)
|
||||||
|
|
||||||
LIBS += -L$$OUT_PWD/../..
|
LIBS += -L$$OUT_PWD/../..
|
||||||
|
|
||||||
LIBS += -lPdf4QtLib
|
LIBS += -lPdf4QtLib
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/../../pdfplugins
|
DESTDIR = $$OUT_PWD/../../pdfplugins
|
||||||
|
|
||||||
CONFIG += c++11
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
objectinspectordialog.cpp \
|
objectinspectordialog.cpp \
|
||||||
objectinspectorplugin.cpp \
|
objectinspectorplugin.cpp \
|
||||||
@ -61,3 +59,7 @@ FORMS += \
|
|||||||
objectstatisticsdialog.ui \
|
objectstatisticsdialog.ui \
|
||||||
objectviewerwidget.ui \
|
objectviewerwidget.ui \
|
||||||
statisticsgraphwidget.ui
|
statisticsgraphwidget.ui
|
||||||
|
|
||||||
|
win32-*g++|unix: {
|
||||||
|
LIBS += -ltbb
|
||||||
|
}
|
||||||
|
@ -35,9 +35,9 @@ ObjectViewerWidget::ObjectViewerWidget(QWidget *parent) :
|
|||||||
ObjectViewerWidget::ObjectViewerWidget(bool isPinned, QWidget* parent) :
|
ObjectViewerWidget::ObjectViewerWidget(bool isPinned, QWidget* parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
ui(new Ui::ObjectViewerWidget),
|
ui(new Ui::ObjectViewerWidget),
|
||||||
m_isPinned(isPinned),
|
|
||||||
m_cms(nullptr),
|
m_cms(nullptr),
|
||||||
m_document(nullptr),
|
m_document(nullptr),
|
||||||
|
m_isPinned(isPinned),
|
||||||
m_isRootObject(false)
|
m_isRootObject(false)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
@ -252,7 +252,7 @@ void ObjectViewerWidget::updateUi()
|
|||||||
ui->stackedWidget->setCurrentWidget(ui->contentTextBrowserPage);
|
ui->stackedWidget->setCurrentWidget(ui->contentTextBrowserPage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (pdf::PDFException exception)
|
catch (const pdf::PDFException &exception)
|
||||||
{
|
{
|
||||||
ui->contentTextBrowser->setText(exception.getMessage());
|
ui->contentTextBrowser->setText(exception.getMessage());
|
||||||
ui->stackedWidget->setCurrentWidget(ui->contentTextBrowserPage);
|
ui->stackedWidget->setCurrentWidget(ui->contentTextBrowserPage);
|
||||||
|
@ -20,18 +20,16 @@ DEFINES += OUTPUTPREVIEWPLUGIN_LIBRARY
|
|||||||
|
|
||||||
QT += gui widgets
|
QT += gui widgets
|
||||||
|
|
||||||
|
include(../../Pdf4Qt.pri)
|
||||||
|
|
||||||
LIBS += -L$$OUT_PWD/../..
|
LIBS += -L$$OUT_PWD/../..
|
||||||
|
|
||||||
LIBS += -lPdf4QtLib
|
LIBS += -lPdf4QtLib
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/../../pdfplugins
|
DESTDIR = $$OUT_PWD/../../pdfplugins
|
||||||
|
|
||||||
CONFIG += c++11
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
inkcoveragedialog.cpp \
|
inkcoveragedialog.cpp \
|
||||||
outputpreviewdialog.cpp \
|
outputpreviewdialog.cpp \
|
||||||
|
@ -20,18 +20,16 @@ DEFINES += REDACTPLUGIN_LIBRARY
|
|||||||
|
|
||||||
QT += gui widgets
|
QT += gui widgets
|
||||||
|
|
||||||
|
include(../../Pdf4Qt.pri)
|
||||||
|
|
||||||
LIBS += -L$$OUT_PWD/../..
|
LIBS += -L$$OUT_PWD/../..
|
||||||
|
|
||||||
LIBS += -lPdf4QtLib
|
LIBS += -lPdf4QtLib
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/../../pdfplugins
|
DESTDIR = $$OUT_PWD/../../pdfplugins
|
||||||
|
|
||||||
CONFIG += c++11
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
createredacteddocumentdialog.cpp \
|
createredacteddocumentdialog.cpp \
|
||||||
redactplugin.cpp
|
redactplugin.cpp
|
||||||
|
@ -20,18 +20,16 @@ DEFINES += SOFTPROOFINGPLUGIN_LIBRARY
|
|||||||
|
|
||||||
QT += gui widgets
|
QT += gui widgets
|
||||||
|
|
||||||
|
include(../../Pdf4Qt.pri)
|
||||||
|
|
||||||
LIBS += -L$$OUT_PWD/../..
|
LIBS += -L$$OUT_PWD/../..
|
||||||
|
|
||||||
LIBS += -lPdf4QtLib
|
LIBS += -lPdf4QtLib
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/../../pdfplugins
|
DESTDIR = $$OUT_PWD/../../pdfplugins
|
||||||
|
|
||||||
CONFIG += c++11
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
softproofingplugin.cpp \
|
softproofingplugin.cpp \
|
||||||
settingsdialog.cpp
|
settingsdialog.cpp
|
||||||
|
@ -20,6 +20,8 @@ QT += core gui widgets winextras
|
|||||||
TARGET = Pdf4QtViewerProfi
|
TARGET = Pdf4QtViewerProfi
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
|
||||||
|
include(../Pdf4Qt.pri)
|
||||||
|
|
||||||
VERSION = 1.1.0
|
VERSION = 1.1.0
|
||||||
|
|
||||||
RC_ICONS = $$PWD/app-icon.ico
|
RC_ICONS = $$PWD/app-icon.ico
|
||||||
@ -28,7 +30,10 @@ QMAKE_TARGET_DESCRIPTION = "PDF viewer for Qt, Profi version"
|
|||||||
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2021"
|
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2021"
|
||||||
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
DEFINES += QT_DEPRECATED_WARNINGS
|
||||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
|
||||||
|
win32-*g++|unix: {
|
||||||
|
LIBS += -ltbb
|
||||||
|
}
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources $$PWD/../PDF4QtViewer
|
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources $$PWD/../PDF4QtViewer
|
||||||
DESTDIR = $$OUT_PWD/..
|
DESTDIR = $$OUT_PWD/..
|
||||||
|
@ -17,7 +17,9 @@
|
|||||||
|
|
||||||
QT += gui widgets
|
QT += gui widgets
|
||||||
|
|
||||||
CONFIG += c++11 console
|
include(../Pdf4Qt.pri)
|
||||||
|
|
||||||
|
CONFIG += console
|
||||||
CONFIG -= app_bundle
|
CONFIG -= app_bundle
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
# The following define makes your compiler emit warnings if you use
|
||||||
@ -31,8 +33,6 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
|||||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
# 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
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/..
|
DESTDIR = $$OUT_PWD/..
|
||||||
|
@ -15,9 +15,11 @@
|
|||||||
# You should have received a copy of the GNU Lesser General Public License
|
# You should have received a copy of the GNU Lesser General Public License
|
||||||
# along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
# along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
CONFIG += c++11 console
|
CONFIG += console
|
||||||
CONFIG -= app_bundle
|
CONFIG -= app_bundle
|
||||||
|
|
||||||
|
include(../Pdf4Qt.pri)
|
||||||
|
|
||||||
TARGET = PdfTool
|
TARGET = PdfTool
|
||||||
VERSION = 1.1.0
|
VERSION = 1.1.0
|
||||||
|
|
||||||
@ -28,7 +30,12 @@ QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2021"
|
|||||||
# In order to do so, uncomment the following line.
|
# 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
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
win32-*g++|unix: {
|
||||||
|
LIBS += -ltbb
|
||||||
|
win32: {
|
||||||
|
LIBS += -lole32 -lsapi
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ int PDFToolHelpApplication::execute(const PDFToolOptions& options)
|
|||||||
|
|
||||||
infos.emplace_back(qMove(info));
|
infos.emplace_back(qMove(info));
|
||||||
}
|
}
|
||||||
qSort(infos);
|
std::sort(infos.begin(), infos.end());
|
||||||
|
|
||||||
for (const Info& info : infos)
|
for (const Info& info : infos)
|
||||||
{
|
{
|
||||||
|
@ -189,7 +189,7 @@ int PDFToolAttachmentsApplication::execute(const PDFToolOptions& options)
|
|||||||
return ErrorFailedWriteToFile;
|
return ErrorFailedWriteToFile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (pdf::PDFException e)
|
catch (const pdf::PDFException &e)
|
||||||
{
|
{
|
||||||
PDFConsole::writeError(PDFToolTranslationContext::tr("Failed to save attachment to file. %1").arg(e.getMessage()), options.outputCodec);
|
PDFConsole::writeError(PDFToolTranslationContext::tr("Failed to save attachment to file. %1").arg(e.getMessage()), options.outputCodec);
|
||||||
return ErrorFailedWriteToFile;
|
return ErrorFailedWriteToFile;
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
#include <sapi.h>
|
#include <sapi.h>
|
||||||
|
|
||||||
#if defined(PDF4QT_USE_PRAGMA_LIB)
|
#if defined(PDF4QT_USE_PRAGMA_LIB)
|
||||||
|
@ -254,7 +254,7 @@ int PDFToolInfoFonts::execute(const PDFToolOptions& options)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (pdf::PDFException)
|
catch (const pdf::PDFException &)
|
||||||
{
|
{
|
||||||
// Do nothing, some error occured, continue with next font
|
// Do nothing, some error occured, continue with next font
|
||||||
continue;
|
continue;
|
||||||
@ -263,7 +263,7 @@ int PDFToolInfoFonts::execute(const PDFToolOptions& options)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (pdf::PDFException)
|
catch (const pdf::PDFException &)
|
||||||
{
|
{
|
||||||
// Do nothing, some error occured
|
// Do nothing, some error occured
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ int PDFToolInfoMetadataApplication::execute(const PDFToolOptions& options)
|
|||||||
QByteArray rawData = document.getDecodedStream(metadata.getStream());
|
QByteArray rawData = document.getDecodedStream(metadata.getStream());
|
||||||
PDFConsole::writeData(rawData);
|
PDFConsole::writeData(rawData);
|
||||||
}
|
}
|
||||||
catch (pdf::PDFException e)
|
catch (const pdf::PDFException &e)
|
||||||
{
|
{
|
||||||
PDFConsole::writeError(e.getMessage(), options.outputCodec);
|
PDFConsole::writeError(e.getMessage(), options.outputCodec);
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,7 @@ int PDFToolSeparate::execute(const PDFToolOptions& options)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (pdf::PDFException exception)
|
catch (const pdf::PDFException &exception)
|
||||||
{
|
{
|
||||||
PDFConsole::writeError(exception.getMessage(), options.outputCodec);
|
PDFConsole::writeError(exception.getMessage(), options.outputCodec);
|
||||||
}
|
}
|
||||||
|
@ -211,7 +211,7 @@ int PDFToolUnite::execute(const PDFToolOptions& options)
|
|||||||
return ErrorFailedWriteToFile;
|
return ErrorFailedWriteToFile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (pdf::PDFException exception)
|
catch (const pdf::PDFException &exception)
|
||||||
{
|
{
|
||||||
PDFConsole::writeError(exception.getMessage(), options.outputCodec);
|
PDFConsole::writeError(exception.getMessage(), options.outputCodec);
|
||||||
return ErrorUnknown;
|
return ErrorUnknown;
|
||||||
|
@ -134,7 +134,7 @@ void PDFXmlExportVisitor::visitStream(const pdf::PDFStream* stream)
|
|||||||
m_writer->writeTextElement("text", text);
|
m_writer->writeTextElement("text", text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (pdf::PDFException)
|
catch (const pdf::PDFException &)
|
||||||
{
|
{
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,8 @@ CONFIG -= app_bundle
|
|||||||
|
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
|
||||||
|
include(../Pdf4Qt.pri)
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../Pdf4QtLib/Sources
|
INCLUDEPATH += $$PWD/../Pdf4QtLib/Sources
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/..
|
DESTDIR = $$OUT_PWD/..
|
||||||
@ -30,8 +32,6 @@ LIBS += -L$$OUT_PWD/..
|
|||||||
|
|
||||||
LIBS += -lPdf4QtLib
|
LIBS += -lPdf4QtLib
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += /std:c++latest
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
tst_lexicalanalyzertest.cpp
|
tst_lexicalanalyzertest.cpp
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user