[Kde-perl] XS_this and the argument stack.
Matt Newell
newellm at blur.com
Tue Jan 11 00:13:51 CET 2005
On Monday 10 January 2005 14:47, Richard Dale wrote:
> On Monday 10 January 2005 21:42, Matt Newell wrote:
> > BTW, I've modified my version with full marshalling support for QVariant,
> > and QValueList<QVariant>. So far the marshaller supports Int, UInt,
> > LongLong->Int, ULongLong->UInt, Date -> Qt::Date, DateTime
> > ->Qt::DateTime, Time -> Qt::Time, and String. I think that this would be
> > a valueable contribution to perlqt, so I've attached the code.
>
> I think it seems a good idea to be able to pass a perlqt Qt::Date, or perl
> string etc and have them automatically converted to an appropriate C++
> QVariant type. On the other hand, I not so sure about going the other way -
> maybe you would want an actual PerlQt Qt::Variant or a list of Qt::Variants
> returned instead of them being converted to the underlying type of the C++
> QVariant in perl.
For my usage, it's always best for them to be perl types, but I can imagine
that some people might have a use for actual Qt::Variant return values. I
think that you could either make it a runtime option, possibly set per
function, or you could just make it a function and not do it automatically.
> In addition to the patch, you need entries like this in the Qt_handlers
> array so the marshallers get called:
>
> { "QVariant", marshall_QVariant },
> { "QVariant&", marshall_QVariant },
> { "QVariant*", marshall_QVariant },
>
> { "QValueList<QVariant>", marshall_QValueListQVariant },
> { "QValueList<QVariant>&", marshall_QValueListQVariant },
>
Yeah, I have this. I didn't have any source to make a proper patch against
and I forget to include it.
Matt
More information about the Kde-perl
mailing list