[PyQt] QFlags-related compile problem in qglobal.sip

Wilbert Berendsen wb at xs4all.nl
Mon Feb 23 12:34:35 GMT 2015


Hi,

I have trouble compiling python-poppler-qt5 (in development). It breaks
in qglobal.sip:

i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -g -fstack-protector-strong -Wformat
-Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC
-I/usr/include/poppler/qt5 -I/usr/include/poppler
-I/usr/include/python3.4m -I/usr/include/python3.4m -I/usr/include/qt4
-I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui
-I/usr/include/qt4/QtXml -c
build/temp.linux-i686-3.4/sippopplerqt5PopplerPagePainterFlags.cpp -o
build/temp.linux-i686-3.4/build/temp.linux-i686-3.4/sippopplerqt5PopplerPagePainterFlags.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid
for C/ObjC but not for C++ /usr/share/sip/PyQt5/QtCore/qglobal.sip: In
function ‘int
slot_Poppler_Page_PainterFlags___bool__(PyObject*)’: /usr/share/sip/PyQt5/QtCore/qglobal.sip:119:36:
error: expected type-specifier
	sipRes = (sipCpp->operator QFlags::Int() != 0);
                                   ^


The sip definition is:

   enum PainterFlag {
        DontSaveAndRestore = 0x00000001,
   };
   typedef QFlags<Poppler::Page::PainterFlag> PainterFlags;

(in poppler-page.sip, visible at[1]

[1]
https://github.com/wbsoft/python-poppler-qt5/blob/master/poppler-page.sip#L24

What can I do to fix this compile problem?

Many thanks for any help!
Wilbert

-- 
Wilbert Berendsen
(http://www.wilbertberendsen.nl)



More information about the PyQt mailing list