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

@ -585,7 +585,7 @@ PDFDocument PDFDocumentReader::readFromBuffer(const QByteArray& buffer)
PDFObjectStorage storage(std::move(objects), PDFObject(xrefTable.getTrailerDictionary()), qMove(m_securityHandler));
return PDFDocument(std::move(storage), m_version);
}
catch (PDFException parserException)
catch (const PDFException &parserException)
{
m_result = Result::Failed;
m_errorMessage = parserException.getMessage();
@ -770,7 +770,7 @@ PDFDocument PDFDocumentReader::readDamagedDocumentFromBuffer(const QByteArray& b
PDFObjectStorage storage(std::move(objects), PDFObject(trailerDictionaryObject), qMove(m_securityHandler));
return PDFDocument(std::move(storage), m_version);
}
catch (PDFException parserException)
catch (const PDFException &parserException)
{
m_result = Result::Failed;
m_warnings << parserException.getMessage();