diff --git a/meta-oe/recipes-support/poppler/poppler/CVE-2025-52886-0001.patch b/meta-oe/recipes-support/poppler/poppler/CVE-2025-52886-0001.patch index 4f0dc61a8b..4de3f8bcdc 100644 --- a/meta-oe/recipes-support/poppler/poppler/CVE-2025-52886-0001.patch +++ b/meta-oe/recipes-support/poppler/poppler/CVE-2025-52886-0001.patch @@ -1595,7 +1595,7 @@ index 1f8d756..8970f49 100644 DocumentData *parentDoc; diff --git a/qt5/src/poppler-annotation.cc b/qt5/src/poppler-annotation.cc -index e15523c..f148671 100644 +index e15523c..4964563 100644 --- a/qt5/src/poppler-annotation.cc +++ b/qt5/src/poppler-annotation.cc @@ -65,6 +65,12 @@ @@ -1636,7 +1636,7 @@ index e15523c..f148671 100644 +AnnotationPrivate::~AnnotationPrivate() = default; -void AnnotationPrivate::tieToNativeAnnot(Annot *ann, ::Page *page, Poppler::DocumentData *doc) -+void AnnotationPrivate::tieToNativeAnnot(std::shared_ptr *ann, ::Page *page, Poppler::DocumentData *doc) ++void AnnotationPrivate::tieToNativeAnnot(std::shared_ptr ann, ::Page *page, Poppler::DocumentData *doc) { if (pdfAnnot) { error(errIO, -1, "Annotation is already tied"); @@ -1661,11 +1661,10 @@ index e15523c..f148671 100644 // Since pdfAnnot has been set, this calls will write in the Annot object q->setAuthor(author); -@@ -250,13 +245,7 @@ void AnnotationPrivate::flushBaseAnnotationProperties() - q->setStyle(style); +@@ -251,12 +246,7 @@ void AnnotationPrivate::flushBaseAnnotationProperties() q->setPopup(popup); -- // Flush revisions + // Flush revisions - foreach (Annotation *r, revisions) { - // TODO: Flush revision - delete r; // Object is no longer needed @@ -1676,12 +1675,13 @@ index e15523c..f148671 100644 // Clear some members to save memory author.clear(); -@@ -455,14 +444,14 @@ QList AnnotationPrivate::findAnnotations(::Page *pdfPage, Document +@@ -455,14 +445,15 @@ QList AnnotationPrivate::findAnnotations(::Page *pdfPage, Document // Create Annotation objects and tie to their native Annot QList res; - for (Annot *ann : annots->getAnnots()) { + for (const std::shared_ptr &ann : annots->getAnnots()) { ++ if (!ann) { error(errInternal, -1, "Annot is null"); continue; @@ -1693,7 +1693,7 @@ index e15523c..f148671 100644 if (!markupann) { // Assume it's a root annotation, and skip if user didn't request it if (parentID != -1) { -@@ -536,7 +525,7 @@ QList AnnotationPrivate::findAnnotations(::Page *pdfPage, Document +@@ -536,7 +527,7 @@ QList AnnotationPrivate::findAnnotations(::Page *pdfPage, Document continue; } // parse Link params @@ -1702,7 +1702,7 @@ index e15523c..f148671 100644 LinkAnnotation *l = new LinkAnnotation(); annotation = l; -@@ -566,7 +555,7 @@ QList AnnotationPrivate::findAnnotations(::Page *pdfPage, Document +@@ -566,7 +557,7 @@ QList AnnotationPrivate::findAnnotations(::Page *pdfPage, Document if (!wantFileAttachmentAnnotations) { continue; } @@ -1711,7 +1711,7 @@ index e15523c..f148671 100644 FileAttachmentAnnotation *f = new FileAttachmentAnnotation(); annotation = f; // -> fileIcon -@@ -581,7 +570,7 @@ QList AnnotationPrivate::findAnnotations(::Page *pdfPage, Document +@@ -581,7 +572,7 @@ QList AnnotationPrivate::findAnnotations(::Page *pdfPage, Document if (!wantSoundAnnotations) { continue; } @@ -1720,7 +1720,7 @@ index e15523c..f148671 100644 SoundAnnotation *s = new SoundAnnotation(); annotation = s; -@@ -596,7 +585,7 @@ QList AnnotationPrivate::findAnnotations(::Page *pdfPage, Document +@@ -596,7 +587,7 @@ QList AnnotationPrivate::findAnnotations(::Page *pdfPage, Document if (!wantMovieAnnotations) { continue; } @@ -1729,7 +1729,7 @@ index e15523c..f148671 100644 MovieAnnotation *m = new MovieAnnotation(); annotation = m; -@@ -614,7 +603,7 @@ QList AnnotationPrivate::findAnnotations(::Page *pdfPage, Document +@@ -614,7 +605,7 @@ QList AnnotationPrivate::findAnnotations(::Page *pdfPage, Document if (!wantScreenAnnotations) { continue; } @@ -1738,7 +1738,7 @@ index e15523c..f148671 100644 // TODO Support other link types than Link::Rendition in ScreenAnnotation if (!screenann->getAction() || screenann->getAction()->getKind() != actionRendition) { continue; -@@ -644,7 +633,7 @@ QList AnnotationPrivate::findAnnotations(::Page *pdfPage, Document +@@ -644,7 +635,7 @@ QList AnnotationPrivate::findAnnotations(::Page *pdfPage, Document annotation = new WidgetAnnotation(); break; case Annot::typeRichMedia: { @@ -1747,7 +1747,7 @@ index e15523c..f148671 100644 RichMediaAnnotation *richMediaAnnotation = new RichMediaAnnotation; -@@ -852,9 +841,9 @@ Link *AnnotationPrivate::additionalAction(Annotation::AdditionalActionType type) +@@ -852,9 +843,9 @@ Link *AnnotationPrivate::additionalAction(Annotation::AdditionalActionType type) std::unique_ptr<::LinkAction> linkAction = nullptr; if (pdfAnnot->getType() == Annot::typeScreen) { @@ -1759,7 +1759,7 @@ index e15523c..f148671 100644 } Link *link = nullptr; -@@ -875,7 +864,7 @@ void AnnotationPrivate::addAnnotationToPage(::Page *pdfPage, DocumentData *doc, +@@ -875,7 +866,7 @@ void AnnotationPrivate::addAnnotationToPage(::Page *pdfPage, DocumentData *doc, // Unimplemented annotations can't be created by the user because their ctor // is private. Therefore, createNativeAnnot will never return 0 @@ -1768,18 +1768,18 @@ index e15523c..f148671 100644 Q_ASSERT(nativeAnnot); if (ann->d_ptr->annotationAppearance.isStream()) { -@@ -908,8 +897,8 @@ class TextAnnotationPrivate : public AnnotationPrivate +@@ -908,8 +899,8 @@ class TextAnnotationPrivate : public AnnotationPrivate { public: TextAnnotationPrivate(); - Annotation *makeAlias() override; - Annot *createNativeAnnot(::Page *destPage, DocumentData *doc) override; + std::unique_ptr makeAlias() override; -+ std::unique_ptr createNativeAnnot(::Page *destPage, DocumentData *doc) override; ++ std::shared_ptr createNativeAnnot(::Page *destPage, DocumentData *doc) override; void setDefaultAppearanceToNative(); std::unique_ptr getDefaultAppearanceFromNative() const; -@@ -1419,7 +1408,7 @@ QString Annotation::author() const +@@ -1419,7 +1410,7 @@ QString Annotation::author() const return d->author; } @@ -1788,7 +1788,7 @@ index e15523c..f148671 100644 return markupann ? UnicodeParsedString(markupann->getLabel()) : QString(); } -@@ -1432,7 +1421,7 @@ void Annotation::setAuthor(const QString &author) +@@ -1432,7 +1423,7 @@ void Annotation::setAuthor(const QString &author) return; } @@ -1797,7 +1797,7 @@ index e15523c..f148671 100644 if (markupann) { markupann->setLabel(std::unique_ptr(QStringToUnicodeGooString(author))); } -@@ -1535,7 +1524,7 @@ QDateTime Annotation::creationDate() const +@@ -1535,7 +1526,7 @@ QDateTime Annotation::creationDate() const return d->creationDate; } @@ -1806,7 +1806,7 @@ index e15523c..f148671 100644 if (markupann && markupann->getDate()) { return convertDate(markupann->getDate()->c_str()); -@@ -1553,7 +1542,7 @@ void Annotation::setCreationDate(const QDateTime &date) +@@ -1553,7 +1544,7 @@ void Annotation::setCreationDate(const QDateTime &date) return; } @@ -1815,7 +1815,7 @@ index e15523c..f148671 100644 if (markupann) { if (date.isValid()) { const time_t t = date.toSecsSinceEpoch(); -@@ -1686,7 +1675,7 @@ Annotation::Style Annotation::style() const +@@ -1686,7 +1677,7 @@ Annotation::Style Annotation::style() const Style s; s.setColor(convertAnnotColor(d->pdfAnnot->getColor())); @@ -1824,7 +1824,7 @@ index e15523c..f148671 100644 if (markupann) { s.setOpacity(markupann->getOpacity()); } -@@ -1713,11 +1702,11 @@ Annotation::Style Annotation::style() const +@@ -1713,11 +1704,11 @@ Annotation::Style Annotation::style() const AnnotBorderEffect *border_effect; switch (d->pdfAnnot->getType()) { case Annot::typeFreeText: @@ -1838,7 +1838,7 @@ index e15523c..f148671 100644 break; default: border_effect = nullptr; -@@ -1741,7 +1730,7 @@ void Annotation::setStyle(const Annotation::Style &style) +@@ -1741,7 +1732,7 @@ void Annotation::setStyle(const Annotation::Style &style) d->pdfAnnot->setColor(convertQColor(style.color())); @@ -1847,7 +1847,7 @@ index e15523c..f148671 100644 if (markupann) { markupann->setOpacity(style.opacity()); } -@@ -1765,9 +1754,9 @@ Annotation::Popup Annotation::popup() const +@@ -1765,9 +1756,9 @@ Annotation::Popup Annotation::popup() const AnnotPopup *popup = nullptr; int flags = -1; // Not initialized @@ -1859,7 +1859,7 @@ index e15523c..f148671 100644 w.setSummary(UnicodeParsedString(markupann->getSubject())); } -@@ -1783,7 +1772,7 @@ Annotation::Popup Annotation::popup() const +@@ -1783,7 +1774,7 @@ Annotation::Popup Annotation::popup() const } if (d->pdfAnnot->getType() == Annot::typeText) { @@ -1868,7 +1868,7 @@ index e15523c..f148671 100644 // Text annotations default to same rect as annotation if (flags == -1) { -@@ -1839,7 +1828,7 @@ Annotation::RevScope Annotation::revisionScope() const +@@ -1839,7 +1830,7 @@ Annotation::RevScope Annotation::revisionScope() const return d->revisionScope; } @@ -1877,7 +1877,7 @@ index e15523c..f148671 100644 if (markupann && markupann->isInReplyTo()) { switch (markupann->getReplyTo()) { -@@ -1861,7 +1850,7 @@ Annotation::RevType Annotation::revisionType() const +@@ -1861,7 +1852,7 @@ Annotation::RevType Annotation::revisionType() const return d->revisionType; } @@ -1886,7 +1886,7 @@ index e15523c..f148671 100644 if (textann && textann->isInReplyTo()) { switch (textann->getState()) { -@@ -1892,8 +1881,9 @@ QList Annotation::revisions() const +@@ -1892,8 +1883,9 @@ QList Annotation::revisions() const if (!d->pdfAnnot) { /* Return aliases, whose ownership goes to the caller */ QList res; @@ -1898,7 +1898,7 @@ index e15523c..f148671 100644 return res; } -@@ -1910,7 +1900,7 @@ std::unique_ptr Annotation::annotationAppearance() const +@@ -1910,7 +1902,7 @@ std::unique_ptr Annotation::annotationAppearance() const { Q_D(const Annotation); @@ -1907,7 +1907,7 @@ index e15523c..f148671 100644 } void Annotation::setAnnotationAppearance(const AnnotationAppearance &annotationAppearance) -@@ -1934,15 +1924,15 @@ void Annotation::setAnnotationAppearance(const AnnotationAppearance &annotationA +@@ -1934,15 +1926,15 @@ void Annotation::setAnnotationAppearance(const AnnotationAppearance &annotationA TextAnnotationPrivate::TextAnnotationPrivate() : AnnotationPrivate(), textType(TextAnnotation::Linked), textIcon(QStringLiteral("Note")), inplaceAlign(0), inplaceIntent(TextAnnotation::Unknown) { } @@ -1915,20 +1915,19 @@ index e15523c..f148671 100644 +std::unique_ptr TextAnnotationPrivate::makeAlias() { - return new TextAnnotation(*this); -+ return std::unique_ptr(new TextAnnotation(*this); ++ return std::unique_ptr(new TextAnnotation(*this)); } -Annot *TextAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) -+std::shared_ptr *TextAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) ++std::shared_ptr TextAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) { -- // Setters are defined in the public class + // Setters are defined in the public class - TextAnnotation *q = static_cast(makeAlias()); -+ // Setters are defined in the public clas -+ std::unique_ptr q = static_pointer_cast(makeAlias()); ++ std::unique_ptr q = static_pointer_cast(makeAlias()); // Set page and contents pdfPage = destPage; -@@ -1951,13 +1941,13 @@ Annot *TextAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData * +@@ -1951,13 +1943,13 @@ Annot *TextAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData * // Set pdfAnnot PDFRectangle rect = boundaryToPdfRectangle(boundary, flags); if (textType == TextAnnotation::Linked) { @@ -1944,7 +1943,7 @@ index e15523c..f148671 100644 } // Set properties -@@ -1967,8 +1957,6 @@ Annot *TextAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData * +@@ -1967,8 +1959,6 @@ Annot *TextAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData * q->setCalloutPoints(inplaceCallout); q->setInplaceIntent(inplaceIntent); @@ -1953,7 +1952,7 @@ index e15523c..f148671 100644 inplaceCallout.clear(); // Free up memory setDefaultAppearanceToNative(); -@@ -1979,7 +1967,7 @@ Annot *TextAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData * +@@ -1979,7 +1969,7 @@ Annot *TextAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData * void TextAnnotationPrivate::setDefaultAppearanceToNative() { if (pdfAnnot && pdfAnnot->getType() == Annot::typeFreeText) { @@ -1962,7 +1961,7 @@ index e15523c..f148671 100644 const double pointSize = textFont ? textFont->pointSizeF() : AnnotFreeText::undefinedFontPtSize; if (pointSize < 0) { qWarning() << "TextAnnotationPrivate::createNativeAnnot: font pointSize < 0"; -@@ -2008,7 +1996,7 @@ void TextAnnotationPrivate::setDefaultAppearanceToNative() +@@ -2008,7 +1998,7 @@ void TextAnnotationPrivate::setDefaultAppearanceToNative() std::unique_ptr TextAnnotationPrivate::getDefaultAppearanceFromNative() const { if (pdfAnnot && pdfAnnot->getType() == Annot::typeFreeText) { @@ -1971,7 +1970,7 @@ index e15523c..f148671 100644 return ftextann->getDefaultAppearance(); } else { return {}; -@@ -2165,7 +2153,7 @@ QString TextAnnotation::textIcon() const +@@ -2165,7 +2155,7 @@ QString TextAnnotation::textIcon() const } if (d->pdfAnnot->getType() == Annot::typeText) { @@ -1980,7 +1979,7 @@ index e15523c..f148671 100644 return QString::fromLatin1(textann->getIcon()->c_str()); } -@@ -2182,7 +2170,7 @@ void TextAnnotation::setTextIcon(const QString &icon) +@@ -2182,7 +2172,7 @@ void TextAnnotation::setTextIcon(const QString &icon) } if (d->pdfAnnot->getType() == Annot::typeText) { @@ -1989,7 +1988,7 @@ index e15523c..f148671 100644 QByteArray encoded = icon.toLatin1(); GooString s(encoded.constData()); textann->setIcon(&s); -@@ -2256,7 +2244,7 @@ int TextAnnotation::inplaceAlign() const +@@ -2256,7 +2246,7 @@ int TextAnnotation::inplaceAlign() const } if (d->pdfAnnot->getType() == Annot::typeFreeText) { @@ -1998,7 +1997,7 @@ index e15523c..f148671 100644 return static_cast(ftextann->getQuadding()); } -@@ -2273,7 +2261,7 @@ void TextAnnotation::setInplaceAlign(int align) +@@ -2273,7 +2263,7 @@ void TextAnnotation::setInplaceAlign(int align) } if (d->pdfAnnot->getType() == Annot::typeFreeText) { @@ -2007,7 +2006,7 @@ index e15523c..f148671 100644 ftextann->setQuadding((VariableTextQuadding)align); } } -@@ -2300,7 +2288,7 @@ QVector TextAnnotation::calloutPoints() const +@@ -2300,7 +2290,7 @@ QVector TextAnnotation::calloutPoints() const return QVector(); } @@ -2016,7 +2015,7 @@ index e15523c..f148671 100644 const AnnotCalloutLine *callout = ftextann->getCalloutLine(); if (!callout) { -@@ -2332,7 +2320,7 @@ void TextAnnotation::setCalloutPoints(const QVector &points) +@@ -2332,7 +2322,7 @@ void TextAnnotation::setCalloutPoints(const QVector &points) return; } @@ -2025,7 +2024,7 @@ index e15523c..f148671 100644 const int count = points.size(); if (count == 0) { -@@ -2345,7 +2333,7 @@ void TextAnnotation::setCalloutPoints(const QVector &points) +@@ -2345,7 +2335,7 @@ void TextAnnotation::setCalloutPoints(const QVector &points) return; } @@ -2034,7 +2033,7 @@ index e15523c..f148671 100644 double x1, y1, x2, y2; double MTX[6]; d->fillTransformationMTX(MTX); -@@ -2355,12 +2343,12 @@ void TextAnnotation::setCalloutPoints(const QVector &points) +@@ -2355,13 +2345,12 @@ void TextAnnotation::setCalloutPoints(const QVector &points) if (count == 3) { double x3, y3; XPDFReader::invTransform(MTX, points[2], x3, y3); @@ -2046,11 +2045,12 @@ index e15523c..f148671 100644 } - ftextann->setCalloutLine(callout); +- delete callout; + ftextann->setCalloutLine(std::move(callout)); - delete callout; } -@@ -2373,7 +2361,7 @@ TextAnnotation::InplaceIntent TextAnnotation::inplaceIntent() const + TextAnnotation::InplaceIntent TextAnnotation::inplaceIntent() const +@@ -2373,7 +2362,7 @@ TextAnnotation::InplaceIntent TextAnnotation::inplaceIntent() const } if (d->pdfAnnot->getType() == Annot::typeFreeText) { @@ -2059,7 +2059,7 @@ index e15523c..f148671 100644 return (TextAnnotation::InplaceIntent)ftextann->getIntent(); } -@@ -2390,7 +2378,7 @@ void TextAnnotation::setInplaceIntent(TextAnnotation::InplaceIntent intent) +@@ -2390,7 +2379,7 @@ void TextAnnotation::setInplaceIntent(TextAnnotation::InplaceIntent intent) } if (d->pdfAnnot->getType() == Annot::typeFreeText) { @@ -2068,7 +2068,7 @@ index e15523c..f148671 100644 ftextann->setIntent((AnnotFreeText::AnnotFreeTextIntent)intent); } } -@@ -2400,8 +2388,8 @@ class LineAnnotationPrivate : public AnnotationPrivate +@@ -2400,8 +2389,8 @@ class LineAnnotationPrivate : public AnnotationPrivate { public: LineAnnotationPrivate(); @@ -2079,7 +2079,7 @@ index e15523c..f148671 100644 // data fields (note uses border for rendering style) QLinkedList linePoints; -@@ -2421,15 +2409,15 @@ LineAnnotationPrivate::LineAnnotationPrivate() +@@ -2421,15 +2410,15 @@ LineAnnotationPrivate::LineAnnotationPrivate() { } @@ -2095,11 +2095,11 @@ index e15523c..f148671 100644 { // Setters are defined in the public class - LineAnnotation *q = static_cast(makeAlias()); -+ std::unique_ptr q = static_pointer_cast(makeAlias()); ++ std::unique_ptr q = static_pointer_cast(makeAlias()); // Set page and document pdfPage = destPage; -@@ -2438,9 +2426,9 @@ Annot *LineAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData * +@@ -2438,9 +2427,9 @@ Annot *LineAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData * // Set pdfAnnot PDFRectangle rect = boundaryToPdfRectangle(boundary, flags); if (lineType == LineAnnotation::StraightLine) { @@ -2111,7 +2111,7 @@ index e15523c..f148671 100644 } // Set properties -@@ -2454,8 +2442,6 @@ Annot *LineAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData * +@@ -2454,8 +2443,6 @@ Annot *LineAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData * q->setLineShowCaption(lineShowCaption); q->setLineIntent(lineIntent); @@ -2120,7 +2120,7 @@ index e15523c..f148671 100644 linePoints.clear(); // Free up memory return pdfAnnot; -@@ -2621,14 +2607,14 @@ QLinkedList LineAnnotation::linePoints() const +@@ -2621,14 +2608,14 @@ QLinkedList LineAnnotation::linePoints() const QLinkedList res; if (d->pdfAnnot->getType() == Annot::typeLine) { @@ -2137,14 +2137,7 @@ index e15523c..f148671 100644 const AnnotPath *vertices = polyann->getVertices(); for (int i = 0; i < vertices->getCoordsLength(); ++i) { -@@ -2645,13 +2631,14 @@ void LineAnnotation::setLinePoints(const QLinkedList &points) - { - Q_D(LineAnnotation); - -+ if (!d->pdfAnnot) { - if (!d->pdfAnnot) { - d->linePoints = points; - return; +@@ -2651,7 +2638,7 @@ void LineAnnotation::setLinePoints(const QLinkedList &points) } if (d->pdfAnnot->getType() == Annot::typeLine) { @@ -2336,7 +2329,7 @@ index e15523c..f148671 100644 - Annotation *makeAlias() override; - Annot *createNativeAnnot(::Page *destPage, DocumentData *doc) override; + std::unique_ptr makeAlias() override; -+ std::unique_ptr createNativeAnnot(::Page *destPage, DocumentData *doc) override; ++ std::shared_ptr createNativeAnnot(::Page *destPage, DocumentData *doc) override; // data fields (note uses border for rendering style) GeomAnnotation::GeomType geomType; @@ -2356,7 +2349,7 @@ index e15523c..f148671 100644 { // Setters are defined in the public class - GeomAnnotation *q = static_cast(makeAlias()); -+ std::unique_ptr q = static_pointer_cast(makeAlias()); ++ std::unique_ptr q = static_pointer_cast(makeAlias()); // Set page and document pdfPage = destPage; @@ -2409,7 +2402,7 @@ index e15523c..f148671 100644 - Annotation *makeAlias() override; - Annot *createNativeAnnot(::Page *destPage, DocumentData *doc) override; + std::unique_ptr makeAlias() override; -+ std::shared_ptr *createNativeAnnot(::Page *destPage, DocumentData *doc) override; ++ std::shared_ptr createNativeAnnot(::Page *destPage, DocumentData *doc) override; // data fields HighlightAnnotation::HighlightType highlightType; @@ -2434,7 +2427,7 @@ index e15523c..f148671 100644 { // Setters are defined in the public class - HighlightAnnotation *q = static_cast(makeAlias()); -+ std::unique_ptr q = static_pointer_cast(makeAlias()); ++ std::unique_ptr q = static_pointer_cast(makeAlias()); // Set page and document pdfPage = destPage; @@ -2512,7 +2505,7 @@ index e15523c..f148671 100644 +std::shared_ptr StampAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) { - StampAnnotation *q = static_cast(makeAlias()); -+ std::unique_ptr q = static_pointer_cast(makeAlias()); ++ std::unique_ptr q = static_pointer_cast(makeAlias()); // Set page and document pdfPage = destPage; @@ -2595,7 +2588,7 @@ index e15523c..f148671 100644 - Annotation *makeAlias() override; - Annot *createNativeAnnot(::Page *destPage, DocumentData *doc) override; + std::unique_ptr makeAlias() override; -+ std::shared_ptr *createNativeAnnot(::Page *destPage, DocumentData *doc) override; ++ std::shared_ptr createNativeAnnot(::Page *destPage, DocumentData *doc) override; // data fields QList> inkPaths; @@ -2604,7 +2597,7 @@ index e15523c..f148671 100644 InkAnnotationPrivate::InkAnnotationPrivate() : AnnotationPrivate() { } -Annotation *InkAnnotationPrivate::makeAlias() -+std::unique_ptr *InkAnnotationPrivate::makeAlias() ++std::unique_ptr InkAnnotationPrivate::makeAlias() { - return new InkAnnotation(*this); + return std::unique_ptr(new InkAnnotation(*this)); @@ -2616,11 +2609,11 @@ index e15523c..f148671 100644 } -Annot *InkAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) -+std::shared_ptr *InkAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) ++std::shared_ptr InkAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) { // Setters are defined in the public class - InkAnnotation *q = static_cast(makeAlias()); -+ std::shared_ptr q = static_pointer_cast(makeAlias()); ++ std::unique_ptr q = static_pointer_cast(makeAlias()); // Set page and document pdfPage = destPage; @@ -2714,7 +2707,7 @@ index e15523c..f148671 100644 { // Setters are defined in the public class - CaretAnnotation *q = static_cast(makeAlias()); -+ std::unique_ptr q = static_pointer_cast(makeAlias()); ++ std::unique_ptr q = static_pointer_cast(makeAlias()); // Set page and document pdfPage = destPage; @@ -2774,7 +2767,7 @@ index e15523c..f148671 100644 } -Annot *FileAttachmentAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) -+std::shared_ptr *FileAttachmentAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) ++std::shared_ptr FileAttachmentAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) { return nullptr; // Not implemented } @@ -2893,6 +2886,7 @@ index e15523c..f148671 100644 { Q_UNUSED(destPage); Q_UNUSED(doc); + diff --git a/qt5/src/poppler-form.cc b/qt5/src/poppler-form.cc index dfdcd39..760a891 100644 --- a/qt5/src/poppler-form.cc