On Sun, Jan 31, 2010 at 08:44:23AM -0300, Lauro Moura wrote:
> 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]

I'm including typesystem_templates.xml and I did see
QLocale.to{Float,Double} etc. All those remove index=2 and use template
'fix_args,bool*' like I did but still it doesn't work. I wonder if this
has something to do with the predefined 'msec' value.

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

Yeah, I forgot to delete modify-argument return node (boost stuff).

-- 
Regards,
Carlos Gonçalves
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to