[Qt] V1.66
zeljko
zeljko at holobit.net
Fri Oct 31 15:04:19 CET 2008
On Tuesday 30 September 2008 22:57, Den Jean wrote:
> Hi,
>
> V1.66: 30 Sep 2008: QPrinterInfo_availablePrinters
>
> This was a QList<T> where T was not an "int" or "QtClass *", but a
> "QtClass" The pascal compiler can ofcourse not deal with such a QtClass,
> therefore I needed to copy all QtClass to QtClass* -> So I did "new
> QtClass()" (call default constructor), to get a pointer to a QtClass, which
> is in pascal QtClassH.
>
> Due to the use of "new" -> you need to delete these classes after use.
>
>
> New Template copy code used for QPrinterInfo_availablePrinters:
> .........
> template <typename T>
> Q_OUTOFLINE_TEMPLATE void copyQListTemplateToPInts2(QList<T> &qi, PIntArray
> pi)
> {
> int len = qi.count();
> PTRINT *ints;
> setIntsLength(pi, len);
> ints = (PTRINT *)getIntsPtr(pi);
> for (int i = 0; i < len; i++)
> ints[i] = (PTRINT)(new T(qi[i]));
> }
> ............
This one is ok, just played a bit with 1.66
1.Lazarus crashes ... when started via startlazarus, due to thread switch ....
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1089158848 (LWP 16337)]
0x4017af38 in QRect::left () from /usr/lib/libqt4intf.so
(gdb) bt
#0 0x4017af38 in QRect::left () from /usr/lib/libqt4intf.so
#1 0x4017ae69 in copyPRectToQRect () from /usr/lib/libqt4intf.so
#2 0x40133a9c in QPainter_drawText6 () from /usr/lib/libqt4intf.so
#3 0x081f52a4 in TQTDEVICECONTEXT__DRAWTEXT (X=402, Y=282, W=43, H=17,
FLAGS=900, S=0xbfce7d58, this=0x410e32b0) at qtobjects.pas:1986
#4 0x081cf0f5 in TQTWIDGETSET__DRAWTEXT (DC=1091449520, STR=0x84f76ac,
COUNT=6, ARECT=
{LEFT = 402, TOP = 282, RIGHT = 445, BOTTOM = 299, TOPLEFT = {X = 402,
Y = 282}, BOTTOMRIGHT = {X = 445, Y = 299}}, FLAGS=2341,
this=0x410e3010) at qtwinapi.inc:1242
#5 0x08101485 in DRAWTEXT (DC=1091449520, STR=0x84f76ac, COUNT=6, RECT=
{LEFT = 402, TOP = 282, RIGHT = 445, BOTTOM = 299, TOPLEFT = {X = 402,
Y = 282}, BOTTOMRIGHT = {X = 445, Y = 299}}, FLAGS=2341)
at winapi.inc:211
#6 0x08113cd7 in TCANVAS__TEXTRECT (ARECT=
{LEFT = 402, TOP = 282, RIGHT = 445, BOTTOM = 299, TOPLEFT = {X = 402,
Y = 282}, BOTTOMRIGHT = {X = 445, Y = 299}}, X=397, Y=281,
TEXT=0x84f76ac, STYLE=
{ALIGNMENT = TACENTER, LAYOUT = TLCENTER, SINGLELINE = true, CLIPPING =
true, EXPANDTABS = false, SHOWPREFIX = false, WORDBREAK = false, OPAQUE =
false, SYSTEMFONT = false, RIGHTTOLEFT = false}, this=0x411ee0c0) at
canvas.inc:1129
#7 0x082026db in TSPLASHFORM__IMAGEPAINT (SENDER=0x41194670, this=0x41194240)
at splash.pp:117
#8 0x0814e0be in TGRAPHICCONTROL__PAINT (this=0x41194670) at
graphiccontrol.inc:90
#9 0x08165ef5 in TCUSTOMIMAGE__PAINT (this=0x41194670) at customimage.inc:245
#10 0x0814dff4 in TGRAPHICCONTROL__WMPAINT (MESSAGE={MSG = 66592, DC =
1091449520, PAINTSTRUCT = 0x0, RESULT = 0}, this=0x41194670)
at graphiccontrol.inc:64
#11 0x08065959 in SYSTEM_TOBJECT_$__DISPATCH$formal ()
#12 0x0814df60 in TGRAPHICCONTROL__DESTROY (vmt=0xbfce7f84, this=0x41194670)
at graphiccontrol.inc:46
it doesn't happend with 1.62 , even if we use Qt-4.3.XX. so something with
1.66 could be wrong.
More information about the Qt
mailing list