[Kde-bindings] One Smoke question
Sven Aßmann
sven.assmann at lubico.biz
Fri Aug 27 15:16:52 UTC 2010
Am Freitag, 27. August 2010 16:39:06 schrieb Arno Rehn:
> On Friday 27 August 2010 16:16:09 Sven Aßmann wrote:
> > Can Anyone say me what happens when i passed a char* as an argument for a
> > methodsignature that contains QString& ??
> >
> > Is it possible that Smoke or the underlying class cannot call a cast
method
> > for e.g. char* to QString?
> That won't work. If a method expects a QString, you have to pass it a
QString,
> even if you normally can implicitly convert a char* to a QString. The reason
> is that the string is passed-by-reference, i.e. in a void*. The wrapper
method
> only has the information that it's a QString and that something's in the
> s_voidp field of the StackItem. So it will do this:
>
> void x_0(Smoke::Stack s) {
> wrappedMethod(*(QString*)s[1].s_voidp);
> }
>
> All implicit conversion options are lost this way (which is a good thing -
> otherwise it could interfere with the bindings language's conversions).
Thank you for this information, now it is clear why it not work with my way.
>
> > i work on a smoke based php binding for qt/kde..
> Have you checked out PHPQt? We're currently looking for a maintainer and
it's
> already pretty good at binding Qt. We just need KDE extensions for it. Its
> syntax is also nicer (my opinion, only) than your current code. In PHPQt,
you
> can use classes directly, as in
>
> <?php
> $app = new QApplication($argc, $argv);
> ?>
Yes, i did a review of the phpqt code for a while, but i think many things
aren't solved nicely or i do not fully understand it.. but i cant get the
phpqt code to work for me.. so i decided to start this mini project for a
smoke based php binding, to get deeper into the matter and then i would to
review the phpqt binding code again and will see if i understand every detail
of it..
and maybe if i do that, then i will become a maintainer of the projekt :)
----
Sven Aßmann
sven.assmann at lubico.biz
>
> --
> Arno Rehn
> arno at arnorehn.de
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings at kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20100827/7a6f325e/attachment.sig>
More information about the Kde-bindings
mailing list