[PyQt] kdebindings 4.4.4 build failure with sip-4.11.1 continues
Hans-Peter Jansen
hpj at urpla.net
Tue Sep 28 16:48:45 BST 2010
Dear Phil,
unfortunately, this issue is actively holding back current sip for them and
it blocks a complete build of my PyQt project in build service, too.
It even made it into kde's bug tracking system already:
https://bugs.kde.org/show_bug.cgi?id=252366
I know, PyKDE is not your business, but before I revert and downgrade sip,
it would be nice, if you could look briefly into it.
Thanks,
Pete
On Friday 24 September 2010, 13:04:26 Hans-Peter Jansen wrote:
> On Wednesday 22 September 2010, 11:25:21 Hans-Peter Jansen wrote:
> > Unfurtunately, here's the next stumbling point:
> >
> > /usr/include/kio/tcpslavebase.h: In function 'PyObject*
> > slot_KIO_TCPSlaveBase_SslResult___xor__(PyObject*, PyObject*)':
> > /usr/include/kio/tcpslavebase.h:63: error: 'enum
> > KIO::TCPSlaveBase::SslResultDetail' is protected
> > /usr/share/sip/PyQt4/QtCore/qglobal.sip:320: error: within this context
> > /usr/include/kio/tcpslavebase.h: In function 'PyObject*
> > slot_KIO_TCPSlaveBase_SslResult___or__(PyObject*, PyObject*)':
> > /usr/include/kio/tcpslavebase.h:63: error: 'enum
> > KIO::TCPSlaveBase::SslResultDetail' is protected
> > /usr/share/sip/PyQt4/QtCore/qglobal.sip:315: error: within this context
> >
> > Phil, this one is due to the logic operator changes. It's not obvious,
> > what's going wrong, but related to the friend class QFlags
> > declararation, where qglobal.sip got pulled in..
> >
> > Here's the KDE class excerpt:
> >
> > class KIO_EXPORT TCPSlaveBase : public SlaveBase
> > {
> > public:
> > /**
> > * Constructor.
> > *
> > * @param autoSsl if true, will automatically invoke startSsl()
> > right after * connecting. In the absence of errors the
> > use of SSL will * therefore be transparent to higher
> > layers. */ TCPSlaveBase(const QByteArray &protocol,
> > const QByteArray &poolSocket, const QByteArray
> > &appSocket, bool autoSsl = false);
> >
> > virtual ~TCPSlaveBase();
> >
> > protected:
> > enum SslResultDetail {
> > ResultOk = 1,
> > ResultOverridden = 2,
> > ResultFailed = 4,
> > ResultFailedEarly = 8
> > };
> > friend class QFlags<KIO::TCPSlaveBase::SslResultDetail>;
> > public:
> > Q_DECLARE_FLAGS(SslResult, SslResultDetail)
> > protected:
> > [...]
> >
> > and the related sip file excerpt:
> >
> > %ModuleHeaderCode
> > //ctscc
> > #include <forwardingslavebase.h>
> > #include <slavebase.h>
> > #include <tcpslavebase.h>
> > %End
> >
> > namespace KIO
> > {
> >
> > class TCPSlaveBase : KIO::SlaveBase
> > {
> > %TypeHeaderCode
> > #include <tcpslavebase.h>
> > %End
> >
> >
> > public:
> > TCPSlaveBase (const QByteArray& protocol, const QByteArray&
> > poolSocket, const QByteArray& appSocket, bool autoSsl = 0);
> >
> >
> > protected:
> > enum SslResultDetail
> > {
> > ResultOk,
> > ResultOverridden,
> > ResultFailed,
> > ResultFailedEarly
> > };
> > [...]
> >
> > Both attached.
>
> And here's the offending sip generated code (for the __xor__ method):
>
> extern "C" {static PyObject
> *slot_KIO_TCPSlaveBase_SslResult___xor__(PyObject *,PyObject *);} static
> PyObject *slot_KIO_TCPSlaveBase_SslResult___xor__(PyObject
> *sipArg0,PyObject *sipArg1) {
> PyObject *sipParseErr = NULL;
>
> {
> KIO::TCPSlaveBase::SslResult * a0;
> int a0State = 0;
> KIO::TCPSlaveBase::SslResult * a1;
> int a1State = 0;
>
> if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1J1",
> sipType_KIO_TCPSlaveBase_SslResult, &a0, &a0State, sipT
> ype_KIO_TCPSlaveBase_SslResult, &a1, &a1State))
> {
> KIO::TCPSlaveBase::SslResult *sipRes;
>
> Py_BEGIN_ALLOW_THREADS
> sipRes = new KIO::TCPSlaveBase::SslResult((*a0 ^ *a1));
> Py_END_ALLOW_THREADS
>
> sipReleaseType(a0,sipType_KIO_TCPSlaveBase_SslResult,a0State);
> sipReleaseType(a1,sipType_KIO_TCPSlaveBase_SslResult,a1State);
>
> return
> sipConvertFromNewType(sipRes,sipType_KIO_TCPSlaveBase_SslResult,NULL); }
> }
>
> {
> KIO::TCPSlaveBase::SslResult * a0;
> int a0State = 0;
> int a1;
>
> if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i",
> sipType_KIO_TCPSlaveBase_SslResult, &a0, &a0State, &a1)) {
> KIO::TCPSlaveBase::SslResult *sipRes = 0;
>
> #line 320 "/usr/share/sip/PyQt4/QtCore/qglobal.sip"
> sipRes = new KIO::TCPSlaveBase::SslResult(*a0 ^
> (KIO::TCPSlaveBase::SslResultDetail(a1))); #line 7221 "sipkiopart0.cpp"
>
> sipReleaseType(a0,sipType_KIO_TCPSlaveBase_SslResult,a0State);
>
> return
> sipConvertFromNewType(sipRes,sipType_KIO_TCPSlaveBase_SslResult,NULL); }
> }
>
> Py_XDECREF(sipParseErr);
>
> if (sipParseErr == Py_None)
> return NULL;
>
> return
> sipPySlotExtend(&sipModuleAPI_kio,xor_slot,NULL,sipArg0,sipArg1); }
>
>
> The question is, why can't this method access the protected enum
> KIO::TCPSlaveBase::SslResultDetail(a1)
>
> Does it have to be declared as friend class or some such?
>
> Any ideas anyone?
>
> Pete
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
More information about the PyQt
mailing list