Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-poppler-qt5 for 
openSUSE:Factory checked in at 2021-02-25 18:27:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-poppler-qt5 (Old)
 and      /work/SRC/openSUSE:Factory/.python-poppler-qt5.new.2378 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-poppler-qt5"

Thu Feb 25 18:27:19 2021 rev:9 rq:874709 version:21.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-poppler-qt5/python-poppler-qt5.changes    
2021-02-23 20:23:24.059814635 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-poppler-qt5.new.2378/python-poppler-qt5.changes
  2021-02-25 18:27:22.678178166 +0100
@@ -1,0 +2,14 @@
+Tue Feb 23 17:10:54 UTC 2021 - Ben Greiner <c...@bnavigator.de>
+
+- Update to 21.1.0
+  * Most new Qt5 api methods added upto poppler-qt5 21.01 (WB)
+  * Deprecated C API calls updated (woodlandhunter)
+  * Add support for building with SIP v5 (#41, Dmitry Shachnev)
+- Drop patches merged upstream
+  * poppler-qt5-pr33-sip5.patch
+  * poppler-qt5-pr41-sip5.patch
+- Add python-poppler-qt5-mapqvector.patch
+  gh#frescobaldi/python-poppler-qt5#45
+- Reinstate the skip for python2
+
+-------------------------------------------------------------------

Old:
----
  poppler-qt5-pr33-sip5.patch
  poppler-qt5-pr41-sip5.patch
  python-poppler-qt5-0.75.0.tar.gz

New:
----
  python-poppler-qt5-21.1.0.tar.gz
  python-poppler-qt5-mapqvector.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-poppler-qt5.spec ++++++
--- /var/tmp/diff_new_pack.wGtyDB/_old  2021-02-25 18:27:23.230178524 +0100
+++ /var/tmp/diff_new_pack.wGtyDB/_new  2021-02-25 18:27:23.234178527 +0100
@@ -22,22 +22,18 @@
 %{?!use_sip4:%define use_sip4 1}
 %endif
 
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%define oldpython python
+%{?!python_module:%define python_module() python3-%{**}}
+%define skip_python2 1
 Name:           python-poppler-qt5
-Version:        0.75.0
+Version:        21.1.0
 Release:        0
 Summary:        Python binding to poppler-qt5
 License:        LGPL-2.1-or-later
 Group:          Development/Languages/Python
 URL:            https://pypi.org/project/python-poppler-qt5/
-# The newer version 21.1.0 fails to build
-# See: https://github.com/frescobaldi/python-poppler-qt5/issues/43
 Source0:        
https://files.pythonhosted.org/packages/source/p/python-poppler-qt5/%{name}-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM poppler-qt5-pr33-sip5.patch 
gh#frescobaldi/python-poppler-qt5#33 -- support SIP5
-Patch1:         
https://github.com/frescobaldi/python-poppler-qt5/pull/33.patch#/poppler-qt5-pr33-sip5.patch
-# PATCH-FIX-UPSTREAM poppler-qt5-pr41-sip5.patch 
gh#frescobaldi/python-poppler-qt5#41 -- use SIP5
-Patch2:         
https://github.com/frescobaldi/python-poppler-qt5/pull/41.patch#/poppler-qt5-pr41-sip5.patch
+# PATCH-FIX-UPSTREAM python-poppler-qt5-mapqvector.patch -- 
gh#frescobaldi/python-poppler-qt5#45
+Patch0:         
https://github.com/frescobaldi/python-poppler-qt5/pull/45.patch#/python-poppler-qt5-mapqvector.patch
 BuildRequires:  %{python_module qt5-devel}
 %if 0%{?use_sip4}
 BuildRequires:  %{python_module sip4-devel}

++++++ python-poppler-qt5-0.75.0.tar.gz -> python-poppler-qt5-21.1.0.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-poppler-qt5-0.75.0/ChangeLog 
new/python-poppler-qt5-21.1.0/ChangeLog
--- old/python-poppler-qt5-0.75.0/ChangeLog     2019-11-22 06:51:33.000000000 
+0100
+++ new/python-poppler-qt5-21.1.0/ChangeLog     2021-01-07 16:30:04.000000000 
+0100
@@ -1,3 +1,10 @@
+Version 21.1.0 -- January 7th, 2021
+
+* Most new Qt5 api methods added upto poppler-qt5 21.01 (WB)
+* Deprecated C API calls updated (woodlandhunter)
+* Add support for building with SIP v5 (#41, Dmitry Shachnev)
+
+
 Version 0.75.0 -- November 22nd, 2019
 
 * add LinkOCGState
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-poppler-qt5-0.75.0/INSTALL 
new/python-poppler-qt5-21.1.0/INSTALL
--- old/python-poppler-qt5-0.75.0/INSTALL       2015-02-21 16:16:21.000000000 
+0100
+++ new/python-poppler-qt5-21.1.0/INSTALL       2021-01-07 13:08:51.000000000 
+0100
@@ -7,12 +7,17 @@
 The setup script uses distutils. Use the following commands to build and 
install
 the module:
 
-python setup.py build
-python setup.py install
+    python setup.py build
+    python setup.py install
 
 To install in /usr instead of /usr/local:
 
-python setup.py install --prefix /usr
+    python setup.py install --prefix /usr
+
+
+You can also use the newer way of installing using pip:
+
+    python -m pip install .
 
 
 Troubleshooting:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-poppler-qt5-0.75.0/MANIFEST.in 
new/python-poppler-qt5-21.1.0/MANIFEST.in
--- old/python-poppler-qt5-0.75.0/MANIFEST.in   2015-02-21 16:16:21.000000000 
+0100
+++ new/python-poppler-qt5-21.1.0/MANIFEST.in   2021-01-07 16:21:02.000000000 
+0100
@@ -2,4 +2,6 @@
 include MANIFEST.in setup.cfg
 include *.py
 include *.sip
+include demo/*.py
+include version.sip.in
 exclude version.sip
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-poppler-qt5-0.75.0/PKG-INFO 
new/python-poppler-qt5-21.1.0/PKG-INFO
--- old/python-poppler-qt5-0.75.0/PKG-INFO      2019-11-22 06:55:07.000000000 
+0100
+++ new/python-poppler-qt5-21.1.0/PKG-INFO      2021-01-07 17:21:20.960942700 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: python-poppler-qt5
-Version: 0.75.0
+Version: 21.1.0
 Summary: A Python binding to Poppler-Qt5
 Home-page: https://github.com/frescobaldi/python-poppler-qt5
 Maintainer: Wilbert Berendsen
@@ -13,7 +13,9 @@
         A Python binding for libpoppler-qt5 that aims for completeness and for 
being
         actively maintained.
         
-        Created and currently maintained by Wilbert Berendsen 
<wbs...@xs4all.nl>.
+        Created and maintained by Wilbert Berendsen <wbs...@xs4all.nl>, with 
help of
+        other contributors, especially where it concerns supporting many 
platforms and
+        build systems. Thanks for everyone's help!
         
         Homepage: https://pypi.python.org/pypi/python-poppler-qt5/
         
@@ -28,7 +30,7 @@
         -------------
         
         The Python API closely follows the Poppler Qt5 C++ interface library 
API,
-        documented at http://people.freedesktop.org/~aacid/docs/qt5/ .
+        documented at https://poppler.freedesktop.org/api/qt5/ .
         
         Note: Releases of PyQt5 < 5.4 currently do not support the QtXml 
module,
         all methods that use the QDomDocument, QDomElement and QDomNode types 
are
@@ -37,9 +39,8 @@
         PyQt5 >= 5.4 is recommended.
         
         Wherever the C++ API requires ``QList``, ``QSet`` or ``QLinkedList``, 
any
-        Python sequence can be used. 
-        API calls that return ``QList``, ``QSet`` or ``QLinkedList`` all 
return Python
-        lists.
+        Python sequence can be used. API calls that return ``QList``, ``QSet`` 
or
+        ``QLinkedList`` all return Python lists.
         
         There are a few other differences:
         
@@ -47,8 +48,8 @@
         called as ``d.getPdfVersion()``, (where ``d`` is a 
``Poppler::Document``
         instance); it will return a tuple of two integers (major, minor).
         
-        ``Poppler::Document`` has ``__len__`` and ``__getitem__`` methods, 
corresponding
-        to ``numPages()`` and ``page(int num)``.
+        ``Poppler::Document`` has ``__len__`` and ``__getitem__`` methods,
+        corresponding to ``numPages()`` and ``page(int num)``.
         
         ``Poppler::FontIterator`` (returned by 
``Poppler::Document::newFontIterator``)
         is also a Python iterable (e.g. has ``__iter__()`` and ``__next__()`` 
methods).
@@ -67,17 +68,17 @@
         In addition to the Poppler namespace, there are two toplevel module
         functions:
         
-            ``popplerqt5.version()``
-                returns the version of the ``python-poppler-qt5`` package as a
-                tuple of ints, e.g. ``(0, 18, 2)``.
-            
-            ``popplerqt5.poppler_version()``
-                returns the version of the linked Poppler-Qt5 library as a
-                tuple of ints, e.g. ``(0, 24, 5)``.
-                
-                This is determined at build time. If at build time the 
Poppler-Qt5
-                version could not be determined and was not specified, an empty
-                tuple might be returned.
+        ``popplerqt5.version()``
+            returns the version of the ``python-poppler-qt5`` package as a 
tuple of
+            ints, e.g. ``(0, 18, 2)``.
+        
+        ``popplerqt5.poppler_version()``
+            returns the version of the linked Poppler-Qt5 library as a tuple 
of ints,
+            e.g. ``(0, 24, 5)``.
+        
+            This is determined at build time. If at build time the Poppler-Qt5 
version
+            could not be determined and was not specified, an empty tuple 
might be
+            returned.
         
         
 Platform: UNKNOWN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-poppler-qt5-0.75.0/README.rst 
new/python-poppler-qt5-21.1.0/README.rst
--- old/python-poppler-qt5-0.75.0/README.rst    2019-09-18 06:13:39.000000000 
+0200
+++ new/python-poppler-qt5-21.1.0/README.rst    2021-01-07 14:37:52.000000000 
+0100
@@ -5,7 +5,9 @@
 A Python binding for libpoppler-qt5 that aims for completeness and for being
 actively maintained.
 
-Created and currently maintained by Wilbert Berendsen <wbs...@xs4all.nl>.
+Created and maintained by Wilbert Berendsen <wbs...@xs4all.nl>, with help of
+other contributors, especially where it concerns supporting many platforms and
+build systems. Thanks for everyone's help!
 
 Homepage: https://pypi.python.org/pypi/python-poppler-qt5/
 
@@ -20,7 +22,7 @@
 -------------
 
 The Python API closely follows the Poppler Qt5 C++ interface library API,
-documented at http://people.freedesktop.org/~aacid/docs/qt5/ .
+documented at https://poppler.freedesktop.org/api/qt5/ .
 
 Note: Releases of PyQt5 < 5.4 currently do not support the QtXml module,
 all methods that use the QDomDocument, QDomElement and QDomNode types are
@@ -29,9 +31,8 @@
 PyQt5 >= 5.4 is recommended.
 
 Wherever the C++ API requires ``QList``, ``QSet`` or ``QLinkedList``, any
-Python sequence can be used. 
-API calls that return ``QList``, ``QSet`` or ``QLinkedList`` all return Python
-lists.
+Python sequence can be used. API calls that return ``QList``, ``QSet`` or
+``QLinkedList`` all return Python lists.
 
 There are a few other differences:
 
@@ -39,8 +40,8 @@
 called as ``d.getPdfVersion()``, (where ``d`` is a ``Poppler::Document``
 instance); it will return a tuple of two integers (major, minor).
 
-``Poppler::Document`` has ``__len__`` and ``__getitem__`` methods, 
corresponding
-to ``numPages()`` and ``page(int num)``.
+``Poppler::Document`` has ``__len__`` and ``__getitem__`` methods,
+corresponding to ``numPages()`` and ``page(int num)``.
 
 ``Poppler::FontIterator`` (returned by ``Poppler::Document::newFontIterator``)
 is also a Python iterable (e.g. has ``__iter__()`` and ``__next__()`` methods).
@@ -59,15 +60,15 @@
 In addition to the Poppler namespace, there are two toplevel module
 functions:
 
-    ``popplerqt5.version()``
-        returns the version of the ``python-poppler-qt5`` package as a
-        tuple of ints, e.g. ``(0, 18, 2)``.
-    
-    ``popplerqt5.poppler_version()``
-        returns the version of the linked Poppler-Qt5 library as a
-        tuple of ints, e.g. ``(0, 24, 5)``.
-        
-        This is determined at build time. If at build time the Poppler-Qt5
-        version could not be determined and was not specified, an empty
-        tuple might be returned.
+``popplerqt5.version()``
+    returns the version of the ``python-poppler-qt5`` package as a tuple of
+    ints, e.g. ``(0, 18, 2)``.
+
+``popplerqt5.poppler_version()``
+    returns the version of the linked Poppler-Qt5 library as a tuple of ints,
+    e.g. ``(0, 24, 5)``.
+
+    This is determined at build time. If at build time the Poppler-Qt5 version
+    could not be determined and was not specified, an empty tuple might be
+    returned.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-poppler-qt5-0.75.0/demo/demo.py 
new/python-poppler-qt5-21.1.0/demo/demo.py
--- old/python-poppler-qt5-0.75.0/demo/demo.py  1970-01-01 01:00:00.000000000 
+0100
+++ new/python-poppler-qt5-21.1.0/demo/demo.py  2019-01-21 10:43:01.000000000 
+0100
@@ -0,0 +1,49 @@
+import sys
+from PyQt5 import QtGui, QtWidgets
+import popplerqt5
+
+usage = """
+Demo to load a PDF and display the first page.
+
+Usage:
+
+    python demo.py file.pdf
+
+"""
+
+
+def pdf_view(filename):
+    """Return a Scrollarea showing the first page of the specified PDF file."""
+    
+    label = QtWidgets.QLabel()
+    
+    doc = popplerqt5.Poppler.Document.load(filename)
+    doc.setRenderHint(popplerqt5.Poppler.Document.Antialiasing)
+    doc.setRenderHint(popplerqt5.Poppler.Document.TextAntialiasing)
+    
+    page = doc.page(0)
+    image = page.renderToImage()
+    
+    label.setPixmap(QtGui.QPixmap.fromImage(image))
+    
+    area = QtWidgets.QScrollArea()
+    area.setWidget(label)
+    area.setWindowTitle(filename)
+    return area
+
+
+def main():
+    app = QtWidgets.QApplication(sys.argv)
+    argv = QtWidgets.QApplication.arguments()
+    if len(argv) < 2:
+        sys.stderr.write(usage)
+        sys.exit(2)
+    
+    filename = argv[-1]
+    view = pdf_view(filename)
+    view.show()
+    sys.exit(app.exec_())
+
+
+if __name__ == "__main__":
+    main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-poppler-qt5-0.75.0/demo/merge-annotations.py 
new/python-poppler-qt5-21.1.0/demo/merge-annotations.py
--- old/python-poppler-qt5-0.75.0/demo/merge-annotations.py     1970-01-01 
01:00:00.000000000 +0100
+++ new/python-poppler-qt5-21.1.0/demo/merge-annotations.py     2016-04-01 
07:20:30.000000000 +0200
@@ -0,0 +1,61 @@
+#!/usr/bin/env python2.7
+import popplerqt5
+import PyQt5.QtXml
+import argparse
+import tempfile
+import shutil
+
+def merge(target, src):
+    dom=PyQt5.QtXml.QDomDocument()
+    for pg_index in range(min(target.numPages(),src.numPages())):
+        p_tgt = target.page(pg_index)
+        p_src = src.page(pg_index)
+        for a in p_src.annotations():
+            if not has_annotation(p_tgt,a):
+                a_el = dom.createElement("annotation")
+                popplerqt5.Poppler.AnnotationUtils.storeAnnotation(a,a_el,dom)
+                a_tgt = 
popplerqt5.Poppler.AnnotationUtils.createAnnotation(a_el)
+                p_tgt.addAnnotation(a_tgt)
+
+def has_annotation(page,a):
+    for pa in page.annotations():
+        if pa.uniqueName() == a.uniqueName():
+            return True
+    return False
+            
+def save_pdf(pdf_doc,filename):
+    c = pdf_doc.pdfConverter()
+    c.setOutputFileName(filename)
+    c.setPDFOptions(c.WithChanges)
+    c.convert()
+    
+def load_pdf(filename):
+    return popplerqt5.Poppler.Document.load(filename)
+
+
+if __name__ == "__main__":
+    parser = argparse.ArgumentParser(description='A simple utility for merging 
pdf annotations')
+    parser.add_argument('file', help='the files to merge annotations from', 
nargs="+")
+    parser.add_argument('--output', help='the file to save annotations to (if 
not present, will save into the first file)')
+    args = parser.parse_args()
+    tgt = load_pdf(args.file[0])
+    for f in args.file[1:]:
+        src = load_pdf(f)
+        merge(tgt,src)
+    if args.output:
+        save_pdf(tgt,args.output)
+    else:
+        tmp_h,tmp_path = tempfile.mkstemp("pdf")
+        save_pdf(tgt,tmp_path)
+        del tgt
+        shutil.move(tmp_path,args.file[0])
+        
+        
+    
+    
+
+
+            
+        
+        
+    
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-poppler-qt5-0.75.0/demo.py 
new/python-poppler-qt5-21.1.0/demo.py
--- old/python-poppler-qt5-0.75.0/demo.py       2019-01-21 10:43:01.000000000 
+0100
+++ new/python-poppler-qt5-21.1.0/demo.py       1970-01-01 01:00:00.000000000 
+0100
@@ -1,49 +0,0 @@
-import sys
-from PyQt5 import QtGui, QtWidgets
-import popplerqt5
-
-usage = """
-Demo to load a PDF and display the first page.
-
-Usage:
-
-    python demo.py file.pdf
-
-"""
-
-
-def pdf_view(filename):
-    """Return a Scrollarea showing the first page of the specified PDF file."""
-    
-    label = QtWidgets.QLabel()
-    
-    doc = popplerqt5.Poppler.Document.load(filename)
-    doc.setRenderHint(popplerqt5.Poppler.Document.Antialiasing)
-    doc.setRenderHint(popplerqt5.Poppler.Document.TextAntialiasing)
-    
-    page = doc.page(0)
-    image = page.renderToImage()
-    
-    label.setPixmap(QtGui.QPixmap.fromImage(image))
-    
-    area = QtWidgets.QScrollArea()
-    area.setWidget(label)
-    area.setWindowTitle(filename)
-    return area
-
-
-def main():
-    app = QtWidgets.QApplication(sys.argv)
-    argv = QtWidgets.QApplication.arguments()
-    if len(argv) < 2:
-        sys.stderr.write(usage)
-        sys.exit(2)
-    
-    filename = argv[-1]
-    view = pdf_view(filename)
-    view.show()
-    sys.exit(app.exec_())
-
-
-if __name__ == "__main__":
-    main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-poppler-qt5-0.75.0/poppler-document.sip 
new/python-poppler-qt5-21.1.0/poppler-document.sip
--- old/python-poppler-qt5-0.75.0/poppler-document.sip  2019-09-18 
08:32:40.000000000 +0200
+++ new/python-poppler-qt5-21.1.0/poppler-document.sip  2021-01-07 
15:25:26.000000000 +0100
@@ -54,7 +54,7 @@
 %End
     };
     typedef QFlags<Poppler::Document::RenderHint> RenderHints;
-    
+
     void setColorDisplayProfile(void *outputProfileA);
     void setColorDisplayProfileName(const QString &name);
     void* colorRgbProfile() const;
@@ -62,6 +62,11 @@
     static Poppler::Document *load(const QString & filePath,
                             const QByteArray &ownerPassword=QByteArray(),
                             const QByteArray &userPassword=QByteArray()) 
/Factory, ReleaseGIL/;
+%If(POPPLER_V0_85_0 -)
+    static Poppler::Document *load (QIODevice *device,
+                            const QByteArray &ownerPassword=QByteArray(),
+                            const QByteArray &userPassword=QByteArray()) 
/Factory, ReleaseGIL/;
+%End
     static Poppler::Document *loadFromData(const QByteArray &fileContents,
                             const QByteArray &ownerPassword=QByteArray(),
                             const QByteArray &userPassword=QByteArray()) 
/Factory, ReleaseGIL/;
@@ -154,7 +159,7 @@
 private:
     Document();
     Document(const Poppler::Document &);
-        
+
 }; // class Document
 
 }; // namespace Poppler
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-poppler-qt5-0.75.0/poppler-form.sip 
new/python-poppler-qt5-21.1.0/poppler-form.sip
--- old/python-poppler-qt5-0.75.0/poppler-form.sip      2019-09-18 
20:56:59.000000000 +0200
+++ new/python-poppler-qt5-21.1.0/poppler-form.sip      2021-01-07 
15:33:39.000000000 +0100
@@ -25,8 +25,16 @@
     QString fullyQualifiedName() const;
 %End
     QString uiName() const;
+%If(POPPLER_V0_79_0 -)
+    bool isPrintable () const;
+    void setPrintable (bool value);
+%End
     bool isReadOnly() const;
     bool isVisible() const;
+%If(POPPLER_V0_64_0 -)
+    void setReadOnly (bool value);
+    void setVisible (bool value);
+%End
     Poppler::Link* activationAction() const;
 %If(POPPLER_V0_53_0 -)
        enum AdditionalActionType
@@ -41,7 +49,7 @@
 
 private:
     FormField(const Poppler::FormField&);
-    
+
 %ConvertToSubClassCode
     switch (sipCpp->type()) {
         case Poppler::FormField::FormButton:
@@ -78,13 +86,17 @@
     virtual FormType type() const;
     ButtonType buttonType() const;
     QString caption() const;
+%If(POPPLER_V0_79_0 -)
+    FormFieldIcon icon () const;
+    void setIcon (const FormFieldIcon &icon);
+%End
     bool state() const;
     void setState( bool state );
     QList<int> siblings() const;
 
 private:
     FormFieldButton(const Poppler::FormFieldButton&);
-    
+
 }; // class FormFieldButton
 
 
@@ -116,7 +128,7 @@
 
 private:
     FormFieldText(const Poppler::FormFieldText&);
-    
+
 }; // class FormFieldText
 
 
@@ -136,6 +148,9 @@
     virtual FormType type() const;
     ChoiceType choiceType() const;
     QStringList choices() const;
+%If(POPPLER_V0_87_0 -)
+    QVector< QPair< QString, QString > > choicesWithExportValues () const;
+%End
     bool isEditable() const;
     bool multiSelect() const;
     QList<int> currentChoices() const;
@@ -149,7 +164,7 @@
 
 private:
     FormFieldChoice(const Poppler::FormFieldChoice&);
-    
+
 }; // class FormFieldChoice
 
 %If(POPPLER_V0_51_0 -)
@@ -192,6 +207,9 @@
            HashAlgorithmSha224
        };
 %End
+%If(POPPLER_V0_74_0 -)
+    CertificateInfo certificateInfo () const;
+%End
        SignatureStatus signatureStatus() const;
        CertificateStatus certificateStatus() const;
        QString signerName() const;
@@ -233,7 +251,7 @@
        //FormFieldSignature(DocumentData *doc, ::Page *p, 
::FormWidgetSignature *w);
        //~FormFieldSignature();
     FormFieldSignature(const Poppler::FormFieldSignature&);
-    
+
        FormType type() const;
 %If(POPPLER_V0_58_0 -)
        SignatureType signatureType() const;
@@ -248,6 +266,86 @@
 %End // POPPLER_V0_51_0
 
 
+%If(POPPLER_V0_74_0 -)
+class CertificateInfo {
+%TypeHeaderCode
+#include <qt5/poppler-qt5.h>
+#include <qt5/poppler-form.h>
+%End
+    public:
+
+    enum EntityInfoKey {
+        CommonName,
+        DistinguishedName,
+        EmailAddress,
+        Organization
+    };
+
+    enum KeyUsageExtension {
+        KuDigitalSignature = 0x80,
+        KuNonRepudiation = 0x40,
+        KuKeyEncipherment = 0x20,
+        KuDataEncipherment = 0x10,
+        KuKeyAgreement = 0x08,
+        KuKeyCertSign = 0x04,
+        KuClrSign = 0x02,
+        KuEncipherOnly = 0x01,
+        KuNone = 0x00
+    };
+    // next line is how to convert Q_DECLARE_FLAGS for enums to sip :-)
+    typedef QFlags<Poppler::CertificateInfo::KeyUsageExtension> 
KeyUsageExtensions;
+
+    enum PublicKeyType {
+        RsaKey,
+        DsaKey,
+        EcKey,
+        OtherKey
+    };
+    QByteArray certificateData () const;
+%If(POPPLER_V21_01_0 -)
+    bool checkPassword (const QString &password) const;
+%End
+    bool isNull () const;
+    bool isSelfSigned () const;
+    QString issuerInfo (EntityInfoKey key) const;
+    KeyUsageExtensions keyUsageExtensions () const;
+%If(POPPLER_V21_01_0 -)
+    QString nickName () const;
+%End
+    //CertificateInfo & operator= (const CertificateInfo &other);  // XXX 
Syntax error
+    QByteArray publicKey () const;
+    int publicKeyStrength () const;
+    PublicKeyType publicKeyType () const;
+    QByteArray serialNumber () const;
+    QString subjectInfo (EntityInfoKey key) const;
+    QDateTime validityEnd () const;
+    QDateTime validityStart () const;
+    int version () const;
+
+    // copy constructor
+    CertificateInfo (const CertificateInfo &other);
+
+
+}; // class CertificateInfo
+%End // POPPLER_V0_74_0 -
+
+
+%If(POPPLER_V0_79_0 -)
+class FormFieldIcon {
+%TypeHeaderCode
+#include <qt5/poppler-qt5.h>
+#include <qt5/poppler-form.h>
+%End
+    public:
+    FormFieldIcon (const FormFieldIcon &ffIcon);
+    //FormFieldIcon (FormFieldIconData *data);
+    //FormFieldIcon & operator= (const FormFieldIcon &ffIcon);  // XXX Syntax 
error
+
+}; // FormFieldIcon
+%End // POPPLER_V0_79_0 -
+
+
+
 
 
 }; // namespace Poppler
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-poppler-qt5-0.75.0/poppler-qt5.sip 
new/python-poppler-qt5-21.1.0/poppler-qt5.sip
--- old/python-poppler-qt5-0.75.0/poppler-qt5.sip       2019-10-30 
07:07:32.000000000 +0100
+++ new/python-poppler-qt5-21.1.0/poppler-qt5.sip       2021-01-07 
13:00:27.000000000 +0100
@@ -19,7 +19,7 @@
 #include <qt5/poppler-qt5.h>
 %End
 
-%Include version.sip        // auto-generated by the setup.py script
+%Include version.sip        // auto-generated by the project.py script
 %Include types.sip
 
 %Include poppler-annotation.sip
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-poppler-qt5-0.75.0/project.py 
new/python-poppler-qt5-21.1.0/project.py
--- old/python-poppler-qt5-0.75.0/project.py    1970-01-01 01:00:00.000000000 
+0100
+++ new/python-poppler-qt5-21.1.0/project.py    2021-01-07 13:00:27.000000000 
+0100
@@ -0,0 +1,88 @@
+"""The build configuration file for Python-Poppler-Qt5, used by sip."""
+
+from os.path import join
+import re
+import subprocess
+from pyqtbuild import PyQtBindings, PyQtProject
+from sipbuild import Option
+import PyQt5
+
+
+class PythonPopplerQt5(PyQtProject):
+    """The Project class."""
+
+    def __init__(self):
+        super().__init__()
+        self.bindings_factories = [PopplerQt5Bindings]
+
+    def update(self, tool):
+        """Allows SIP to find PyQt5 .sip files."""
+        super().update(tool)
+        self.sip_include_dirs.append(join(PyQt5.__path__[0], 'bindings'))
+
+
+class PopplerQt5Bindings(PyQtBindings):
+    """The Poppler-Qt5 Bindings class."""
+
+    def __init__(self, project):
+        super().__init__(project, name='Poppler-Qt5',
+                         sip_file='poppler-qt5.sip',
+                         qmake_QT=['xml'])
+
+    def get_options(self):
+        """Our custom options that a user can pass to sip-build."""
+        options = super().get_options()
+        options.append(
+            Option('poppler_version',
+                   help='version of the poppler library',
+                   metavar='VERSION'))
+        return options
+
+    @staticmethod
+    def run_pkg_config(option):
+        output = subprocess.check_output(
+            ['pkg-config', option, 'poppler-qt5'],
+            text=True)
+        return output.rstrip()
+
+    def apply_user_defaults(self, tool):
+        # Set include_dirs, library_dirs and libraries based on pkg-config data
+        cflags = self.run_pkg_config('--cflags-only-I').split()
+        libs = self.run_pkg_config('--libs').split()
+        self.include_dirs.extend(
+            flag[2:] for flag in cflags if flag.startswith('-I'))
+        self.library_dirs.extend(
+            flag[2:] for flag in libs if flag.startswith('-L'))
+        self.libraries.extend(
+            flag[2:] for flag in libs if flag.startswith('-l'))
+
+        # Generate version.sip file
+        if self.poppler_version is not None:
+            poppler_qt5_version = self.poppler_version
+        else:
+            poppler_qt5_version = self.run_pkg_config('--modversion')
+        poppler_qt5_version = tuple(map(int, poppler_qt5_version.split('.')))
+        python_poppler_qt5_version = self.project.version_str.split('.')
+        format_dict = {
+            'vlen': 'i' * len(python_poppler_qt5_version),
+            'vargs': ', '.join(python_poppler_qt5_version),
+            'pvlen': 'i' * len(poppler_qt5_version),
+            'pvargs': ', '.join(map(str, poppler_qt5_version)),
+        }
+        with open('version.sip.in') as template_file:
+            version_sip_template = template_file.read()
+        with open('version.sip', 'w') as version_file:
+            version_file.write(version_sip_template.format(**format_dict))
+
+        # Add Poppler version tag
+        if poppler_qt5_version:
+            with open('timeline.sip') as timeline_file:
+                timeline = timeline_file.read()
+            for match in re.finditer(r'POPPLER_V(\d+)_(\d+)_(\d+)', timeline):
+                if poppler_qt5_version < tuple(map(int, match.group(1, 2, 3))):
+                    break
+                tag = match.group()
+        else:
+            tag = 'POPPLER_V0_20_0'
+        self.tags.append(tag)
+        super().apply_user_defaults(tool)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-poppler-qt5-0.75.0/pyproject.toml 
new/python-poppler-qt5-21.1.0/pyproject.toml
--- old/python-poppler-qt5-0.75.0/pyproject.toml        1970-01-01 
01:00:00.000000000 +0100
+++ new/python-poppler-qt5-21.1.0/pyproject.toml        2021-01-07 
16:01:29.000000000 +0100
@@ -0,0 +1,37 @@
+[build-system]
+requires = ["sip >=5", "PyQt-builder", "PyQt5"]
+build-backend = "sipbuild.api"
+
+[tool.sip.metadata]
+name = "python-poppler-qt5"
+version = "21.1.0"
+summary = "A Python binding to Poppler-Qt5"
+description-file = "README.rst"
+home-page = "https://github.com/frescobaldi/python-poppler-qt5";
+maintainer = "Wilbert Berendsen"
+maintainer-email = "wbs...@xs4all.nl"
+license = "LGPL"
+classifier = [
+  "Development Status :: 5 - Production/Stable",
+  "Intended Audience :: Developers",
+  "License :: OSI Approved :: GNU Library or Lesser General Public License 
(LGPL)",
+  "Operating System :: MacOS :: MacOS X",
+  "Operating System :: Microsoft :: Windows",
+  "Operating System :: POSIX",
+  "Programming Language :: Python :: 3",
+  "Topic :: Multimedia :: Graphics :: Viewers"
+]
+requires-dist = "PyQt5"
+
+[tool.sip.project]
+sip-files-dir = "."
+sdist-excludes = [
+  "version.sip",
+  ".git/*",
+  ".git/*/*",
+  ".git/*/*/*",
+  ".git/*/*/*/*",
+  ".git/*/*/*/*/*",
+  ".git/*/*/*/*/*/*",
+  ".git/*/*/*/*/*/*/*"
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-poppler-qt5-0.75.0/python_poppler_qt5.egg-info/PKG-INFO 
new/python-poppler-qt5-21.1.0/python_poppler_qt5.egg-info/PKG-INFO
--- old/python-poppler-qt5-0.75.0/python_poppler_qt5.egg-info/PKG-INFO  
2019-11-22 06:55:06.000000000 +0100
+++ new/python-poppler-qt5-21.1.0/python_poppler_qt5.egg-info/PKG-INFO  
2021-01-07 17:21:20.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: python-poppler-qt5
-Version: 0.75.0
+Version: 21.1.0
 Summary: A Python binding to Poppler-Qt5
 Home-page: https://github.com/frescobaldi/python-poppler-qt5
 Maintainer: Wilbert Berendsen
@@ -13,7 +13,9 @@
         A Python binding for libpoppler-qt5 that aims for completeness and for 
being
         actively maintained.
         
-        Created and currently maintained by Wilbert Berendsen 
<wbs...@xs4all.nl>.
+        Created and maintained by Wilbert Berendsen <wbs...@xs4all.nl>, with 
help of
+        other contributors, especially where it concerns supporting many 
platforms and
+        build systems. Thanks for everyone's help!
         
         Homepage: https://pypi.python.org/pypi/python-poppler-qt5/
         
@@ -28,7 +30,7 @@
         -------------
         
         The Python API closely follows the Poppler Qt5 C++ interface library 
API,
-        documented at http://people.freedesktop.org/~aacid/docs/qt5/ .
+        documented at https://poppler.freedesktop.org/api/qt5/ .
         
         Note: Releases of PyQt5 < 5.4 currently do not support the QtXml 
module,
         all methods that use the QDomDocument, QDomElement and QDomNode types 
are
@@ -37,9 +39,8 @@
         PyQt5 >= 5.4 is recommended.
         
         Wherever the C++ API requires ``QList``, ``QSet`` or ``QLinkedList``, 
any
-        Python sequence can be used. 
-        API calls that return ``QList``, ``QSet`` or ``QLinkedList`` all 
return Python
-        lists.
+        Python sequence can be used. API calls that return ``QList``, ``QSet`` 
or
+        ``QLinkedList`` all return Python lists.
         
         There are a few other differences:
         
@@ -47,8 +48,8 @@
         called as ``d.getPdfVersion()``, (where ``d`` is a 
``Poppler::Document``
         instance); it will return a tuple of two integers (major, minor).
         
-        ``Poppler::Document`` has ``__len__`` and ``__getitem__`` methods, 
corresponding
-        to ``numPages()`` and ``page(int num)``.
+        ``Poppler::Document`` has ``__len__`` and ``__getitem__`` methods,
+        corresponding to ``numPages()`` and ``page(int num)``.
         
         ``Poppler::FontIterator`` (returned by 
``Poppler::Document::newFontIterator``)
         is also a Python iterable (e.g. has ``__iter__()`` and ``__next__()`` 
methods).
@@ -67,17 +68,17 @@
         In addition to the Poppler namespace, there are two toplevel module
         functions:
         
-            ``popplerqt5.version()``
-                returns the version of the ``python-poppler-qt5`` package as a
-                tuple of ints, e.g. ``(0, 18, 2)``.
-            
-            ``popplerqt5.poppler_version()``
-                returns the version of the linked Poppler-Qt5 library as a
-                tuple of ints, e.g. ``(0, 24, 5)``.
-                
-                This is determined at build time. If at build time the 
Poppler-Qt5
-                version could not be determined and was not specified, an empty
-                tuple might be returned.
+        ``popplerqt5.version()``
+            returns the version of the ``python-poppler-qt5`` package as a 
tuple of
+            ints, e.g. ``(0, 18, 2)``.
+        
+        ``popplerqt5.poppler_version()``
+            returns the version of the linked Poppler-Qt5 library as a tuple 
of ints,
+            e.g. ``(0, 24, 5)``.
+        
+            This is determined at build time. If at build time the Poppler-Qt5 
version
+            could not be determined and was not specified, an empty tuple 
might be
+            returned.
         
         
 Platform: UNKNOWN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-poppler-qt5-0.75.0/python_poppler_qt5.egg-info/SOURCES.txt 
new/python-poppler-qt5-21.1.0/python_poppler_qt5.egg-info/SOURCES.txt
--- old/python-poppler-qt5-0.75.0/python_poppler_qt5.egg-info/SOURCES.txt       
2019-11-22 06:55:07.000000000 +0100
+++ new/python-poppler-qt5-21.1.0/python_poppler_qt5.egg-info/SOURCES.txt       
2021-01-07 17:21:20.000000000 +0100
@@ -4,7 +4,6 @@
 MANIFEST.in
 README.rst
 TODO
-demo.py
 poppler-annotation.sip
 poppler-convert.sip
 poppler-document.sip
@@ -22,10 +21,15 @@
 poppler-qt5.sip
 poppler-sound-object.sip
 poppler-text-box.sip
+project.py
+pyproject.toml
 setup.cfg
 setup.py
 timeline.sip
 types.sip
+version.sip.in
+demo/demo.py
+demo/merge-annotations.py
 python_poppler_qt5.egg-info/PKG-INFO
 python_poppler_qt5.egg-info/SOURCES.txt
 python_poppler_qt5.egg-info/dependency_links.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-poppler-qt5-0.75.0/setup.py 
new/python-poppler-qt5-21.1.0/setup.py
--- old/python-poppler-qt5-0.75.0/setup.py      2019-11-22 06:54:27.000000000 
+0100
+++ new/python-poppler-qt5-21.1.0/setup.py      2021-01-07 16:01:44.000000000 
+0100
@@ -2,7 +2,7 @@
 
 project = dict(
     name = 'python-poppler-qt5',
-    version = '0.75.0',
+    version = '21.1.0',
     description = 'A Python binding to Poppler-Qt5',
     long_description = (
         'A Python binding to Poppler-Qt5 that aims for '
@@ -38,7 +38,7 @@
    from setuptools import setup, Extension
 except ImportError:
    from distutils.core import setup, Extension
-   
+
 import sipdistutils
 
 ### this circumvents a bug in sip < 4.14.2, where the file() builtin is used
@@ -56,10 +56,10 @@
 
 def check_qtxml():
     """Return True if PyQt5.QtXml can be imported.
-    
+
     in some early releases of PyQt5, QtXml was missing because it was
     thought QtXml was deprecated.
-    
+
     """
     import PyQt5
     try:
@@ -71,11 +71,11 @@
 
 def pkg_config(package, attrs=None, include_only=False):
     """parse the output of pkg-config for a package.
-    
+
     returns the given or a new dictionary with one or more of these keys
     'include_dirs', 'library_dirs', 'libraries'. Every key is a list of paths,
     so that it can be used with distutils Extension objects.
-    
+
     """
     if attrs is None:
         attrs = {}
@@ -123,9 +123,9 @@
 # hack to provide our options to sip on its invocation:
 build_ext_base = sipdistutils.build_ext
 class build_ext(build_ext_base):
-    
+
     description = "Builds the popplerqt5 module."
-    
+
     user_options = build_ext_base.user_options + [
         ('poppler-version=', None, "version of the poppler library"),
         ('qmake-bin=', None, "Path to qmake binary"),
@@ -134,7 +134,7 @@
         ('pyqt-sip-dir=', None, "Path to PyQt's SIP files"),
         ('pyqt-sip-flags=', None, "SIP flags used to generate PyQt bindings")
     ]
-    
+
     def initialize_options (self):
         build_ext_base.initialize_options(self)
         self.poppler_version = None
@@ -232,10 +232,10 @@
 
     def write_version_sip(self, poppler_qt5_version, 
python_poppler_qt5_version):
         """Write a version.sip file.
-        
+
         The file contains code to make version information accessible from
         the popplerqt5 Python module.
-        
+
         """
         with open('version.sip', 'w') as f:
             f.write(version_sip_template.format(
@@ -243,22 +243,22 @@
                 vargs = ', '.join(map(format, python_poppler_qt5_version)),
                 pvlen = 'i' * len(poppler_qt5_version),
                 pvargs = ', '.join(map(format, poppler_qt5_version))))
-        
+
     def _find_sip(self):
         """override _find_sip to allow for manually speficied sip path."""
         return self.sip_bin or build_ext_base._find_sip(self)
-    
+
     def _sip_compile(self, sip_bin, source, sbf):
-        
+
         # First check manually specified poppler version
         ver = self.poppler_version or pkg_config_version('poppler-qt5') or ()
-        
+
         # our own version:
         version = tuple(map(int, re.findall(r'\d+', project['version'])))
-        
+
         # make those accessible from the popplerqt5 module:
         self.write_version_sip(ver, version)
-        
+
         # Disable features if older poppler-qt5 version is found.
         # See the defined tags in %Timeline{} in timeline.sip.
         tag = 'POPPLER_V0_20_0'
@@ -268,7 +268,7 @@
                     if ver < tuple(map(int, m.group(1, 2, 3))):
                         break
                     tag = m.group()
-        
+
         cmd = [sip_bin]
         if hasattr(self, 'sip_opts'):
             cmd += self.sip_opts
@@ -289,39 +289,39 @@
 if platform.system() == 'Windows':
    # Enforce libraries to link against on Windows
    ext_args['libraries'] = ['poppler-qt5', 'Qt5Core', 'Qt5Gui', 'Qt5Xml']
-   
+
    class bdist_support():
        def __find_poppler_dll(self):
            paths = os.environ['PATH'].split(";")
            poppler_dll = None
-           
+
            for path in paths:
                dll_path_candidate = os.path.join(path, "poppler-qt5.dll")
                if os.path.exists(dll_path_candidate):
                    return dll_path_candidate
-           
+
            return None
-       
+
        def _copy_poppler_dll(self):
            poppler_dll = self.__find_poppler_dll()
            if poppler_dll is None:
                self.warn("Could not find poppler-qt5.dll in any of the folders 
listed in the PATH environment variable.")
                return False
-               
+
            self.mkpath(self.bdist_dir)
            self.copy_file(poppler_dll, os.path.join(self.bdist_dir, 
"python-poppler5.dll"))
-           
+
            return True
-   
+
    import distutils.command.bdist_msi
    class bdist_msi(distutils.command.bdist_msi.bdist_msi, bdist_support):
        def run(self):
            if not self._copy_poppler_dll():
                return
            distutils.command.bdist_msi.bdist_msi.run(self)
-   
+
    project['cmdclass']['bdist_msi'] = bdist_msi
-   
+
    import distutils.command.bdist_wininst
    class bdist_wininst(distutils.command.bdist_wininst.bdist_wininst, 
bdist_support):
        def run(self):
@@ -329,7 +329,7 @@
                return
            distutils.command.bdist_wininst.bdist_wininst.run(self)
    project['cmdclass']['bdist_wininst'] = bdist_wininst
-   
+
    import distutils.command.bdist_dumb
    class bdist_dumb(distutils.command.bdist_dumb.bdist_dumb, bdist_support):
        def run(self):
@@ -337,7 +337,7 @@
                return
            distutils.command.bdist_dumb.bdist_dumb.run(self)
    project['cmdclass']['bdist_dumb'] = bdist_dumb
-   
+
    try:
        # Attempt to patch bdist_egg if the setuptools/distribute extension is 
installed
        import setuptools.command.bdist_egg
@@ -379,7 +379,7 @@
     project["long_description"] = f.read().decode('utf-8')
 
 
-   
+
 project['cmdclass']['build_ext'] = build_ext
 setup(
     ext_modules = [Extension("popplerqt5", ["poppler-qt5.sip"], **ext_args)],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-poppler-qt5-0.75.0/timeline.sip 
new/python-poppler-qt5-21.1.0/timeline.sip
--- old/python-poppler-qt5-0.75.0/timeline.sip  2019-09-18 21:09:53.000000000 
+0200
+++ new/python-poppler-qt5-21.1.0/timeline.sip  2021-01-07 15:32:36.000000000 
+0100
@@ -15,4 +15,8 @@
     POPPLER_V0_63_0
     POPPLER_V0_64_0
     POPPLER_V0_74_0
+    POPPLER_V0_79_0
+    POPPLER_V0_85_0
+    POPPLER_V0_87_0
+    POPPLER_V21_01_0
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-poppler-qt5-0.75.0/types.sip 
new/python-poppler-qt5-21.1.0/types.sip
--- old/python-poppler-qt5-0.75.0/types.sip     2019-09-26 09:31:49.000000000 
+0200
+++ new/python-poppler-qt5-21.1.0/types.sip     2020-02-09 12:02:56.000000000 
+0100
@@ -182,7 +182,7 @@
   if ((l = PyList_New(sipCpp->size())) == NULL)
     return NULL;
 
-  const sipMappedType* qlinkedlist_type = 
sipFindMappedType("QLinkedList<TYPE>");
+  const sipTypeDef* qlinkedlist_type = sipFindType("QLinkedList<TYPE>");
 
   // Set the list elements.
   for (int i = 0; i < sipCpp->size(); ++i)
@@ -190,7 +190,7 @@
     QLinkedList<TYPE>* t = new QLinkedList<TYPE>(sipCpp->at(i));
     PyObject *tobj;
 
-    if ((tobj = sipConvertFromMappedType(t, qlinkedlist_type, sipTransferObj)) 
== NULL)
+    if ((tobj = sipConvertFromType(t, qlinkedlist_type, sipTransferObj)) == 
NULL)
     {
       Py_DECREF(l);
       delete t;
@@ -203,7 +203,7 @@
 %End
 
 %ConvertToTypeCode
-  const sipMappedType* qlinkedlist_type = 
sipFindMappedType("QLinkedList<TYPE>");
+  const sipTypeDef* qlinkedlist_type = sipFindType("QLinkedList<TYPE>");
 
   // Check the type if that is all that is required.
   if (sipIsErr == NULL)
@@ -212,7 +212,7 @@
       return 0;
 
     for (int i = 0; i < PySequence_Size(sipPy); ++i)
-      if (!sipCanConvertToMappedType(PySequence_ITEM(sipPy, i), 
qlinkedlist_type, SIP_NOT_NONE))
+      if (!sipCanConvertToType(PySequence_ITEM(sipPy, i), qlinkedlist_type, 
SIP_NOT_NONE))
         return 0;
 
     return 1;
@@ -224,16 +224,16 @@
   for (int i = 0; i < PySequence_Size(sipPy); ++i)
   {
     int state;
-    QLinkedList<TYPE> * t = reinterpret_cast< QLinkedList<TYPE> * 
>(sipConvertToMappedType(PySequence_ITEM(sipPy, i), qlinkedlist_type, 
sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+    QLinkedList<TYPE> * t = reinterpret_cast< QLinkedList<TYPE> * 
>(sipConvertToType(PySequence_ITEM(sipPy, i), qlinkedlist_type, sipTransferObj, 
SIP_NOT_NONE, &state, sipIsErr));
 
     if (*sipIsErr)
     {
-      sipReleaseInstance(t, sipClass_TYPE, state);
+      sipReleaseType(t, qlinkedlist_type, state);
       delete ql;
       return 0;
     }
     ql->append(*t);
-    sipReleaseInstance(t, sipClass_TYPE, state);
+    sipReleaseType(t, qlinkedlist_type, state);
   }
 
   *sipCppPtr = ql;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-poppler-qt5-0.75.0/version.sip.in 
new/python-poppler-qt5-21.1.0/version.sip.in
--- old/python-poppler-qt5-0.75.0/version.sip.in        1970-01-01 
01:00:00.000000000 +0100
+++ new/python-poppler-qt5-21.1.0/version.sip.in        2021-01-07 
13:00:27.000000000 +0100
@@ -0,0 +1,21 @@
+// Generated by project.py -- Do not edit
+
+PyObject *version();
+%Docstring
+The version of the popplerqt5 python module.
+%End
+
+PyObject *poppler_version();
+%Docstring
+The version of the Poppler library it was built with.
+%End
+
+%ModuleCode
+
+PyObject *version()
+{{ return Py_BuildValue("({vlen})", {vargs}); }};
+
+PyObject *poppler_version()
+{{ return Py_BuildValue("({pvlen})", {pvargs}); }};
+
+%End

++++++ python-poppler-qt5-mapqvector.patch ++++++
>From 40e71ad88173d02648bceb2438bc0567e60dacd5 Mon Sep 17 00:00:00 2001
From: Ben Greiner <c...@bnavigator.de>
Date: Tue, 23 Feb 2021 17:59:33 +0100
Subject: [PATCH] map type QVector< QPair<TYPE, TYPE> > for
 FormFieldChoice::choicesWithExportValues()

---
 types.sip | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 93 insertions(+)

diff --git a/types.sip b/types.sip
index 239b8c9..81cb283 100644
--- a/types.sip
+++ b/types.sip
@@ -331,5 +331,98 @@ template <TYPE>
 };
 
 
+/**
+ * Convert QVector< QPair<TYPE, TYPE> >
+ * from and to a Python list of a 2-item tuple
+ */
+
+template<TYPE>
+%MappedType QVector< QPair<TYPE, TYPE> >
+{
+%TypeHeaderCode
+#include <qvector.h>
+#include <qpair.h>
+%End
+
+%ConvertFromTypeCode
+  // Create the list.
+  PyObject *l;
+
+  if ((l = PyList_New(sipCpp->size())) == NULL)
+      return NULL;
+
+  // Set the list elements.
+  for (int i = 0; i < sipCpp->size(); ++i)
+  {
+    QPair<TYPE, TYPE>* p = new QPair<TYPE, TYPE>(sipCpp->at(i));
+    PyObject *ptuple = PyTuple_New(2);
+    PyObject *pfirst;
+    PyObject *psecond;
+
+    TYPE *sfirst = new TYPE(p->first);
+    if ((pfirst = sipConvertFromType(sfirst, sipType_TYPE, sipTransferObj)) == 
NULL)
+    {
+      Py_DECREF(l);
+      Py_DECREF(ptuple);
+      return NULL;
+    }
+    PyTuple_SET_ITEM(ptuple, 0, pfirst);
+
+    TYPE *ssecond = new TYPE(p->second);
+    if ((psecond = sipConvertFromType(ssecond, sipType_TYPE, sipTransferObj)) 
== NULL)
+    {
+      Py_DECREF(l);
+      Py_DECREF(ptuple);
+      Py_DECREF(pfirst);
+      return NULL;
+    }
+    PyTuple_SET_ITEM(ptuple, 1, psecond);
+
+    PyList_SET_ITEM(l, i, ptuple);
+  }
+
+  return l;
+%End
+
+%ConvertToTypeCode
+  const sipTypeDef* qpair_type = sipFindType("QPair<TYPE, TYPE>");
+
+  // Check the type if that is all that is required.
+  if (sipIsErr == NULL)
+  {
+    if (!PySequence_Check(sipPy))
+      return 0;
+
+    for (int i = 0; i < PySequence_Size(sipPy); ++i)
+      if (!sipCanConvertToType(PySequence_ITEM(sipPy, i), qpair_type, 
SIP_NOT_NONE))
+        return 0;
+
+    return 1;
+  }
+
+
+  QVector< QPair<TYPE, TYPE> > *qv = new QVector< QPair<TYPE, TYPE> >;
+
+  for (int i = 0; i < PySequence_Size(sipPy); ++i)
+  {
+    int state;
+    QPair<TYPE, TYPE> * p = reinterpret_cast< QPair<TYPE, TYPE> * 
>(sipConvertToType(PySequence_ITEM(sipPy, i), qpair_type, sipTransferObj, 
SIP_NOT_NONE, &state, sipIsErr));
+
+    if (*sipIsErr)
+    {
+      sipReleaseType(p, qpair_type, state);
+      delete qv;
+      return 0;
+    }
+    qv->append(*p);
+    sipReleaseType(p, qpair_type, state);
+  }
+
+  *sipCppPtr = qv;
+  return sipGetState(sipTransferObj);
+%End
+
+};
+
 
 /* kate: indent-width 4; space-indent on; hl c++; indent-mode cstyle; */

Reply via email to