Add support for building with mingw-w64 GCC. Fix warnings

This commit is contained in:
Alexey Pavlov
2022-03-12 20:51:21 +03:00
committed by Jakub Melka
parent 2c5aca7ea6
commit d4ee4b890b
41 changed files with 174 additions and 113 deletions

View File

@@ -20,7 +20,8 @@ QT += core gui widgets winextras printsupport texttospeech network xml
TARGET = Pdf4QtViewer
TEMPLATE = lib
win32:TARGET_EXT = .dll
include(../Pdf4Qt.pri)
VERSION = 1.1.0
DEFINES += PDF4QTVIEWER_LIBRARY
@@ -30,7 +31,9 @@ QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2021"
DEFINES += QT_DEPRECATED_WARNINGS
QMAKE_CXXFLAGS += /std:c++latest /utf-8
win32-*g++|unix: {
LIBS += -ltbb
}
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
DESTDIR = $$OUT_PWD/..

View File

@@ -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
continue;
@@ -370,7 +370,7 @@ void PDFDocumentPropertiesDialog::initializeFonts(const pdf::PDFDocument* docume
}
}
}
catch (pdf::PDFException)
catch (const pdf::PDFException &)
{
// Do nothing, some error occured
}

View File

@@ -318,8 +318,8 @@ PDFProgramController::PDFProgramController(QObject* parent) :
m_undoRedoManager(nullptr),
m_recentFileManager(new PDFRecentFileManager(this)),
m_optionalContentActivity(nullptr),
m_futureWatcher(nullptr),
m_textToSpeech(nullptr),
m_futureWatcher(nullptr),
m_CMSManager(new pdf::PDFCMSManager(this)),
m_toolManager(nullptr),
m_annotationManager(nullptr),

View File

@@ -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()));
}
}
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()));
}

View File

@@ -263,11 +263,11 @@ PDFViewerSettings::Settings::Settings() :
m_allowLaunchApplications(true),
m_allowLaunchURI(true),
m_allowDeveloperMode(false),
m_multithreadingStrategy(pdf::PDFExecutionPolicy::Strategy::AlwaysMultithreaded),
m_compiledPageCacheLimit(128 * 1024),
m_thumbnailsCacheLimit(PIXMAP_CACHE_LIMIT),
m_fontCacheLimit(pdf::DEFAULT_FONT_CACHE_LIMIT),
m_instancedFontCacheLimit(pdf::DEFAULT_REALIZED_FONT_CACHE_LIMIT),
m_multithreadingStrategy(pdf::PDFExecutionPolicy::Strategy::AlwaysMultithreaded),
m_speechRate(0.0),
m_speechPitch(0.0),
m_speechVolume(1.0),

View File

@@ -69,9 +69,9 @@ PDFViewerSettingsDialog::PDFViewerSettingsDialog(const PDFViewerSettings::Settin
m_settings(settings),
m_cmsSettings(cmsSettings),
m_otherSettings(otherSettings),
m_certificateStore(certificateStore),
m_actions(),
m_isLoadingData(false),
m_certificateStore(certificateStore),
m_enabledPlugins(enabledPlugins),
m_plugins(plugins),
m_networkAccessManager(nullptr),