[Qtscript-bindings] is this a bug?

Kent Hansen khansen at trolltech.com
Mon Feb 2 14:24:35 CET 2009


Ian Monroe wrote:
> var host = new QHostAddress("localhost");
> var sock = new QTcpSocket();
> var port = 25;
> sock.connectToHost(host, port, QIODevice.ReadWrite);
>
> Results in a 'function not found'. Is there a way to work around this issue?
>
> I submitted it at:
> http://code.google.com/p/qtscriptgenerator/issues/detail?id=29&can=1
> Half the bugs I submit turn out not to be really bugs though, I was
> hoping that was the case here and thought I'd check the list. ;)
>
> Ian
>   

Hi Ian,
Yep, there was a bug with the handling of unsigned shorts
(http://labs.trolltech.com/gitweb?p=qtscriptgenerator;a=commit;h=9e1df82c891d6d844bbac6f76a84c70cb3c88451).
Additionally, you will have to do
new QIODevice.OpenMode(QIODevice.ReadWrite))
since the function expects an OpenMode (flags), not an OpenModeFlag
(enum).  I've created a task for automatic conversion from enum to
flags, see http://code.google.com/p/qtscriptgenerator/issues/detail?id=31.

Kent


More information about the Qtscript-bindings mailing list