2010/1/30 Carlos Gonçalves <[email protected]>:
> Hi,
>
> I'm at the moment having some fun with pyside-shiboken by trying to make
> QtNetwork module work since it only depends on QtCore. Although my fun
> time is becoming a nightmare due to an issue on 'waitForNewConnection'
> (QLocalServer and QTcpServer).
>
> First things first:
> a) I will focus on QLocalSever only
> b) 'waitForNewConnection' header is:
>   bool QLocalServer::waitForNewConnection ( int msec = 0, bool * timedOut = 0 
> )
>
> Checking typesystem_network.xml from pyside-boost I've notice that
> 'timedOut' argument is removed for obvious reason (bool*), and thus a
> tuple must be returned containing 'retval' and 'ok_'.
>
> Bridging to pyside-shiboken it would looks something like as:
>
> <object-type name="QLocalServer">
>  <modify-function signature="waitForNewConnection(int,bool*)" 
> allow-thread="yes">
>    <modify-argument index="2">
>      <remove-default-expression/>
>      <remove-argument/>
>    </modify-argument>
>    <modify-argument index="return">
>      <replace-type modified-type="python::object" />
>    </modify-argument>
>    <inject-code class="target" position="beginning">
>      <insert-template name="fix_args,bool*"/>
>    </inject-code>
>  </modify-function>
> </object-type>
>

Hi Carlos, there are some cases like this in QtCore, specially those
to[Int|Double|Float|etc] methods. Include the
typesystem_templates.xml[1] and use the fix_bool template like in
QLocale.toDouble[2]

The version you were using exposes some boost-specific stuff.

[1] 
http://qt.gitorious.org/pyside/pyside-shiboken/blobs/master/PySide/QtCore/typesystem_core.xml#line3
[2] 
http://qt.gitorious.org/pyside/pyside-shiboken/blobs/master/PySide/QtCore/typesystem_core.xml#line1219

-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to