[Kde-bindings] QPaintDevice bitBlt() missing from SMOKE runtime

Richard Dale Richard_Dale at tipitina.demon.co.uk
Mon Aug 25 18:54:57 UTC 2003


On Monday 25 August 2003 17:57, Germain Garand wrote:
> Le Lundi 25 Août 2003 16:30, Richard Dale a écrit :
> > I've just been doing a ruby version of the scribble example from the
> > Programming With Qt book, but I've found that the bitBlt() friend
> > function of QPaintDevice is missing. I think it should appear as a static
> > method of QPaintDevice (or it could be a static method in the Qt class
> > perhaps). Or perhaps in could go in the pseudo class OperatorFriends.
> >
> > I don't know what the best way to implement it is - has anyone else
> > thought about this?
>
> Ah, I've been thinking along the same lines since I saw Alexander's nice
> work. I think the most sensible solution would be to stick all global scope
> functions into the _same_ pseudo-class, from where we could export them at
> will.
> Maybe it would need a specific naming convention to avoid the confusion
> with documented Qt classes (right now, QFriendOperators shows up in
> introspection tools as an ordinary class and is potentially confusing for
> users)
>
> What about Qglobal ?
> Qt::global::bitBlt() looks fine to me as a fully qualified call.
No, it doesn't look right to me! - bitBlt() is a QPaintDevice thing, not 
something that should be global. I don't understand why bitBlt() isn't a 
QPaintDevice static method in C++ - is it an efficiency thing? There is a 
similar problem with KImageEffect in the KDE api with various C only 
functions which aren't OO.

> And it could accomodate also q([A-Z])([a-z]+) functions, for instance as
> "Qt::global::" . lc($1) . $2 ?
>
> > When I build a smoke library with the version of kalyptus in the HEAD
> > branch it crashes (in QWidget::setFont), although the older version with
> > PerlQt 3.006 is fine.
>
> mmmh... I thought it was just me.
>
> Oh I see... Alexander wanted to silent the -Wnon-virtual-dtor warning, so
> he added "virtual" to the smoke dtors.
> This is wrong, because it enforces a virtual dtor on classes like QRect,
> QPoint, QFont, et al.
This is a step forward, the QtRuby project is now able to share bug 
introductions with PerlQt - way cool!

-- Richard


More information about the Kde-bindings mailing list