From f19410ac3b27e33dd62105746784e61e85b90a1d Mon Sep 17 00:00:00 2001 From: Jean Ghali Date: Wed, 2 Mar 2022 22:22:53 +0000 Subject: [PATCH] #16764: Build break with poppler 22.03.0 git-svn-id: svn://scribus.net/trunk/Scribus@24982 11d20701-8431-0410-a711-e3c959e3b870 --- scribus/plugins/import/pdf/importpdf.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp index 154e58a3f0..392dcd9e64 100644 --- a/scribus/plugins/import/pdf/importpdf.cpp +++ b/scribus/plugins/import/pdf/importpdf.cpp @@ -89,7 +89,11 @@ QImage PdfPlug::readThumbnail(const QString& fName) #endif globalParams->setErrQuiet(gTrue); +#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0) + PDFDoc pdfDoc{ std::make_unique(fname) }; +#else PDFDoc pdfDoc{fname, nullptr, nullptr, nullptr}; +#endif if (!pdfDoc.isOk() || pdfDoc.getErrorCode() == errEncrypted) return QImage(); @@ -342,7 +346,11 @@ bool PdfPlug::convert(const QString& fn) globalParams->setErrQuiet(gTrue); // globalParams->setPrintCommands(gTrue); QList ocgGroups; +#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0) + auto pdfDoc = std::make_unique(std::make_unique(fname)); +#else auto pdfDoc = std::unique_ptr(new PDFDoc(fname, nullptr, nullptr, nullptr)); +#endif if (pdfDoc) { if (pdfDoc->getErrorCode() == errEncrypted) @@ -361,8 +369,13 @@ bool PdfPlug::convert(const QString& fn) #else auto fname = new GooString(QFile::encodeName(fn).data()); #endif +#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0) + std::optional userPW(std::in_place, text.toLocal8Bit().data()); + pdfDoc.reset(new PDFDoc(std::make_unique(fname), userPW, userPW, nullptr)); +#else auto userPW = new GooString(text.toLocal8Bit().data()); pdfDoc.reset(new PDFDoc(fname, userPW, userPW, nullptr)); +#endif qApp->changeOverrideCursor(QCursor(Qt::WaitCursor)); } if ((!pdfDoc) || (pdfDoc->getErrorCode() != errNone)) aadb02bd98bf00eda529'>elpa.scm
AgeCommit message (Expand)Author
2020-12-02import: utils: 'recursive-import' accepts an optional version parameter....This adds a key VERSION to 'recursive-import' and moves the parameter REPO to a key. This also changes all the places that rely on 'recursive-import'. * guix/import/utils.scm (recursive-import): Add the VERSION key. Make REPO a key. (package->definition): Add optional 'append-version?'. * guix/scripts/import/crate.scm (guix-import-crate): Add the VERSION key. * guix/import/crate.scm (crate->guix-package): Add the VERSION key. (crate-recursive-import): Pass VERSION to recursive-import, remove now unnecessary code. * guix/import/cran.scm (cran->guix-package, cran-recursive-import): Change the REPO parameter to a key. * guix/import/elpa.scm (elpa->guix-package, elpa-recursive-import): Likewise. * guix/import/gem.scm (gem->guix-package, recursive-import): Likewise. * guix/import/opam.scm (opam-recurive-import): Likewise. * guix/import/pypi.scm (pypi-recursive-import): Likewise. * guix/import/stackage.scm (stackage-recursive-import): Likewise. * guix/scripts/import/cran.scm (guix-import-cran): Likewise. * guix/scripts/import/elpa.scm (guix-import-elpa): Likewise. * tests/elpa.scm (eval-test-with-elpa): Likewise. * tests/import-utils.scm (recursive-import): Likewise. Co-authored-by: Hartmut Goebel <h.goebel@crazy-compilers.com> Martin Becze
2020-01-16import: elpa: Rewrite test to use an HTTP server instead of mocking....* guix/import/elpa.scm (elpa-url): Add 'gnu/http'. (elpa->guix-package): Handle it. * tests/elpa.scm (elpa-package-info-mock, auctex-readme-mock) (elpa-version->string, package-source-url, ensure-list) (package-home-page, make-elpa-package): Remove. <top level>: Call '%http-server-port'. (eval-test-with-elpa): Remove uses of 'mock'. Use 'with-http-server' and parameterize 'current-http-proxy' instead. Ludovic Courtès