Issue #25: MinGW compilation fix

This commit is contained in:
Jakub Melka
2022-09-11 17:54:11 +02:00
parent 825fe59420
commit 8ffc4f9189
35 changed files with 160 additions and 140 deletions

View File

@ -705,7 +705,7 @@ PDFObject PDFParser::getObject()
{
case PDFLexicalAnalyzer::TokenType::Boolean:
{
Q_ASSERT(m_lookAhead1.data.type() == QVariant::Bool);
Q_ASSERT(m_lookAhead1.data.typeId() == QVariant::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.type() == QVariant::LongLong);
Q_ASSERT(m_lookAhead1.data.typeId() == QVariant::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.type() == QVariant::LongLong);
Q_ASSERT(m_lookAhead1.data.typeId() == QVariant::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.type() == QVariant::Double);
Q_ASSERT(m_lookAhead1.data.typeId() == QVariant::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.type() == QVariant::ByteArray);
Q_ASSERT(m_lookAhead1.data.typeId() == QVariant::ByteArray);
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.type() == QVariant::ByteArray);
Q_ASSERT(m_lookAhead1.data.typeId() == QVariant::ByteArray);
QByteArray array = m_lookAhead1.data.toByteArray();
array.shrink_to_fit();
shift();