34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
|
Hi,
|
||
|
|
||
|
I finally figure out why kxmame mysteriously crashes using qt 3.3.5. This
|
||
|
is because QListView::clear() method doesn't reset d->highlighted to NULL.
|
||
|
|
||
|
This means that after a few tries of clearing and repopulating the item
|
||
|
list, d->highlighted might point to an invalid location. When
|
||
|
QListViewItem::takeItem is called, d->highlighted is used and causes
|
||
|
crash. Remarkably, due to the way it's coded, this bug doesn't appear in
|
||
|
Qt 3.3.4.
|
||
|
|
||
|
I included the fix patch below for your information. I don't want to
|
||
|
subscribe to another qt-devel list to send this bug info. So if anyone
|
||
|
here can help sending this patch to the proper place, please do.
|
||
|
|
||
|
Thanks a lot,
|
||
|
Toan
|
||
|
|
||
|
|
||
|
diff -uBbr qt-x11-free-3.3.5-old/src/widgets/qlistview.cpp
|
||
|
qt-x11-free-3.3.5/src/widgets/qlistview.cpp
|
||
|
--- qt-x11-free-3.3.5-old/src/widgets/qlistview.cpp 2005-09-02
|
||
|
05:43:15.000000000 -0700
|
||
|
+++ qt-x11-free-3.3.5/src/widgets/qlistview.cpp 2005-11-04
|
||
|
04:07:40.000000000 -0800
|
||
|
@@ -3231,6 +3231,7 @@
|
||
|
d->focusItem = 0;
|
||
|
d->selectAnchor = 0;
|
||
|
d->pressedItem = 0;
|
||
|
+ d->highlighted = 0;
|
||
|
|
||
|
// if it's down its downness makes no sense, so undown it
|
||
|
d->buttonDown = FALSE;
|