Subject: | [WORKARROUND for qt4.5, ubuntu 9.04-amd64] see workarround ticket in QtCore, THEN use this fix |
*BEWARE* This is not a real workarround, it just brings the package to a
compilable/testable state - same as the described QtCore (See its
tickets by muenalan).
See:
root@quicksilver:~/.cpan/build/QtGui-4.004-bnuQbX# ls *~
QGraphicsSceneEvent.xs~ QGraphicsScene.xs~ QInputEvent.xs~ typemap~
As in QtCore, qt4.5 api changes introduced some error messages which can
be circumvented. For instance
(3) qt4.5 deprecated QUpdateLaterEvent class
(4) qt4.5 introdcued QGraphicsWidget
This fix is still defunct, as my QtCore workarround. Although all
examples provided in the examples/ directory work, all crash when
quitting the program with an invalid free()'d point message.
root@quicksilver:~/.cpan/build/QtGui-4.004-bnuQbX/examples/desktop/screenshot#
perl main.pl
*** glibc detected *** perl: free(): invalid pointer: 0x00007f94ba996320 ***
======= Backtrace: =========
/lib/libc.so.6[0x7f94bb6c0cb8]
/lib/libc.so.6(cfree+0x76)[0x7f94bb6c3276]
/usr/lib/libperl.so.5.10(perl_destruct+0x136d)[0x7f94bc10b78d]
perl(main+0xb3)[0x400d23]
/lib/libc.so.6(__libc_start_main+0xe6)[0x7f94bb6675a6]
perl[0x400ba9]
Still, everything else looks nice/impressive (See attached screenshot
example)! This package should be very usefull when these minor issues
are fixed. The approach of the auto-generated perl interface directly
from the qt api is surely very robust and the future for a stable perl
qt binding.
cheers,
muenalan
(1) Add extra includes to QGraphicsScene.xs (no patch at hand here)
where #define QT_NO_MEMBER_TEMPLATES ...
< #include <QtGui/qpalette.h>
< #include <QtCore/qsize.h>
(2)
root@quicksilver:~/.cpan/build/QtGui-4.004-bnuQbX# diff
QGraphicsSceneEvent.xs QGraphicsSceneEvent.xs~
21d20
< #include <QtCore/qsize.h>
(3) Strip off qt4.5 deprecated Qt::QUpdateLaterEvent class
root@quicksilver:~/.cpan/build/QtGui-4.004-bnuQbX# diff QInputEvent.xs
QInputEvent.xs~
819a820,851
Show quoted text
> MODULE = Qt::QInputEvent PACKAGE = Qt::QUpdateLaterEvent
>
> PROTOTYPES: DISABLE
>
> SV *
> new(QRegion *paintRegion)
> CODE:
> QUpdateLaterEvent * out_data;
> out_data = new QUpdateLaterEvent( *paintRegion );
> RETVAL = class2pobj(PTR2IV(out_data), "Qt::QUpdateLaterEvent", 1);
> OUTPUT:
> RETVAL
>
>
> SV *
> QUpdateLaterEvent::region()
> CODE:
> const QRegion * out_data;
> out_data = &( THIS->region( ) );
> RETVAL = class2pobj(PTR2IV(out_data), "Qt::QRegion", 0);
> OUTPUT:
> RETVAL
>
>
> void
> QUpdateLaterEvent::DESTROY()
> CODE:
> SV **ssv = hv_fetch((HV*)SvRV(ST(0)), "_del", 4, 0);
> if ( SvIV(*ssv) ) {
> delete THIS;
> };
>
(4)
root@quicksilver:~/.cpan/build/QtGui-4.004-bnuQbX# diff typemap typemap~
1a2
< QGraphicsWidget * O_OBJECT
Subject: | ubuntu9.04-qt4.5-QtGui-screenshot-example.png |