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,18 +20,16 @@ DEFINES += OBJECTINSPECTORPLUGIN_LIBRARY
QT += gui widgets
include(../../Pdf4Qt.pri)
LIBS += -L$$OUT_PWD/../..
LIBS += -lPdf4QtLib
QMAKE_CXXFLAGS += /std:c++latest /utf-8
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
DESTDIR = $$OUT_PWD/../../pdfplugins
CONFIG += c++11
SOURCES += \
objectinspectordialog.cpp \
objectinspectorplugin.cpp \
@ -61,3 +59,7 @@ FORMS += \
objectstatisticsdialog.ui \
objectviewerwidget.ui \
statisticsgraphwidget.ui
win32-*g++|unix: {
LIBS += -ltbb
}

View File

@ -35,9 +35,9 @@ ObjectViewerWidget::ObjectViewerWidget(QWidget *parent) :
ObjectViewerWidget::ObjectViewerWidget(bool isPinned, QWidget* parent) :
QWidget(parent),
ui(new Ui::ObjectViewerWidget),
m_isPinned(isPinned),
m_cms(nullptr),
m_document(nullptr),
m_isPinned(isPinned),
m_isRootObject(false)
{
ui->setupUi(this);
@ -252,7 +252,7 @@ void ObjectViewerWidget::updateUi()
ui->stackedWidget->setCurrentWidget(ui->contentTextBrowserPage);
}
}
catch (pdf::PDFException exception)
catch (const pdf::PDFException &exception)
{
ui->contentTextBrowser->setText(exception.getMessage());
ui->stackedWidget->setCurrentWidget(ui->contentTextBrowserPage);