~adamreichold/qpdfview/trunk

« back to all changes in this revision

Viewing changes to sources/pdfmodel.cpp

  • Committer: Adam Reichold
  • Date: 2021-08-25 06:46:06 UTC
  • Revision ID: adam.reichold@t-online.de-20210825064606-svrz7zjpnqjqxil1
Make PDF model compatible with latest Poppler Qt6 frontend.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1120
1120
 
1121
1121
    int pdfMajorVersion = 1;
1122
1122
    int pdfMinorVersion = 0;
 
1123
 
 
1124
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
 
1125
 
 
1126
    const auto pdfVersion = m_document->getPdfVersion();
 
1127
    pdfMajorVersion = pdfVersion.major;
 
1128
    pdfMinorVersion = pdfVersion.minor;
 
1129
 
 
1130
#else
 
1131
 
1123
1132
    m_document->getPdfVersion(&pdfMajorVersion, &pdfMinorVersion);
1124
1133
 
 
1134
#endif // QT_VERSION
 
1135
 
1125
1136
    properties.push_back(qMakePair(tr("PDF version"), QString("%1.%2").arg(pdfMajorVersion).arg(pdfMinorVersion)));
1126
1137
 
1127
1138
    properties.push_back(qMakePair(tr("Encrypted"), m_document->isEncrypted() ? tr("Yes") : tr("No")));