From a2ba574bc26fd7fb09fcc39f47128fdd2288a68d Mon Sep 17 00:00:00 2001 From: Nick Steeves Date: Tue, 4 Apr 2006 10:16:52 +0000 Subject: [PATCH] qt3: add patch (suggested by danm) to fix crashy behaviour --- qt3/.md5sum | 1 + qt3/0999_qt-3.3.5-qlistview.patch | 33 +++++++++++++++++++++++++++++++ qt3/Pkgfile | 7 +++++-- 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 qt3/0999_qt-3.3.5-qlistview.patch diff --git a/qt3/.md5sum b/qt3/.md5sum index 445643ed6..fc44e1074 100644 --- a/qt3/.md5sum +++ b/qt3/.md5sum @@ -1,3 +1,4 @@ +9d91c83f4addae1830c68c63b8aa806c 0999_qt-3.3.5-qlistview.patch 05d04688c0c0230ed54e89102d689ca4 qt-x11-free-3.3.5.tar.bz2 a0420bc8ef951b0299b6055043988211 qt3-3.3.5-2-patches.tar.bz2 7d8d3356a17201832e361df69c63e9a4 qt3-3.3.5-gcc4.patch diff --git a/qt3/0999_qt-3.3.5-qlistview.patch b/qt3/0999_qt-3.3.5-qlistview.patch new file mode 100644 index 000000000..0bda15b9e --- /dev/null +++ b/qt3/0999_qt-3.3.5-qlistview.patch @@ -0,0 +1,33 @@ +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; diff --git a/qt3/Pkgfile b/qt3/Pkgfile index 6f3ba5ad5..8a6eb96a5 100644 --- a/qt3/Pkgfile +++ b/qt3/Pkgfile @@ -5,10 +5,10 @@ name=qt3 version=3.3.5 -release=1 +release=2 source=(ftp://ftp.trolltech.com/qt/source/qt-x11-free-$version.tar.bz2 \ http://crux.danm.de/files/dist/$name/$version/$name-$version-2-patches.tar.bz2 \ - $name-$version-gcc4.patch) + $name-$version-gcc4.patch 0999_qt-3.3.5-qlistview.patch) build () { cd qt-x11-free-$version @@ -26,6 +26,9 @@ build () { SQL="-qt-sql-mysql -I/usr/include/mysql -L/usr/lib/mysql" fi + # fix serious, crashy bugs in widgets/qlistview.cpp + patch -p1 < $SRC/0999_qt-$version-qlistview.patch + if [ -d /usr/include/nvidia ]; then export CFLAGS="$CFLAGS -I/usr/include/nvidia" export CXXFLAGS="$CXXFLAGS -I/usr/include/nvidia"