Re: [PyQt] Issue with latest PyQt4 and Qt5

2013-01-08 Thread Phil Thompson
On Mon, 07 Jan 2013 15:05:51 +0100, Detlev Offenbach
 wrote:
> Hello,
> 
> I am facing an issue with latest PyQt4 snapshot and Qt5. It seems that
the 
> 'setSocketDescriptor()' method of 'QAbstractSocket' is not working
> correctly, 
> if PyQt4 is compiled against Qt5. How to reproduce it? Just start the 
> threadedfortunes.py script of the examples. Therafter follow the
> instructions 
> given. Trying to get a fortune via the fortuneclient.py script makes the
> later 
> script hang (i.e. no fortune is returned). It seems, that the socket is
> not 
> connected in the server, which uses the incomingConnection() method of 
> QTcpServer.
> 
> The same issue happens with eric5 and Qt5 in the Cooperation functions.
> 
> eric5 and the a.m. example both work fine with PyQt4 built against Qt4.
> 
> Please note, that the signature of setSocketDescriptor method is
different 
> between Qt4 and Qt5. In Qt4 it is using an 'int' and in Qt5 a 'qintptr'.

> However, the type of the descriptor passed to the 
> QTcpServer,incomingConnection() call is sip.voidptr (for Qt5).
> 
> Regards,
> Detlev

Should be fixed in tonight's snapshot.

Thanks,
Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Issue of QWebPage.extension

2013-01-08 Thread Phil Thompson
On Mon, 7 Jan 2013 21:55:27 +0800, Flya Flyaa  wrote:
> I want to get page detailed error message this way:
>
http://stackoverflow.com/questions/7279046/how-to-get-detailed-error-message-when-qtwebkit-fails-to-load-a-page
> 
> This need  reimplement  QWebPage.extension
>
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwebpage.html#extension,
> and get detail from the second argument ExtensionOption.
> 
> Code like this:
> 
> def extension(self, extension, info = None, errorPage = None):
> if extension == QtWebKit.QWebPage.ErrorPageExtension:
> content = u"Failed loading
> pageFailed loading page (%s)%s
> " % (info.errorString, info.url.toString())
> errorPage.content =
QtCore.QByteArray(content.encode('utf-8'))
> gdata.log(u'Warn: Failed loading [%s] (%s)!' %
> (info.errorString, info.url.toString() ))
> return True
> return True
> 
> When extension == QtWebKit.QWebPage.ErrorPageExtension, the second
argument
> should be QWebPage.ErrorPageExtensionOption, but it always
> be QWebPage.ExtensionOption, and can't get the detailed error message
from
> it.
> 
> PySide has this problem in earlier versions, it be fixed later with test
> case
>
http://pyside.sourcearchive.com/documentation/1.0.1-1/bug__694_8py_source.html.
> Hope PyQt can fix it.

Should be fixed in tonight's snapshot (but untested).

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt