[poppler] qt5/src qt6/src

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 22 14:19:04 UTC 2022


 qt5/src/poppler-annotation.cc |    4 ++--
 qt6/src/poppler-annotation.cc |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit ad96231cca9390713183cf899d5a62b81d1767eb
Author: Albert Astals Cid <aacid at kde.org>
Date:   Tue Feb 22 15:07:11 2022 +0100

    qt: Remove unneeded unique_ptr constructor
    
    convertQColor already returns an unique_ptr

diff --git a/qt5/src/poppler-annotation.cc b/qt5/src/poppler-annotation.cc
index eb569c41..4e0caeae 100644
--- a/qt5/src/poppler-annotation.cc
+++ b/qt5/src/poppler-annotation.cc
@@ -1863,7 +1863,7 @@ Annot *TextAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *
     if (textType == TextAnnotation::Linked) {
         pdfAnnot = new AnnotText { destPage->getDoc(), &rect };
     } else {
-        DefaultAppearance da { { objName, "Invalid_font" }, static_cast<double>(textFont.pointSize()), std::unique_ptr<AnnotColor> { convertQColor(textColor) } };
+        DefaultAppearance da { { objName, "Invalid_font" }, static_cast<double>(textFont.pointSize()), convertQColor(textColor) };
         pdfAnnot = new AnnotFreeText { destPage->getDoc(), &rect, da };
     }
 
@@ -1885,7 +1885,7 @@ void TextAnnotationPrivate::setDefaultAppearanceToNative()
 {
     if (pdfAnnot && pdfAnnot->getType() == Annot::typeFreeText) {
         AnnotFreeText *ftextann = static_cast<AnnotFreeText *>(pdfAnnot);
-        DefaultAppearance da { { objName, "Invalid_font" }, static_cast<double>(textFont.pointSize()), std::unique_ptr<AnnotColor> { convertQColor(textColor) } };
+        DefaultAppearance da { { objName, "Invalid_font" }, static_cast<double>(textFont.pointSize()), convertQColor(textColor) };
         ftextann->setDefaultAppearance(da);
     }
 }
diff --git a/qt6/src/poppler-annotation.cc b/qt6/src/poppler-annotation.cc
index a77332ca..60a9b9be 100644
--- a/qt6/src/poppler-annotation.cc
+++ b/qt6/src/poppler-annotation.cc
@@ -1528,7 +1528,7 @@ Annot *TextAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *
     if (textType == TextAnnotation::Linked) {
         pdfAnnot = new AnnotText { destPage->getDoc(), &rect };
     } else {
-        DefaultAppearance da { { objName, "Invalid_font" }, static_cast<double>(textFont.pointSize()), std::unique_ptr<AnnotColor> { convertQColor(textColor) } };
+        DefaultAppearance da { { objName, "Invalid_font" }, static_cast<double>(textFont.pointSize()), convertQColor(textColor) };
         pdfAnnot = new AnnotFreeText { destPage->getDoc(), &rect, da };
     }
 
@@ -1550,7 +1550,7 @@ void TextAnnotationPrivate::setDefaultAppearanceToNative()
 {
     if (pdfAnnot && pdfAnnot->getType() == Annot::typeFreeText) {
         AnnotFreeText *ftextann = static_cast<AnnotFreeText *>(pdfAnnot);
-        DefaultAppearance da { { objName, "Invalid_font" }, static_cast<double>(textFont.pointSize()), std::unique_ptr<AnnotColor> { convertQColor(textColor) } };
+        DefaultAppearance da { { objName, "Invalid_font" }, static_cast<double>(textFont.pointSize()), convertQColor(textColor) };
         ftextann->setDefaultAppearance(da);
     }
 }


More information about the poppler mailing list