Commit a51de260 authored by Ilya Pominov's avatar Ilya Pominov
Browse files

Fix build warning in pdf generator

warning: ‘void Poppler::Document::getPdfVersion(int*, int*) const’ is
deprecated [-Wdeprecated-declarations]
parent d8dbe2f8
Pipeline #260061 passed with stage
in 6 minutes and 37 seconds
......@@ -926,7 +926,13 @@ Okular::DocumentInfo PDFGenerator::generateDocumentInfo(const QSet<Okular::Docum
}
if (keys.contains(Okular::DocumentInfo::CustomKeys)) {
int major, minor;
#if POPPLER_VERSION_MACRO >= QT_VERSION_CHECK(21, 8, 0)
auto version = pdfdoc->getPdfVersion();
major = version.major;
minor = version.minor;
#else
pdfdoc->getPdfVersion(&major, &minor);
#endif
docInfo.set(QStringLiteral("format"), i18nc("PDF v. <version>", "PDF v. %1.%2", major, minor), i18n("Format"));
docInfo.set(QStringLiteral("encryption"), pdfdoc->isEncrypted() ? i18n("Encrypted") : i18n("Unencrypted"), i18n("Security"));
docInfo.set(QStringLiteral("optimization"), pdfdoc->isLinearized() ? i18n("Yes") : i18n("No"), i18n("Optimized"));
......@@ -1615,7 +1621,7 @@ bool PDFGenerator::reparseConfig()
void PDFGenerator::addPages(KConfigDialog *dlg)
{
PDFSettingsWidget *w = new PDFSettingsWidget(dlg);
;
dlg->addPage(w, PDFSettings::self(), i18n("PDF"), QStringLiteral("application-pdf"), i18n("PDF Backend Configuration"));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment