[PyQt] ANN: SIP v4.15.1 Released

Hans-Peter Jansen hpj at urpla.net
Tue Nov 19 23:17:20 GMT 2013


On Dienstag, 19. November 2013 15:34:11 Phil Thompson wrote:
> On Tue, 19 Nov 2013 15:52:01 +0100, Hans-Peter Jansen <hpj at urpla.net>
> 
> wrote:
> > Dear Phil,
> > 
> > On Samstag, 24. August 2013 22:30:16 Hans-Peter Jansen wrote:
> >> On Freitag, 23. August 2013 18:44:38 Phil Thompson wrote:
> >> > SIP v4.15.1 has been released. This fixes a regression in v4.15
> >> > related to
> >> > the handling of hidden virtual methods. PyQt is unaffected.
> >> 
> >> Well, but PyQt3 is:

[...]

> 
> It's probably missing reimplementations in the .sip files.

Okay, I got around this one, only to be fenced with next issue:

[   82s] g++ -c -pipe -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DUSE_LIB64_PATHES -fno-strict-aliasing -fPIC -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DUSE_LIB64_PATHES -fno-strict-aliasing -Wall -W -D_REENTRANT -DNDEBUG -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I. -I/usr/include/ -I/usr/include/python2.7 -I/usr/lib/qt3/mkspecs/default -I/usr/lib/qt3/include -I/usr/X11R6/include -o sipqtnetworkQFtp.o sipqtnetworkQFtp.cpp

resulting in

[   83s] In file included from sip/qtnetwork/qftp.sip:45:0:
[   83s] /usr/lib/qt3/include/qftp.h: In member function 'virtual bool sipQFtp::checkConnection(QNetworkOperation*)':
[   83s] /usr/lib/qt3/include/qftp.h:171:10: error: 'virtual bool QFtp::checkConnection(QNetworkOperation*)' is private
[   83s] qtnetwork/sipqtnetworkQFtp.cpp:386:40: error: within this context

Hmm.

checkConnection is defined in sip/qt/qnetworkprotocol.sip as a protected
method of QNetworkProtocol class:

        virtual bool checkConnection(QNetworkOperation *);


Obviously sip is being aware of this matter, as it handles it in a special way.
It creates in qtnetwork/sipqtnetworkQFtp.cpp:

    bool sipProtectVirt_checkConnection(bool,QNetworkOperation *);


bool sipQFtp::sipProtectVirt_checkConnection(bool sipSelfWasArg,QNetworkOperation *a0)
{
    return (sipSelfWasArg ? QNetworkProtocol::checkConnection(a0) : checkConnection(a0));
}


But the question is, why does the compiler complain on this method: 

bool sipQFtp::checkConnection(QNetworkOperation *a0)
{   
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;
    
    sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[10],sipPySelf,NULL,sipName_checkConnection);
    
    if (!sipMeth)
==>     return QFtp::checkConnection(a0);

    typedef bool (*sipVH_qt_180)(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, QNetworkOperation *);

    return ((sipVH_qt_180)(sipModuleAPI_qtnetwork_qt->em_virthandlers[180]))(sipGILState, 0, sipPySelf, sipMeth, a0);
}


and even more interesting, what could be done to avoid this issue?

I'm lost again.

Another idea would be GREAT.

Cheers,
Pete


More information about the PyQt mailing list