summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaleb Tennis <caleb@gentoo.org>2003-09-19 17:37:38 +0000
committerCaleb Tennis <caleb@gentoo.org>2003-09-19 17:37:38 +0000
commit2a54bfc11cbdbca58489147c7fddfb4854291945 (patch)
tree471258c3fb57d58c6f67e3acd727fca53b4df4b8 /x11-libs/qt
parentoops someone forgot me ! (diff)
downloadgentoo-2-2a54bfc11cbdbca58489147c7fddfb4854291945.tar.gz
gentoo-2-2a54bfc11cbdbca58489147c7fddfb4854291945.tar.bz2
gentoo-2-2a54bfc11cbdbca58489147c7fddfb4854291945.zip
lots of patch files
Diffstat (limited to 'x11-libs/qt')
-rw-r--r--x11-libs/qt/ChangeLog7
-rw-r--r--x11-libs/qt/Manifest58
-rw-r--r--x11-libs/qt/files/0001-dnd_optimization.patch187
-rw-r--r--x11-libs/qt/files/0002-dnd_active_window_fix.patch189
-rw-r--r--x11-libs/qt/files/0003-qmenubar_fitts_law.patch29
-rw-r--r--x11-libs/qt/files/0004-qiconview_etc_ctrl_selecting.patch46
-rw-r--r--x11-libs/qt/files/0009-window_group.patch91
-rw-r--r--x11-libs/qt/files/0011-listview_keys.patch62
-rw-r--r--x11-libs/qt/files/0013-qtabwidget-less_flicker.patch87
-rw-r--r--x11-libs/qt/files/0014-qiconview-autoscroll.patch50
-rw-r--r--x11-libs/qt/files/0015-qiconview-finditem.patch43
-rw-r--r--x11-libs/qt/files/0016-qiconview-rebuildcontainer.patch34
-rw-r--r--x11-libs/qt/files/0017-qiconview-ctrl_rubber.patch90
-rw-r--r--x11-libs/qt/files/0018-qlistview-paintcell.patch31
-rw-r--r--x11-libs/qt/files/0019-qlistview-adjustcolumn.patch42
-rw-r--r--x11-libs/qt/files/0020-designer-deletetabs.patch76
-rw-r--r--x11-libs/qt/files/0021-qiconview-dragalittle.patch57
-rw-r--r--x11-libs/qt/files/0022-qdragobject-hotspot.patch41
-rw-r--r--x11-libs/qt/files/0023-qstring-crash.patch35
-rw-r--r--x11-libs/qt/files/0024-fix_enter_leave_notify.patch32
-rw-r--r--x11-libs/qt/files/digest-qt-3.2.12
-rw-r--r--x11-libs/qt/files/digest-qt-3.2.1-r11
-rw-r--r--x11-libs/qt/qt-3.2.1-r1.ebuild195
23 files changed, 1464 insertions, 21 deletions
diff --git a/x11-libs/qt/ChangeLog b/x11-libs/qt/ChangeLog
index e9e384bc83f6..9961d109a1ef 100644
--- a/x11-libs/qt/ChangeLog
+++ b/x11-libs/qt/ChangeLog
@@ -1,10 +1,15 @@
# ChangeLog for x11-libs/qt
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt/ChangeLog,v 1.85 2003/09/19 17:08:29 weeve Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt/ChangeLog,v 1.86 2003/09/19 17:37:30 caleb Exp $
19 Sep 2003; Jason Wever <weeve@gentoo.org> qt-3.2.1.ebuild:
Added ~sparc keyword
+qt-3.2.1-r1 (19 Sep 2003)
+
+ 19 Sep 2003; Caleb Tennis <caleb@gentoo.org> qt-3.2.1-r1.ebuild:
+ Add in some patches from KDE's qt-copy. Fixes bugs for many people.
+
16 Sep 2003; Caleb Tennis <caleb@gentoo.org> qt-3.2.1.ebuild:
Fix for sandbox violation, and compile fixes...
diff --git a/x11-libs/qt/Manifest b/x11-libs/qt/Manifest
index a9b5e046935e..f64f117dc4f2 100644
--- a/x11-libs/qt/Manifest
+++ b/x11-libs/qt/Manifest
@@ -1,34 +1,54 @@
-MD5 97baca3690c65d96423015c710d7ca32 ChangeLog 14212
-MD5 512150b47a904b0240101e319856aab1 metadata.xml 156
+MD5 232c9a440f58d6f1a15c750ba4a25c48 qt-3.1.2-r3.ebuild 4979
MD5 3ea4b4de8bf408a89bad7560499c5517 qt-2.3.2-r1.ebuild 2274
+MD5 c47d4bd47ef74b87a7eaa1c5969ec48e qt-3.2.1.ebuild 4937
+MD5 59266e67f6446b3a0a0fe31068d75f04 qt-3.2.1-r1.ebuild 5824
MD5 a3dd25c9f882f04df789dddc02ed3177 qt-3.0.5-r2.ebuild 3896
MD5 00e9d63f2373eecbf8d070845e3ed794 qt-3.1.0-r3.ebuild 4698
-MD5 b1227e9708a51d583e96b533764e5f5c qt-3.1.1-r2.ebuild 4510
-MD5 232c9a440f58d6f1a15c750ba4a25c48 qt-3.1.2-r3.ebuild 4979
MD5 aff33d960efe2f7ef7782bd0a7cc9441 qt-3.1.2-r4.ebuild 5340
+MD5 b1227e9708a51d583e96b533764e5f5c qt-3.1.1-r2.ebuild 4510
MD5 c2026904ef73059c2f6e8138d2d62caa qt-3.2.0.ebuild 4339
-MD5 c47d4bd47ef74b87a7eaa1c5969ec48e qt-3.2.1.ebuild 4937
-MD5 08cdd879d3418837cf4bad594dc0f91f files/45qtdir2 16
+MD5 8d35ae868d401a33e6b6335e81a9c7ca ChangeLog 14378
+MD5 512150b47a904b0240101e319856aab1 metadata.xml 156
+MD5 f036a81a9440e146ca67fb23dbb2b535 files/0013-qtabwidget-less_flicker.patch 2785
+MD5 8ffca1b1b7523339af04fd24b4595ce4 files/0001-dnd_optimization.patch 5623
+MD5 8b3da5dae8babfcbdee3be465579d6c2 files/0002-dnd_active_window_fix.patch 7289
MD5 2d5b68b38185a30a28ffb2b652258cb8 files/45qt3 83
-MD5 7dc4f78d52452c28ba797ffc7db34f23 files/50qtdir3 16
MD5 7a287bc7609ad2420f70af6d4c58302f files/50qt2 63
-MD5 1da4214f7cf90d34592e0453f47b4758 files/designer.diff 380
-MD5 037b7ee164790946df6a2d6ea89f01fc files/digest-qt-2.3.2-r1 65
+MD5 65c6cd464a60955c85a85b1dfd487c04 files/0004-qiconview_etc_ctrl_selecting.patch 2207
+MD5 edd5c27031cc5f29070a9094425f09d9 files/digest-qt-3.2.0 72
+MD5 89e3274d3b0079fdcfea7606de13360e files/digest-qt-3.2.1 78
+MD5 e4054a5914b182318d548c53beea9590 files/0020-designer-deletetabs.patch 3493
+MD5 c6dc1b6fadcb4897d4c7b0a768c2d196 files/qt-3.1.2-r3-qsocket.diff 447
+MD5 0c06df8bd83ccf54e9045ef5703a1703 files/0024-fix_enter_leave_notify.patch 1374
+MD5 04fdd1779f4aca06b809528a2d0bad7a files/qt-3.1.2-coreutils-fixup.patch 4203
+MD5 b87df8ba9bf813ffe5e280fa2d79da25 files/qt-3.1.2-qpsprinter-ttc-otf-italic-20030429.patch 19286
+MD5 08fa63b47b7a7cf4886c151e1ce0e33f files/0022-qdragobject-hotspot.patch 1266
+MD5 001400cb2710d783deb4380ca6056bc2 files/qsocket-3.1.2.diff 3136
MD5 c8a8d41028d22397dcc86041f1856a79 files/digest-qt-3.0.5-r2 71
MD5 52e7df9b93f281c262716caac4cb7705 files/digest-qt-3.1.0-r3 72
MD5 cfa73af7c2f2661be4ea9f3c9347db84 files/digest-qt-3.1.1-r2 72
MD5 f197d87f2b33685cadba08c9cf2d08ee files/digest-qt-3.1.2-r3 72
MD5 f197d87f2b33685cadba08c9cf2d08ee files/digest-qt-3.1.2-r4 72
-MD5 edd5c27031cc5f29070a9094425f09d9 files/digest-qt-3.2.0 72
-MD5 001400cb2710d783deb4380ca6056bc2 files/qsocket-3.1.2.diff 3136
-MD5 39f840d6723a7e898394bc84efb224a2 files/qt-3.1.0-minimized.diff 272
-MD5 04fdd1779f4aca06b809528a2d0bad7a files/qt-3.1.2-coreutils-fixup.patch 4203
-MD5 953be971128fb1a5ad7d9893f657e13c files/qt-3.1.2-korean-xim.patch 4285
-MD5 bf7aed227565288222ea889c81b1e363 files/qt-3.1.2-qlistview-dnd.diff 469
-MD5 e9b2e2fbde862abb62cdfa78e62a35b6 files/qt-3.1.2-qmlined.diff 320
-MD5 c6dc1b6fadcb4897d4c7b0a768c2d196 files/qt-3.1.2-r3-qsocket.diff 447
+MD5 89e3274d3b0079fdcfea7606de13360e files/digest-qt-3.2.1-r1 78
MD5 024632ca815ede1ccdd13cacea10e64a files/qt-3.1.2-thai-complextext.patch 528
+MD5 1a268563c150260e99ed24dd4d2f5fd0 files/0021-qiconview-dragalittle.patch 2341
+MD5 1da4214f7cf90d34592e0453f47b4758 files/designer.diff 380
+MD5 1629e8691d2921d8651788fc0499379e files/0015-qiconview-finditem.patch 1496
+MD5 cb961de2c2123caa01b045da33a3da21 files/0003-qmenubar_fitts_law.patch 979
+MD5 f203b47b8d1425047e0e301cb7d68eed files/0023-qstring-crash.patch 950
+MD5 ac9d015b2aca3f99a110d486b5232fad files/0009-window_group.patch 4156
+MD5 7dc4f78d52452c28ba797ffc7db34f23 files/50qtdir3 16
+MD5 2ba63844ecf426956135397f5eb845b4 files/0016-qiconview-rebuildcontainer.patch 1211
+MD5 91372ac45b85140af55a26498293e4ff files/0017-qiconview-ctrl_rubber.patch 3443
+MD5 08cdd879d3418837cf4bad594dc0f91f files/45qtdir2 16
+MD5 e9b2e2fbde862abb62cdfa78e62a35b6 files/qt-3.1.2-qmlined.diff 320
+MD5 953be971128fb1a5ad7d9893f657e13c files/qt-3.1.2-korean-xim.patch 4285
+MD5 3caa2fcd52c019652d8f73cd957ad85c files/0019-qlistview-adjustcolumn.patch 1508
MD5 e4b92fbf81b7fc94c5d337e1675476d7 files/qt-x11-free-3.0.5-ko_input.patch 12682
-MD5 b79277b535797e854be75d1c396de0f2 files/digest-qt-3.2.1 72
+MD5 3b9e1d14819114b64b8bf770e1a474cd files/0011-listview_keys.patch 2520
+MD5 037b7ee164790946df6a2d6ea89f01fc files/digest-qt-2.3.2-r1 65
MD5 8c9b47edf5949643d8dbeb3fecc40e7c files/qt-3.1.2-qfont-jp-family-subst-20030421.patch 22730
-MD5 b87df8ba9bf813ffe5e280fa2d79da25 files/qt-3.1.2-qpsprinter-ttc-otf-italic-20030429.patch 19286
+MD5 bf7aed227565288222ea889c81b1e363 files/qt-3.1.2-qlistview-dnd.diff 469
+MD5 cf7fad8d582c6b517b3555aba4e26fd1 files/0018-qlistview-paintcell.patch 1442
+MD5 39f840d6723a7e898394bc84efb224a2 files/qt-3.1.0-minimized.diff 272
+MD5 5469328b9b6197e8bbfbe3e1528e61ca files/0014-qiconview-autoscroll.patch 1915
diff --git a/x11-libs/qt/files/0001-dnd_optimization.patch b/x11-libs/qt/files/0001-dnd_optimization.patch
new file mode 100644
index 000000000000..d9de28464178
--- /dev/null
+++ b/x11-libs/qt/files/0001-dnd_optimization.patch
@@ -0,0 +1,187 @@
+qt-bugs@ issue : 16115
+applied: no
+author: Lubos Lunak <l.lunak@kde.org>
+
+See http://lists.kde.org/?t=104388858900001&r=1&w=2
+
+
+--- src/kernel/qdnd_x11.cpp.sav 2003-02-05 16:09:45.000000000 +0100
++++ src/kernel/qdnd_x11.cpp 2003-02-07 16:14:49.000000000 +0100
+@@ -49,13 +49,15 @@
+ #include "qdragobject.h"
+ #include "qobjectlist.h"
+ #include "qcursor.h"
++#include "qbitmap.h"
++#include "qpainter.h"
+
+ #include "qt_x11_p.h"
+
+ // conflict resolution
+
+-// unused, may be used again later: const int XKeyPress = KeyPress;
+-// unused, may be used again later: const int XKeyRelease = KeyRelease;
++const int XKeyPress = KeyPress;
++const int XKeyRelease = KeyRelease;
+ #undef KeyPress
+ #undef KeyRelease
+
+@@ -249,20 +251,47 @@ class QShapedPixmapWidget : public QWidg
+ public:
+ QShapedPixmapWidget(int screen = -1) :
+ QWidget(QApplication::desktop()->screen( screen ),
+- 0, WStyle_Customize | WStyle_Tool | WStyle_NoBorder | WX11BypassWM )
++ 0, WStyle_Customize | WStyle_Tool | WStyle_NoBorder | WX11BypassWM ), oldpmser( 0 ), oldbmser( 0 )
+ {
+ }
+
+- void setPixmap(QPixmap pm)
++ void setPixmap(QPixmap pm, QPoint hot)
+ {
+- if ( pm.mask() ) {
++ int bmser = pm.mask() ? pm.mask()->serialNumber() : 0;
++ if( oldpmser == pm.serialNumber() && oldbmser == bmser
++ && oldhot == hot )
++ return;
++ oldpmser = pm.serialNumber();
++ oldbmser = bmser;
++ oldhot = hot;
++ bool hotspot_in = !(hot.x() < 0 || hot.y() < 0 || hot.x() >= pm.width() || hot.y() >= pm.height());
++// if the pixmap has hotspot in its area, make a "hole" in it at that position
++// this will allow XTranslateCoordinates() to find directly the window below the cursor instead
++// of finding this pixmap, and therefore there won't be needed any (slow) search for the window
++// using findRealWindow()
++ if( hotspot_in ) {
++ QBitmap mask = pm.mask() ? *pm.mask() : QBitmap( pm.width(), pm.height());
++ if( !pm.mask())
++ mask.fill( Qt::color1 );
++ QPainter p( &mask );
++ p.setPen( Qt::color0 );
++ p.drawPoint( hot.x(), hot.y());
++ p.end();
++ pm.setMask( mask );
++ setMask( mask );
++ } else if ( pm.mask() ) {
+ setMask( *pm.mask() );
+ } else {
+ clearMask();
+ }
+ resize(pm.width(),pm.height());
+ setErasePixmap(pm);
++ erase();
+ }
++private:
++ int oldpmser;
++ int oldbmser;
++ QPoint oldhot;
+ };
+
+ QShapedPixmapWidget * qt_xdnd_deco = 0;
+@@ -859,6 +888,45 @@ void QDragManager::timerEvent( QTimerEve
+ move( QCursor::pos() );
+ }
+
++static bool qt_xdnd_was_move = false;
++static bool qt_xdnd_found = false;
++// check whole incoming X queue for move events
++// checking whole queue is done by always returning False in the predicate
++// if there's another move event in the queue, and there's not a mouse button
++// or keyboard or ClientMessage event before it, the current move event
++// may be safely discarded
++// this helps avoiding being overloaded by being flooded from many events
++// from the XServer
++static
++Bool qt_xdnd_predicate( Display*, XEvent* ev, XPointer )
++{
++ if( qt_xdnd_found )
++ return False;
++ if( ev->type == MotionNotify )
++ {
++ qt_xdnd_was_move = true;
++ qt_xdnd_found = true;
++ }
++ if( ev->type == ButtonPress || ev->type == ButtonRelease
++ || ev->type == XKeyPress || ev->type == XKeyRelease
++ || ev->type == ClientMessage )
++ {
++ qt_xdnd_was_move = false;
++ qt_xdnd_found = true;
++ }
++ return False;
++}
++
++static
++bool qt_xdnd_another_movement()
++{
++ qt_xdnd_was_move = false;
++ qt_xdnd_found = false;
++ XEvent dummy;
++ XCheckIfEvent( qt_xdisplay(), &dummy, qt_xdnd_predicate, NULL );
++ return qt_xdnd_was_move;
++}
++
+ bool QDragManager::eventFilter( QObject * o, QEvent * e)
+ {
+ if ( beingCancelled ) {
+@@ -881,8 +949,10 @@ bool QDragManager::eventFilter( QObject
+
+ if ( e->type() == QEvent::MouseMove ) {
+ QMouseEvent* me = (QMouseEvent *)e;
+- updateMode(me->stateAfter());
+- move( me->globalPos() );
++ if( !qt_xdnd_another_movement()) {
++ updateMode(me->stateAfter());
++ move( me->globalPos() );
++ }
+ return TRUE;
+ } else if ( e->type() == QEvent::MouseButtonRelease ) {
+ qApp->removeEventFilter( this );
+@@ -1106,7 +1176,7 @@ void QDragManager::move( const QPoint &
+ delete qt_xdnd_deco;
+ qt_xdnd_deco = new QShapedPixmapWidget( screen );
+ }
+- updatePixmap();
++ updatePixmap( globalPos );
+
+ if ( qt_xdnd_source_sameanswer.contains( globalPos ) &&
+ qt_xdnd_source_sameanswer.isValid() ) {
+@@ -1679,7 +1749,7 @@ bool QDragManager::drag( QDragObject * o
+ // qt_xdnd_source_object persists until we get an xdnd_finish message
+ }
+
+-void QDragManager::updatePixmap()
++void QDragManager::updatePixmap( const QPoint& cursorPos )
+ {
+ if ( qt_xdnd_deco ) {
+ QPixmap pm;
+@@ -1694,9 +1764,8 @@ void QDragManager::updatePixmap()
+ defaultPm = new QPixmap(default_pm);
+ pm = *defaultPm;
+ }
+- qt_xdnd_deco->setPixmap(pm);
+- qt_xdnd_deco->move(QCursor::pos()-pm_hot);
+- qt_xdnd_deco->repaint(FALSE);
++ qt_xdnd_deco->setPixmap(pm, pm_hot);
++ qt_xdnd_deco->move(cursorPos-pm_hot);
+ //if ( willDrop ) {
+ qt_xdnd_deco->show();
+ //} else {
+@@ -1705,4 +1774,9 @@ void QDragManager::updatePixmap()
+ }
+ }
+
++void QDragManager::updatePixmap()
++{
++ updatePixmap( QCursor::pos());
++}
++
+ #endif // QT_NO_DRAGANDDROP
+--- src/kernel/qdragobject.h.sav 2002-11-01 19:25:07.000000000 +0100
++++ src/kernel/qdragobject.h 2001-01-01 01:01:00.000000000 +0100
+@@ -245,6 +245,7 @@ private:
+ void move( const QPoint & );
+ void drop();
+ void updatePixmap();
++ void updatePixmap( const QPoint& cursorPos );
+
+ private:
+ QDragObject * object;
diff --git a/x11-libs/qt/files/0002-dnd_active_window_fix.patch b/x11-libs/qt/files/0002-dnd_active_window_fix.patch
new file mode 100644
index 000000000000..4b497d64f65f
--- /dev/null
+++ b/x11-libs/qt/files/0002-dnd_active_window_fix.patch
@@ -0,0 +1,189 @@
+qt-bugs@ issue : 25122
+applied: no
+author: Lubos Lunak <l.lunak@kde.org>
+
+ Hello,
+
+ for example: Open Konqueror window, showing some files. Start dragging one
+ desktop icon. If you press/release Ctrl, there'll be a '+' attached to the
+ icon, showing the DND operation. Now, while still doing DND, make the
+ Konqueror window active (Alt+Tab with KDE-3.1.2+, hover over its taskbar
+ entry, Ctrl+Fn to switch to a different virtual desktop, etc.). As soon as
+ the app performing DND is not the active application, and the mouse is not
+ moving, pressing/releasing Ctrl doesn't do anything, the state only updates
+ when the mouse is moved.
+
+ This is caused by the fact that Qt has only pointer grab when doing DND, but
+ doesn't have keyboard grab. I actually consider this a good thing, because
+ the only keys important for DND are modifiers, and they come together with
+ pointer events, and not having keyboard grab allows using keyboard shortcuts
+ like Alt+Tab while DND. However, when the mouse is not moved, and only a
+ modifier key is pressed/released, the app won't get any mouse event, and
+ won't also get the keyboard event.
+
+ The attached patch changes Qt to explicitly check the modifiers state using
+ XQueryPointer() if there's wasn't recently any mouse/keyboard event, which
+ ensures the state is updated even in the situation described above.
+
+--- src/kernel/qapplication_x11.cpp.sav 2003-06-21 12:31:35.000000000 +0200
++++ src/kernel/qapplication_x11.cpp 2003-06-21 12:35:44.000000000 +0200
+@@ -4053,7 +4053,7 @@ void QApplication::closePopup( QWidget *
+ // Keyboard event translation
+ //
+
+-static int translateButtonState( int s )
++int qt_x11_translateButtonState( int s )
+ {
+ int bst = 0;
+ if ( s & Button1Mask )
+@@ -4119,7 +4119,7 @@ bool QETWidget::translateMouseEvent( con
+ pos.ry() = lastMotion.y;
+ globalPos.rx() = lastMotion.x_root;
+ globalPos.ry() = lastMotion.y_root;
+- state = translateButtonState( lastMotion.state );
++ state = qt_x11_translateButtonState( lastMotion.state );
+ if ( qt_button_down && (state & (LeftButton |
+ MidButton |
+ RightButton ) ) == 0 )
+@@ -4143,7 +4143,7 @@ bool QETWidget::translateMouseEvent( con
+ pos.ry() = xevent->xcrossing.y;
+ globalPos.rx() = xevent->xcrossing.x_root;
+ globalPos.ry() = xevent->xcrossing.y_root;
+- state = translateButtonState( xevent->xcrossing.state );
++ state = qt_x11_translateButtonState( xevent->xcrossing.state );
+ if ( qt_button_down && (state & (LeftButton |
+ MidButton |
+ RightButton ) ) == 0 )
+@@ -4155,7 +4155,7 @@ bool QETWidget::translateMouseEvent( con
+ pos.ry() = event->xbutton.y;
+ globalPos.rx() = event->xbutton.x_root;
+ globalPos.ry() = event->xbutton.y_root;
+- state = translateButtonState( event->xbutton.state );
++ state = qt_x11_translateButtonState( event->xbutton.state );
+ switch ( event->xbutton.button ) {
+ case Button1: button = LeftButton; break;
+ case Button2: button = MidButton; break;
+@@ -4950,7 +4950,7 @@ bool QETWidget::translateKeyEventInterna
+ XKeyEvent xkeyevent = event->xkey;
+
+ // save the modifier state, we will use the keystate uint later by passing
+- // it to translateButtonState
++ // it to qt_x11_translateButtonState
+ uint keystate = event->xkey.state;
+ // remove the modifiers where mode_switch exists... HPUX machines seem
+ // to have alt *AND* mode_switch both in Mod1Mask, which causes
+@@ -5064,7 +5064,7 @@ bool QETWidget::translateKeyEventInterna
+ }
+ #endif // !QT_NO_XIM
+
+- state = translateButtonState( keystate );
++ state = qt_x11_translateButtonState( keystate );
+
+ static int directionKeyEvent = 0;
+ if ( qt_use_rtl_extensions && type == QEvent::KeyRelease ) {
+--- src/kernel/qdnd_x11.cpp.sav 2003-06-30 15:26:42.000000000 +0200
++++ src/kernel/qdnd_x11.cpp 2003-06-30 15:32:23.000000000 +0200
+@@ -114,6 +114,8 @@ Atom qt_xdnd_finished;
+ Atom qt_xdnd_type_list;
+ const int qt_xdnd_version = 4;
+
++extern int qt_x11_translateButtonState( int s );
++
+ // Actions
+ //
+ // The Xdnd spec allows for user-defined actions. This could be implemented
+@@ -198,6 +200,8 @@ static Atom qt_xdnd_source_current_time;
+ static int qt_xdnd_current_screen = -1;
+ // state of dragging... true if dragging, false if not
+ bool qt_xdnd_dragging = FALSE;
++// need to check state of keyboard modifiers
++static bool need_modifiers_check = FALSE;
+
+ // dict of payload data, sorted by type atom
+ static QIntDict<QByteArray> * qt_xdnd_target_data = 0;
+@@ -879,8 +883,20 @@ void qt_handle_xdnd_finished( QWidget *,
+
+ void QDragManager::timerEvent( QTimerEvent* e )
+ {
+- if ( e->timerId() == heartbeat && qt_xdnd_source_sameanswer.isNull() )
+- move( QCursor::pos() );
++ if ( e->timerId() == heartbeat ) {
++ if( need_modifiers_check ) {
++ Window root, child;
++ int root_x, root_y, win_x, win_y;
++ unsigned int mask;
++ XQueryPointer( qt_xdisplay(), qt_xrootwin( qt_xdnd_current_screen ),
++ &root, &child, &root_x, &root_y, &win_x, &win_y, &mask );
++ if( updateMode( (ButtonState)qt_x11_translateButtonState( mask )))
++ qt_xdnd_source_sameanswer = QRect(); // force move
++ }
++ need_modifiers_check = TRUE;
++ if( qt_xdnd_source_sameanswer.isNull() )
++ move( QCursor::pos() );
++ }
+ }
+
+ static bool qt_xdnd_was_move = false;
+@@ -948,6 +964,7 @@ bool QDragManager::eventFilter( QObject
+ updateMode(me->stateAfter());
+ move( me->globalPos() );
+ }
++ need_modifiers_check = FALSE;
+ return TRUE;
+ } else if ( e->type() == QEvent::MouseButtonRelease ) {
+ qApp->removeEventFilter( this );
+@@ -986,9 +1003,11 @@ bool QDragManager::eventFilter( QObject
+ beingCancelled = FALSE;
+ qApp->exit_loop();
+ } else {
+- updateMode(ke->stateAfter());
+- qt_xdnd_source_sameanswer = QRect(); // force move
+- move( QCursor::pos() );
++ if( updateMode(ke->stateAfter())) {
++ qt_xdnd_source_sameanswer = QRect(); // force move
++ move( QCursor::pos() );
++ }
++ need_modifiers_check = FALSE;
+ }
+ return TRUE; // Eat all key events
+ }
+@@ -1014,10 +1033,10 @@ bool QDragManager::eventFilter( QObject
+
+
+ static Qt::ButtonState oldstate;
+-void QDragManager::updateMode( ButtonState newstate )
++bool QDragManager::updateMode( ButtonState newstate )
+ {
+ if ( newstate == oldstate )
+- return;
++ return false;
+ const int both = ShiftButton|ControlButton;
+ if ( (newstate & both) == both ) {
+ global_requested_action = QDropEvent::Link;
+@@ -1041,6 +1060,7 @@ void QDragManager::updateMode( ButtonSta
+ }
+ }
+ oldstate = newstate;
++ return true;
+ }
+
+
+@@ -1707,6 +1727,7 @@ bool QDragManager::drag( QDragObject * o
+ qt_xdnd_source_sameanswer = QRect();
+ move(QCursor::pos());
+ heartbeat = startTimer(200);
++ need_modifiers_check = FALSE;
+
+ #ifndef QT_NO_CURSOR
+ qApp->setOverrideCursor( arrowCursor );
+--- src/kernel/qdragobject.h.sav 2003-05-19 22:34:43.000000000 +0200
++++ src/kernel/qdragobject.h 2001-01-01 01:01:00.000000000 +0100
+@@ -248,7 +248,7 @@ private:
+
+ private:
+ QDragObject * object;
+- void updateMode( ButtonState newstate );
++ bool updateMode( ButtonState newstate );
+ void updateCursor();
+
+ QWidget * dragSource;
diff --git a/x11-libs/qt/files/0003-qmenubar_fitts_law.patch b/x11-libs/qt/files/0003-qmenubar_fitts_law.patch
new file mode 100644
index 000000000000..65a336d64bcd
--- /dev/null
+++ b/x11-libs/qt/files/0003-qmenubar_fitts_law.patch
@@ -0,0 +1,29 @@
+qt-bugs@ issue : 20185
+applied: no
+author: Lubos Lunak <l.lunak@kde.org>
+
+Original version rejected (it looked a bit scary ;) ), I got no reply for
+this one yet.
+
+--- src/widgets/qmenubar.cpp.sav 2003-03-04 16:05:44.000000000 +0100
++++ src/widgets/qmenubar.cpp 2003-05-06 17:09:18.000000000 +0200
+@@ -1029,12 +1029,18 @@ QRect QMenuBar::itemRect( int index )
+ it is a separator item.
+ */
+
+-int QMenuBar::itemAtPos( const QPoint &pos )
++int QMenuBar::itemAtPos( const QPoint &pos_ )
+ {
+ calculateRects();
+ if ( !irects )
+ return -1;
+ int i = 0;
++ QPoint pos = pos_;
++ // Fitts' Law for edges - compensate for the extra margin
++ // added in calculateRects()
++ const int margin = 2;
++ pos.setX( QMAX( margin, QMIN( width() - margin, pos.x())));
++ pos.setY( QMAX( margin, QMIN( height() - margin, pos.y())));
+ while ( i < (int)mitems->count() ) {
+ if ( !irects[i].isEmpty() && irects[i].contains( pos ) ) {
+ QMenuItem *mi = mitems->at(i);
diff --git a/x11-libs/qt/files/0004-qiconview_etc_ctrl_selecting.patch b/x11-libs/qt/files/0004-qiconview_etc_ctrl_selecting.patch
new file mode 100644
index 000000000000..b79cbdf15282
--- /dev/null
+++ b/x11-libs/qt/files/0004-qiconview_etc_ctrl_selecting.patch
@@ -0,0 +1,46 @@
+qt-bugs@ issue : 21920 (part of)
+applied: no
+author: Lubos Lunak <l.lunak@kde.org>
+
+ Run e.g. the iconview example, and try to select
+ items 2, 4 and 6-32 (in this order) only with keyboard. Item 2 can be
+ selected normally, 4 can be selected by holding Ctrl, moving to that item and
+ pressing space, but going to 6, pressing Shift (while Ctrl is still pressed)
+ doesn't work, because it unselects previously selected items. The attached
+ patches for QListBox, QListView and QIconView seem to fix this problem, so
+ that Shift+arrows selecting doesn't unselect anything if Ctrl is pressed.
+
+
+--- src/iconview/qiconview.cpp.sav 2003-03-04 16:05:25.000000000 +0100
++++ src/iconview/qiconview.cpp 2003-05-06 15:22:14.000000000 +0200
+@@ -6266,7 +6266,7 @@ void QIconView::handleItemChange( QIconV
+ item->selected = TRUE;
+ selectedRect = selectedRect.unite( item->rect() );
+ }
+- } else if ( item->selected ) {
++ } else if ( item->selected && !control ) {
+ item->selected = FALSE;
+ unselectedRect = unselectedRect.unite( item->rect() );
+ changed = TRUE;
+--- src/widgets/qlistbox.cpp.sav 2003-03-04 16:05:43.000000000 +0100
++++ src/widgets/qlistbox.cpp 2003-05-06 15:20:24.000000000 +0200
+@@ -4540,7 +4540,7 @@ void QListBox::handleItemChange( QListBo
+ } else if ( d->selectionMode == Extended ) {
+ if ( shift ) {
+ selectRange( d->selectAnchor ? d->selectAnchor : old,
+- d->current, FALSE, TRUE, d->selectAnchor ? TRUE : FALSE );
++ d->current, FALSE, TRUE, d->selectAnchor && !control ? TRUE : FALSE );
+ } else if ( !control ) {
+ bool block = signalsBlocked();
+ blockSignals( TRUE );
+--- src/widgets/qlistview.cpp.sav 2003-04-30 18:22:50.000000000 +0200
++++ src/widgets/qlistview.cpp 2003-05-06 15:39:42.000000000 +0200
+@@ -6897,7 +6897,7 @@ void QListView::handleItemChange( QListV
+ } else if ( d->selectionMode == Extended ) {
+ if ( shift ) {
+ selectRange( d->selectAnchor ? d->selectAnchor : old,
+- d->focusItem, FALSE, TRUE, d->selectAnchor ? TRUE : FALSE );
++ d->focusItem, FALSE, TRUE, d->selectAnchor && !control ? TRUE : FALSE );
+ } else if ( !control ) {
+ bool block = signalsBlocked();
+ blockSignals( TRUE );
diff --git a/x11-libs/qt/files/0009-window_group.patch b/x11-libs/qt/files/0009-window_group.patch
new file mode 100644
index 000000000000..07d8962262b4
--- /dev/null
+++ b/x11-libs/qt/files/0009-window_group.patch
@@ -0,0 +1,91 @@
+qt-bugs@ issue : 25601
+applied: no
+author: Lubos Lunak <l.lunak@kde.org>
+
+Helps with stacking order of dialogs, though at the present time probably
+only kwin_iii can make use of this change. Makes window group to be
+set differently in WM_HINTS than official Qt does.
+
+
+ Hello,
+
+ please consider applying the attached patch. The patch makes Qt set
+window_group in WM_HINTS to one leader window for all windows in the
+application, which seems to be what most apps/toolkits do these days. The
+ICCCM (4.1.2.4) is as usually vague, and the sentence 'An example is a single
+client manipulating multiple children of the root window' can be interpreted
+for both ways, as Qt does it today, or as the patch makes Qt do it.
+
+ However, I see several reasons for doing it the way the patch does:
+- I fail to see a good way how to do proper stacking for root transient
+dialogs, if they aren't in the same group as the toplevel window (see
+http://bugs.kde.org/show_bug.cgi?id=56285 - if the KWrite mainwindow is set
+to be kept on top, and the dialog is root transient, and they're not in the
+same group, the WM has no reliable way to find out the dialog should be kept
+above the mainwindow, it can at most apply ugly hacks and try to guess;
+sadly, not passing parent to dialogs is a common practice among Qt/KDE
+developers)
+- the NETWM spec suggests to keep root transient windows as transient for the
+whole group, which is a bit hard, if the Qt dialog doesn't have any group set
+(http://www.freedesktop.org/standards/wm-spec/1.2/html/x355.html#AEN363)
+- the group information provided this way is redundant, the WM can build such
+window "group" using WM_TRANSIENT_FOR properties (note also that Qt currently
+doesn't set window_group for toplevel windows, which at least makes handling
+it even more complicated)
+- and finally, Gtk does so since Gtk-1.x ages, and they haven't changed their
+mind for Gtk-2.x, which suggests they haven't run into any problem with it
+
+ I have to admit it this window groups and transiency stuff has caused me few
+headaches before I got it right in KWin (I hope), so if you have any comments
+on this, I'd like to hear them, but I'm currently quite sure the patch is
+right.
+
+ Also, the first part of the patch removes using WM_TRANSIENT_FOR set to None
+for StaysOnTop windows. I quickly searched sources of few windowmanagers for
+such handling of WM_TRANSIENT_FOR, and I found none, with the exception of
+KWin, which doesn't do this anymore too. I didn't search that thoroughly, but
+I doubt some WM would handle WM_TRANSIENT_FOR being None as equivalent of
+'keep-on-top', and this setting to None takes precendence over setting
+WM_TRANSIENT_FOR to the widget's parent.
+
+
+--- src/kernel/qwidget_x11.cpp.sav 2003-06-30 15:57:40.000000000 +0200
++++ src/kernel/qwidget_x11.cpp 2003-06-30 16:19:40.000000000 +0200
+@@ -492,9 +492,7 @@ void QWidget::create( WId window, bool i
+ testWFlags(WStyle_StaysOnTop) ||
+ dialog ||
+ testWFlags(WStyle_Tool) ) {
+- if ( testWFlags( WStyle_StaysOnTop ) )
+- XSetTransientForHint( dpy, id, None );
+- else if ( p )
++ if ( p )
+ XSetTransientForHint( dpy, id, p->winId() );
+ else // application-modal
+ XSetTransientForHint( dpy, id, root_win );
+@@ -518,11 +516,11 @@ void QWidget::create( WId window, bool i
+ wm_hints.initial_state = NormalState;
+ wm_hints.flags = InputHint | StateHint;
+
+- if ( p && ! p->isDesktop() ) {
+- // the real client leader (head of the group)
+- wm_hints.window_group = p->winId();
+- wm_hints.flags |= WindowGroupHint;
+- }
++ if ( !qt_x11_wm_client_leader )
++ qt_x11_create_wm_client_leader();
++
++ wm_hints.window_group = qt_x11_wm_client_leader;
++ wm_hints.flags |= WindowGroupHint;
+
+ XClassHint class_hint;
+ class_hint.res_class = (char*) title; // app name
+@@ -568,9 +566,6 @@ void QWidget::create( WId window, bool i
+ qt_window_role, XA_STRING, 8, PropModeReplace,
+ (unsigned char *)name(), qstrlen( name() ) );
+
+- if ( !qt_x11_wm_client_leader )
+- qt_x11_create_wm_client_leader();
+-
+ // set client leader property
+ XChangeProperty( dpy, id, qt_wm_client_leader,
+ XA_WINDOW, 32, PropModeReplace,
diff --git a/x11-libs/qt/files/0011-listview_keys.patch b/x11-libs/qt/files/0011-listview_keys.patch
new file mode 100644
index 000000000000..bd401fe2317c
--- /dev/null
+++ b/x11-libs/qt/files/0011-listview_keys.patch
@@ -0,0 +1,62 @@
+qt-bugs@ issue : 19839
+bugs.kde.org number : 56688
+applied: no
+author: Scott Wheeler <wheeler@kde.org>
+
+Subject: [patch] QListView keys
+Date: Tuesday 01 April 2003 19:35
+From: Scott Wheeler <wheeler@kde.org>
+To: kde-core-devel@kde.org
+Cc: qt-bugs@kde.org, 56688@bugs.kde.org
+
+The column priority for QListView seems rather odd with respect to hotkeys.
+
+There are a few scenarios that don't really make sense:
+
+(1) If I have explicitly chosen to sort by a given column, it seems that the
+key pressed should jump to items starting with that letter in that column.
+
+I got a bug report on this in JuK today -- basically if someone is sorting by
+the artist column, pressing "A" shouldn't jump to track names that start with
+"A".
+
+(2) This always uses "column zero" rather than the leftmost column. This also
+seems flawed. Of course by default the column zero is the leftmost column.
+But since QListView allows you to reorder the columns, it seems like in an
+unsorted QListView that it should default to the leftmost column.
+
+Also I found a Windows box to try these on. (1) is done on Windows and I
+couldn't find a good test case for (2) (a multicolumn unsorted list). Since
+(1) is hard-coded into the source, I presume that this is a bug.
+
+It might be nice to have a couple of methods to set / retrieve which column
+keyboard hotkeys go to, but I'll stop pushing my luck... :-)
+
+Anyway, if there are no objections I'd like to commit this to qt-copy.
+
+Cheers,
+
+-Scott
+
+Index: qlistview.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/src/widgets/qlistview.cpp,v
+retrieving revision 1.60
+diff -u -3 -p -r1.60 qlistview.cpp
+--- src/widgets/qlistview.cpp 23 Jun 2003 11:48:55 -0000 1.60
++++ src/widgets/qlistview.cpp 1 Jul 2003 10:45:42 -0000
+@@ -4962,10 +4962,10 @@ void QListView::keyPressEvent( QKeyEvent
+ QString keyItemKey;
+ QString prefix;
+ while( keyItem ) {
+- // Look for text in column 0, then left-to-right
+- keyItemKey = keyItem->text(0);
+- for (int col = 0; col < d->h->count() && !keyItemKey; col++ )
+- keyItemKey = keyItem->text( d->h->mapToLogical(col) );
++ // Look first in the sort column, then the leftmost column, then left to right
++ keyItemKey = keyItem->text( d->sortcolumn );
++ for ( int col = 0; col < d->h->count() && !keyItemKey; col++ )
++ keyItemKey = keyItem->text( d->h->mapToSection(col) );
+ if ( !keyItemKey.isEmpty() ) {
+ prefix = keyItemKey;
+ prefix.truncate( input.length() );
diff --git a/x11-libs/qt/files/0013-qtabwidget-less_flicker.patch b/x11-libs/qt/files/0013-qtabwidget-less_flicker.patch
new file mode 100644
index 000000000000..e2cd2d4d6aae
--- /dev/null
+++ b/x11-libs/qt/files/0013-qtabwidget-less_flicker.patch
@@ -0,0 +1,87 @@
+qt-bugs@ issue : 23458
+bugs.kde.org number : 58040
+applied: no
+author: Stephan Binner <binner@kde.org>
+
+Less flicker during changes in the tab bar.
+
+No replacement for the disabled (identical) code parts given as I don't
+understand the purpose of them and noticed no drawbacks when disabled.
+
+Index: src/widgets/qtabbar.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/src/widgets/qtabbar.cpp,v
+retrieving revision 1.52
+diff -u -3 -p -b -r1.52 qtabbar.cpp
+--- src/widgets/qtabbar.cpp 23 Jun 2003 11:48:57 -0000 1.52
++++ src/widgets/qtabbar.cpp 1 Jul 2003 12:29:42 -0000
+@@ -1290,7 +1290,7 @@ void QTab::setText( const QString& text
+ tb->d->a->insertItem( p, id );
+ #endif
+ tb->layoutTabs();
+- tb->repaint();
++ tb->repaint( FALSE );
+
+ #if defined(QT_ACCESSIBILITY_SUPPORT)
+ QAccessible::updateAccessibility( tb, tb->indexOf(id)+1, QAccessible::NameChanged );
+Index: src/widgets/qtabwidget.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/src/widgets/qtabwidget.cpp,v
+retrieving revision 1.50
+diff -u -3 -p -b -r1.50 qtabwidget.cpp
+--- src/widgets/qtabwidget.cpp 23 Jun 2003 11:48:57 -0000 1.50
++++ src/widgets/qtabwidget.cpp 1 Jul 2003 12:29:43 -0000
+@@ -380,7 +380,7 @@ void QTabWidget::changeTab( QWidget *w,
+ return;
+ // this will update the accelerators
+ t->setText( label );
+-
++/*
+ int ct = d->tabs->currentTab();
+ bool block = d->tabs->signalsBlocked();
+ d->tabs->blockSignals( TRUE );
+@@ -389,7 +389,7 @@ void QTabWidget::changeTab( QWidget *w,
+ d->tabs->setCurrentTab( ft->identifier() );
+ d->tabs->setCurrentTab( ct );
+ d->tabs->blockSignals( block );
+-
++*/
+ d->tabs->update();
+ setUpLayout();
+ }
+@@ -414,7 +414,7 @@ void QTabWidget::changeTab( QWidget *w,
+ // this will update the accelerators
+ t->iconset = new QIconSet( iconset );
+ t->setText( label );
+-
++/*
+ int ct = d->tabs->currentTab();
+ bool block = d->tabs->signalsBlocked();
+ d->tabs->blockSignals( TRUE );
+@@ -423,7 +423,7 @@ void QTabWidget::changeTab( QWidget *w,
+ d->tabs->setCurrentTab( ft->identifier() );
+ d->tabs->setCurrentTab( ct );
+ d->tabs->blockSignals( block );
+-
++*/
+ d->tabs->update();
+ setUpLayout();
+ }
+@@ -1041,7 +1041,7 @@ void QTabWidget::setTabIconSet( QWidget
+ t->iconset = new QIconSet( iconset );
+
+ d->tabs->layoutTabs();
+-
++/*
+ int ct = d->tabs->currentTab();
+ bool block = d->tabs->signalsBlocked();
+ d->tabs->blockSignals( TRUE );
+@@ -1050,7 +1050,7 @@ void QTabWidget::setTabIconSet( QWidget
+ d->tabs->setCurrentTab( ft->identifier() );
+ d->tabs->setCurrentTab( ct );
+ d->tabs->blockSignals( block );
+-
++*/
+ d->tabs->update();
+ setUpLayout();
+ }
diff --git a/x11-libs/qt/files/0014-qiconview-autoscroll.patch b/x11-libs/qt/files/0014-qiconview-autoscroll.patch
new file mode 100644
index 000000000000..dd78f5a79946
--- /dev/null
+++ b/x11-libs/qt/files/0014-qiconview-autoscroll.patch
@@ -0,0 +1,50 @@
+qt-bugs@ issue : 23151
+applied: no
+author: Pascal Létourneau <pletourn@globetrotter.net>
+
+Fix the QRect().contains() test.
+It was using the content pos instead of the viewport pos.
+ensureVisible() use a default margin of 50px, this should be reflected in the
+construction of the QRect.
+
+Index: iconview/qiconview.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/src/iconview/qiconview.cpp,v
+retrieving revision 1.47
+diff -u -3 -p -r1.47 qiconview.cpp
+--- src/iconview/qiconview.cpp 16 May 2003 13:02:38 -0000 1.47
++++ src/iconview/qiconview.cpp 30 May 2003 20:32:34 -0000
+@@ -3257,9 +3258,11 @@ void QIconView::doAutoScroll()
+ {
+ QRect oldRubber = QRect( *d->rubber );
+
+- QPoint pos = QCursor::pos();
+- pos = viewport()->mapFromGlobal( pos );
+- pos = viewportToContents( pos );
++ QPoint vp = viewport()->mapFromGlobal( QCursor::pos() );
++ QPoint pos = viewportToContents( vp );
++
++ if ( pos == d->rubber->bottomRight() )
++ return;
+
+ d->rubber->setRight( pos.x() );
+ d->rubber->setBottom( pos.y() );
+@@ -3352,15 +3355,14 @@ void QIconView::doAutoScroll()
+ if ( d->selectionMode == Single )
+ emit selectionChanged( d->currentItem );
+ }
+-
+- if ( !QRect( 0, 0, viewport()->width(), viewport()->height() ).contains( pos ) &&
++ if ( !QRect( 50, 50, viewport()->width()-100, viewport()->height()-100 ).contains( vp ) &&
+ !d->scrollTimer ) {
+ d->scrollTimer = new QTimer( this );
+
+ connect( d->scrollTimer, SIGNAL( timeout() ),
+ this, SLOT( doAutoScroll() ) );
+ d->scrollTimer->start( 100, FALSE );
+- } else if ( QRect( 0, 0, viewport()->width(), viewport()->height() ).contains( pos ) &&
++ } else if ( QRect( 50, 50, viewport()->width()-100, viewport()->height()-100 ).contains( vp ) &&
+ d->scrollTimer ) {
+ disconnect( d->scrollTimer, SIGNAL( timeout() ),
+ this, SLOT( doAutoScroll() ) );
+
diff --git a/x11-libs/qt/files/0015-qiconview-finditem.patch b/x11-libs/qt/files/0015-qiconview-finditem.patch
new file mode 100644
index 000000000000..1c02622972fe
--- /dev/null
+++ b/x11-libs/qt/files/0015-qiconview-finditem.patch
@@ -0,0 +1,43 @@
+qt-bugs@ issue : 18886
+applied: no
+author: Pascal Létourneau <pletourn@globetrotter.net>
+
+QIconView::findItem() should always search all ItemContainer to find the best
+match.
+
+Example:
+
+----- -----
+| | | | ItemContainer
+--------------------------------------
+| | | | boundary
+| | ----- | |
+| | | | | |
+----- ----- -----
+item1 item2 item3
+
+Right now, the focus goes from item1 to item3 when you press Key_Right.
+
+[ Since the mail was sent, I added the diff 'contains -> intersects' ]
+
+Index: src/iconview/qiconview.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/src/iconview/qiconview.cpp,v
+retrieving revision 1.47
+diff -u -3 -p -r1.47 qiconview.cpp
+--- src/iconview/qiconview.cpp 16 May 2003 13:02:38 -0000 1.47
++++ src/iconview/qiconview.cpp 30 May 2003 20:32:34 -0000
+@@ -5200,11 +5201,11 @@ QIconViewItem* QIconView::findItem( Dire
+ d->findContainers( dir, relativeTo, searchRect);
+
+ cList->first();
+- while ( cList->current() && !centerMatch ) {
++ while ( cList->current() ) {
+ QPtrList<QIconViewItem> &list = (cList->current())->items;
+ for ( item = list.first(); item; item = list.next() ) {
+ if ( neighbourItem( dir, relativeTo, item ) &&
+- searchRect.contains( item->rect().center() ) &&
++ searchRect.intersects( item->rect() ) &&
+ item != currentItem() ) {
+ int ml = (relativeTo - item->rect().center()).manhattanLength();
+ if ( centerMatch ) {
diff --git a/x11-libs/qt/files/0016-qiconview-rebuildcontainer.patch b/x11-libs/qt/files/0016-qiconview-rebuildcontainer.patch
new file mode 100644
index 000000000000..df1c36ad7117
--- /dev/null
+++ b/x11-libs/qt/files/0016-qiconview-rebuildcontainer.patch
@@ -0,0 +1,34 @@
+qt-bugs@ issue : 18598
+applied: no
+author: Pascal Létourneau <pletourn@globetrotter.net>
+
+Sometimes QIconView doesn't paint the top of an icon.
+It's because this part of QIconView::rebuildContainers() is never reached.
+
+...
+if ( d->arrangement == LeftToRight ) {
+ if ( item->y() < c->rect.y() && c->p ) {
+ c = c->p; <<<<<<<<<<<<<<<<<
+ continue;
+...
+
+
+Index: src/iconview/qiconview.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/src/iconview/qiconview.cpp,v
+retrieving revision 1.47
+diff -u -3 -p -r1.47 qiconview.cpp
+--- src/iconview/qiconview.cpp 16 May 2003 13:02:38 -0000 1.47
++++ src/iconview/qiconview.cpp 30 May 2003 20:32:34 -0000
+@@ -6122,7 +6123,9 @@ void QIconView::rebuildContainers()
+ item->d->container2 = 0;
+ c->items.append( item );
+ item = item->next;
+- } else if ( c->rect.intersects( item->rect() ) ) {
++ } else if ( c->rect.intersects( item->rect() ) && (
++ ( d->arrangement == LeftToRight && item->y() >= c->rect.y() ) ||
++ ( d->arrangement == TopToBottom && item->x() >= c->rect.x() ) ) ) {
+ item->d->container1 = c;
+ c->items.append( item );
+ c = c->n;
+
diff --git a/x11-libs/qt/files/0017-qiconview-ctrl_rubber.patch b/x11-libs/qt/files/0017-qiconview-ctrl_rubber.patch
new file mode 100644
index 000000000000..02611de85f13
--- /dev/null
+++ b/x11-libs/qt/files/0017-qiconview-ctrl_rubber.patch
@@ -0,0 +1,90 @@
+qt-bugs@ issue : 23919
+applied: no
+author: Pascal Létourneau <pletourn@globetrotter.net>
+
+This patch modifies the behavior of the rubber selection.
+Now Shift-rubber behaves like the old Ctrl-rubber.
+And now Ctrl-rubber toggles the state of the icons.
+This is more consistant with other iconview (Nautilus, Win Explorer, ...)
+and with Qt itself (Ctrl-click toggle the state of an icon).
+
+Index: src/iconview/qiconview.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/src/iconview/qiconview.cpp,v
+retrieving revision 1.48
+diff -u -3 -p -r1.48 qiconview.cpp
+--- src/iconview/qiconview.cpp 23 Jun 2003 11:48:21 -0000 1.48
++++ src/iconview/qiconview.cpp 1 Jul 2003 16:36:17 -0000
+@@ -257,7 +257,8 @@ public:
+ uint dragging :1;
+ uint drawActiveSelection :1;
+ uint inMenuMode :1;
+-
++ uint controlPressed :1;
++
+ QIconViewToolTip *toolTip;
+ QPixmapCache maskCache;
+ QPtrDict<QIconViewItem> selectedItems;
+@@ -2726,6 +2727,7 @@ QIconView::QIconView( QWidget *parent, c
+ d->lastItem = 0;
+ d->count = 0;
+ d->mousePressed = FALSE;
++ d->controlPressed = FALSE;
+ d->selectionMode = Single;
+ d->currentItem = 0;
+ d->highlightedItem = 0;
+@@ -3288,9 +3290,18 @@ void QIconView::doAutoScroll()
+ alreadyIntersected = TRUE;
+ QIconViewItem *item = c->items.first();
+ for ( ; item; item = c->items.next() ) {
+- if ( d->selectedItems.find( item ) )
+- continue;
+- if ( !item->intersects( nr ) ) {
++ if ( d->selectedItems.find( item ) ) {
++ if ( item->intersects( nr ) && item->isSelected() && d->controlPressed ) {
++ item->setSelected( FALSE );
++ changed = TRUE;
++ rr = rr.unite( item->rect() );
++ } else if ( !item->intersects( nr ) && !item->isSelected() && d->controlPressed ) {
++ item->setSelected( TRUE, TRUE );
++ changed = TRUE;
++ rr = rr.unite( item->rect() );
++ } else
++ continue;
++ } else if ( !item->intersects( nr ) ) {
+ if ( item->isSelected() ) {
+ item->setSelected( FALSE );
+ changed = TRUE;
+@@ -4480,7 +4491,7 @@ void QIconView::contentsMousePressEventE
+ }
+ }
+ } else if ( ( d->selectionMode != Single || e->button() == RightButton )
+- && !( e->state() & ControlButton ) )
++ && !( e->state() & ControlButton ) && !( e->state() & ShiftButton ) )
+ selectAll( FALSE );
+
+ setCurrentItem( item );
+@@ -4491,12 +4502,11 @@ void QIconView::contentsMousePressEventE
+ d->tmpCurrentItem = d->currentItem;
+ d->currentItem = 0;
+ repaintItem( d->tmpCurrentItem );
+- if ( d->rubber )
+- delete d->rubber;
+- d->rubber = 0;
++ delete d->rubber;
+ d->rubber = new QRect( e->x(), e->y(), 0, 0 );
+ d->selectedItems.clear();
+- if ( ( e->state() & ControlButton ) == ControlButton ) {
++ if ( ( e->state() & ControlButton ) == ControlButton ||
++ ( e->state() & ShiftButton ) == ShiftButton ) {
+ for ( QIconViewItem *i = firstItem(); i; i = i->nextItem() )
+ if ( i->isSelected() )
+ d->selectedItems.insert( i, i );
+@@ -4504,6 +4514,7 @@ void QIconView::contentsMousePressEventE
+ }
+
+ d->mousePressed = TRUE;
++ d->controlPressed = ( ( e->state() & ControlButton ) == ControlButton );
+ }
+
+ emit_signals:
diff --git a/x11-libs/qt/files/0018-qlistview-paintcell.patch b/x11-libs/qt/files/0018-qlistview-paintcell.patch
new file mode 100644
index 000000000000..1ebfaf038d7b
--- /dev/null
+++ b/x11-libs/qt/files/0018-qlistview-paintcell.patch
@@ -0,0 +1,31 @@
+qt-bugs@ issue : 21865
+applied: no
+author: Pascal Létourneau <pletourn@globetrotter.net>
+
+Sometimes, the last letter of a cell is not shown completely.
+
+Index: src/widgets/qlistview.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/src/widgets/qlistview.cpp,v
+retrieving revision 1.60
+diff -u -3 -p -r1.60 qlistview.cpp
+--- src/widgets/qlistview.cpp 23 Jun 2003 11:48:55 -0000 1.60
++++ src/widgets/qlistview.cpp 1 Jul 2003 17:18:22 -0000
+@@ -2011,7 +2011,7 @@ void QListViewItem::paintCell( QPainter
+ ci->truncated = FALSE;
+ // if we have to do the ellipsis thingy calc the truncated text
+ int pw = pixmap( column ) ? pixmap( column )->width() + lv->itemMargin() : lv->itemMargin();
+- if ( !mlenabled && fm.width( t ) + pw > width ) {
++ if ( !mlenabled && this->width( fm, lv, column ) > width ) {
+ // take care of arabic shaping in width calculation (lars)
+ ci->truncated = TRUE;
+ ci->tmpText = "...";
+@@ -2023,7 +2023,7 @@ void QListViewItem::paintCell( QPainter
+ if ( ci->tmpText.isEmpty() )
+ ci->tmpText = t.left( 1 );
+ ci->tmpText += "...";
+- } else if ( mlenabled && fm.width( t ) + pw > width ) {
++ } else if ( mlenabled && this->width( fm, lv, column ) > width ) {
+ #ifndef QT_NO_STRINGLIST
+ QStringList list = QStringList::split( QChar('\n'), t, TRUE );
+ for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
diff --git a/x11-libs/qt/files/0019-qlistview-adjustcolumn.patch b/x11-libs/qt/files/0019-qlistview-adjustcolumn.patch
new file mode 100644
index 000000000000..de4bd07ec121
--- /dev/null
+++ b/x11-libs/qt/files/0019-qlistview-adjustcolumn.patch
@@ -0,0 +1,42 @@
+qt-bugs@ issue : 25102
+applied: no
+author: Pascal Létourneau <pletourn@globetrotter.net>
+
+Don't paint more items than necessary.
+adjustColumn() should consider only visible items.
+
+Index: src/widgets/qlistview.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/src/widgets/qlistview.cpp,v
+retrieving revision 1.60
+diff -u -3 -p -r1.60 qlistview.cpp
+--- src/widgets/qlistview.cpp 23 Jun 2003 11:48:55 -0000 1.60
++++ src/widgets/qlistview.cpp 1 Jul 2003 17:45:34 -0000
+@@ -2840,7 +2840,7 @@ void QListView::drawContentsOffset( QPai
+ int cs;
+
+ // need to paint current?
+- if ( ih > 0 && current->y < cy+ch && current->y+ih >= cy ) {
++ if ( ih > 0 && current->y < cy+ch && current->y+ih > cy ) {
+ if ( fx < 0 ) {
+ // find first interesting column, once
+ x = 0;
+@@ -8033,15 +8033,14 @@ void QListView::adjustColumn( int col )
+ w += d->h->iconSet( col )->pixmap().width();
+ w = QMAX( w, 20 );
+ QFontMetrics fm( fontMetrics() );
+- QListViewItemIterator it( this );
++ QListViewItem* item = firstChild();
+ int rootDepth = rootIsDecorated() ? treeStepSize() : 0;
+- while ( it.current() ) {
+- QListViewItem *item = it.current();
+- ++it;
++ while ( item ) {
+ int iw = item->width( fm, this, col );
+ if ( 0 == col )
+ iw += itemMargin() + rootDepth + item->depth()*treeStepSize() - 1;
+ w = QMAX( w, iw );
++ item = item->itemBelow();
+ }
+ w = QMAX( w, QApplication::globalStrut().width() );
+ setColumnWidth( col, w );
diff --git a/x11-libs/qt/files/0020-designer-deletetabs.patch b/x11-libs/qt/files/0020-designer-deletetabs.patch
new file mode 100644
index 000000000000..23b1e1d300a2
--- /dev/null
+++ b/x11-libs/qt/files/0020-designer-deletetabs.patch
@@ -0,0 +1,76 @@
+qt-bugs@ issue : N26525
+applied: no
+author: Thomas Zander <zander@kde.org>
+
+it is possible to remove all tabs from a QTabWidget in the 'object explorer'.
+
+After inserting a new tabWidget I normally get 2 tabs. Using
+the popup menu on the widget itself a delete is not present when there
+is just one tab left. In other words; I can't delete all tabs.
+
+The popup menu presented on the 'object explorer' toolbar does not do any
+checking on the amount of tabs present; it is possible to delete all tabs
+from there.
+
+To reproduce;
+ - Open new document.
+ - Insert QTabWidget.
+ - Press with RMB on the just inserted tabWidget and press 'delete page'
+ - Open the same popup again; notice the missing 'delete page' entry.
+
+ - go to the 'object explorer' toolbar and make sure it is on the
+ 'objects' tab.
+ - Press with the RMB on the QTabWidget name.
+ - Press 'delete page' and the last page is deleted.
+
+Solution; on every show of the popup check if delete is possible and enable
+correctly.
+
+Index: tools/designer/designer/hierarchyview.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/tools/tools/designer/designer/hierarchyview.cpp,v
+retrieving revision 1.20
+diff -u -3 -p -b -r1.20 hierarchyview.cpp
+--- tools/designer/designer/hierarchyview.cpp 23 Jun 2003 11:49:05 -0000 1.20
++++ tools/designer/designer/hierarchyview.cpp 12 Jul 2003 17:09:29 -0000
+@@ -599,6 +599,7 @@ void HierarchyList::showRMBMenu( QListVi
+ formWindow->mainWindow()->setupTabWidgetHierarchyMenu(
+ this, SLOT( addTabPage() ),
+ SLOT( removeTabPage() ) );
++ tabWidgetMenu->setItemEnabled(MainWindow::POPUP_REMOVE_PAGE_ID, ((QDesignerTabWidget*)w )->count() > 1);
+ tabWidgetMenu->popup( p );
+ }
+ }
+Index: tools/designer/designer/mainwindow.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/tools/tools/designer/designer/mainwindow.cpp,v
+retrieving revision 1.33
+diff -u -3 -p -b -r1.33 mainwindow.cpp
+--- tools/designer/designer/mainwindow.cpp 23 Jun 2003 11:49:06 -0000 1.33
++++ tools/designer/designer/mainwindow.cpp 12 Jul 2003 17:09:31 -0000
+@@ -2419,8 +2419,8 @@ QPopupMenu *MainWindow::setupTabWidgetHi
+ {
+ QPopupMenu *menu = new QPopupMenu( parent );
+
+- menu->insertItem( tr( "Add Page" ), parent, addSlot );
+- menu->insertItem( tr( "Delete Page" ), parent, removeSlot );
++ menu->insertItem( tr( "Add Page" ), parent, addSlot, 0, POPUP_REMOVE_PAGE_ID+1 );
++ menu->insertItem( tr( "Delete Page" ), parent, removeSlot, 0, POPUP_REMOVE_PAGE_ID );
+ menu->insertSeparator();
+ actionEditCut->addTo( menu );
+ actionEditCopy->addTo( menu );
+Index: tools/designer/designer/mainwindow.h
+===================================================================
+RCS file: /home/kde/qt-copy/tools/tools/designer/designer/mainwindow.h,v
+retrieving revision 1.15
+diff -u -3 -p -b -r1.15 mainwindow.h
+--- tools/designer/designer/mainwindow.h 16 May 2003 13:03:27 -0000 1.15
++++ tools/designer/designer/mainwindow.h 12 Jul 2003 17:09:31 -0000
+@@ -107,6 +107,7 @@ public:
+
+ QPopupMenu *setupNormalHierarchyMenu( QWidget *parent );
+ QPopupMenu *setupTabWidgetHierarchyMenu( QWidget *parent, const char *addSlot, const char *removeSlot );
++ static const int POPUP_REMOVE_PAGE_ID = 1;
+
+ FormWindow *openFormWindow( const QString &fn, bool validFileName = TRUE, FormFile *ff = 0 );
+ bool isCustomWidgetUsed( MetaDataBase::CustomWidget *w );
diff --git a/x11-libs/qt/files/0021-qiconview-dragalittle.patch b/x11-libs/qt/files/0021-qiconview-dragalittle.patch
new file mode 100644
index 000000000000..8322acf5f859
--- /dev/null
+++ b/x11-libs/qt/files/0021-qiconview-dragalittle.patch
@@ -0,0 +1,57 @@
+qt-bugs@ issue : 26009
+applied: no
+author: Clarence Dang <dang@kde.org>
+
+Subject: Unable to drag icons a small distance in QIconView (Re: Several suggestions to make KDE desktop look/behave nicer)
+From: Clarence Dang <dang@kde.org>
+To: qt-bugs@trolltech.com
+CC: kde-usability@mail.kde.org
+Date: Thu, 3 Jul 2003 23:09:24 +1000
+
+
+Hi Trolltech,
+
+On Fri, 27 Jun 2003 08:42 pm, Michael Pye wrote:
+> On Friday 27 Jun 2003 8:24 am, Clarence Dang wrote:
+> > On Fri, 27 Jun 2003 09:18 am, Ivica Bukvic wrote:
+[about the QIconView-based KDE Desktop]
+> > > 4) Icon dragging often fails if the icons are dragged a short distance,
+> > > even if the auto-allign options are turned off -- this is quite
+> > > annoying. Users should be able to move icons however and wherever
+> > >they prefer, without fighting the UI.
+> >
+> > Yeah, I get that too even with "Drag Start Distance" set to 1. So to
+> > move an icon just a little bit, I have to move it far away and then back
+> > to where I want it. I'll have a look into this.
+>
+> As far as I can tell, the icon does not move unless the pointer finishes
+> outside the bounds of the icon's original position.
+That was it, thanks. AFAICS, QIconView tries to prevent you from moving an
+icon on top of another icon. But, in this case, when you're moving an icon
+just a little bit, the icon it "lands on top of" is the icon being dragged.
+
+So, here's a patch. There are still some slight bugs to do with really,
+really tiny drags but I don't have time to investigate them right now.
+
+Cheers,
+Clarence
+
+[this patch is slightly different from the one sent to TT - a redundant
+check was removed]
+
+Index: src/iconview/qiconview.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/src/iconview/qiconview.cpp,v
+retrieving revision 1.49
+diff -u -p -r1.49 qiconview.cpp
+--- src/iconview/qiconview.cpp 1 Jul 2003 23:06:42 -0000 1.49
++++ src/iconview/qiconview.cpp 23 Jul 2003 05:19:28 -0000
+@@ -4770,7 +4770,7 @@ void QIconView::contentsDropEvent( QDrop
+
+ QIconViewItem *i = findItem( e->pos() );
+
+- if ( !i && e->source() == viewport() && d->currentItem && !d->cleared ) {
++ if ( (!i || i == d->currentItem) && e->source() == viewport() && d->currentItem && !d->cleared ) {
+ if ( !d->rearrangeEnabled )
+ return;
+ QRect r = d->currentItem->rect();
diff --git a/x11-libs/qt/files/0022-qdragobject-hotspot.patch b/x11-libs/qt/files/0022-qdragobject-hotspot.patch
new file mode 100644
index 000000000000..cfbafe486339
--- /dev/null
+++ b/x11-libs/qt/files/0022-qdragobject-hotspot.patch
@@ -0,0 +1,41 @@
+qt-bugs@ issue : 28108
+applied: no
+author: John Firebaugh <jfirebaugh@kde.org>
+
+void QDragObject::setPixmap(QPixmap pm) documentation:
+
+ Uses a hotspot that positions the pixmap below and to the right of
+ the mouse pointer. This allows the user to clearly see the point
+ on the window which they are dragging the data onto.
+
+This is a good idea. Unfortunately the code doesn't do that.
+
+Hi John,
+
+thanks for bringing this discrepancy to our attention; we will look into
+this for a future version of Qt (we cannot change the actual behavior
+within the release cycle of Qt 3.2 I'm afraid).
+
+Regards,
+Volker
+
+--
+Volker Hilsheimer, Support Manager
+Trolltech AS, Waldemar Thranes gate 98, NO-0175 Oslo, Norway
+
+Index: src/kernel/qdragobject.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/src/kernel/qdragobject.cpp,v
+retrieving revision 1.55
+diff -u -3 -p -r1.55 qdragobject.cpp
+--- src/kernel/qdragobject.cpp 23 Jun 2003 11:48:23 -0000 1.55
++++ src/kernel/qdragobject.cpp 2 Aug 2003 03:45:48 -0000
+@@ -363,7 +363,7 @@ void QDragObject::setPixmap(QPixmap pm,
+ */
+ void QDragObject::setPixmap(QPixmap pm)
+ {
+- setPixmap(pm,QPoint(pm.width()/2,pm.height()/2));
++ setPixmap(pm,QPoint(-10,-10));
+ }
+
+ /*!
diff --git a/x11-libs/qt/files/0023-qstring-crash.patch b/x11-libs/qt/files/0023-qstring-crash.patch
new file mode 100644
index 000000000000..dd4d7e72fd44
--- /dev/null
+++ b/x11-libs/qt/files/0023-qstring-crash.patch
@@ -0,0 +1,35 @@
+qt-bugs@ issue : 28421 (related to 23835)
+applied: yes
+author: Waldo Bastian <bastian@kde.org>
+
+Index: qstring.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/src/tools/qstring.cpp,v
+retrieving revision 1.55
+diff -u -r1.55 src/tools/qstring.cpp
+--- src/tools/qstring.cpp 23 Jul 2003 18:14:00 -0000 1.55
++++ src/tools/qstring.cpp 7 Aug 2003 14:41:47 -0000
+@@ -5275,7 +5275,6 @@
+ *qch++ = QChar(0xde00+((uchar)utf8[i]));
+ need = 0;
+ }
+- error = -1;
+ } else {
+ if ( ch < 128 ) {
+ *qch++ = ch;
+@@ -5291,10 +5290,14 @@
+ uc = ch & 0x07;
+ need = 3;
+ error = i;
++ } else {
++ // Error
++ *qch++ = QChar(0xdbff);
++ *qch++ = QChar(0xde00+((uchar)utf8[i]));
+ }
+ }
+ }
+- if (error != -1) {
++ if (need) {
+ // we have some invalid characters remaining we need to add to the string
+ for (int i = error; i < len; ++i) {
+ *qch++ = QChar(0xdbff);
diff --git a/x11-libs/qt/files/0024-fix_enter_leave_notify.patch b/x11-libs/qt/files/0024-fix_enter_leave_notify.patch
new file mode 100644
index 000000000000..159ebb4f8551
--- /dev/null
+++ b/x11-libs/qt/files/0024-fix_enter_leave_notify.patch
@@ -0,0 +1,32 @@
+qt-bugs@ issue : 25022
+applied: no
+author: Lubos Lunak <l.lunak@kde.org>
+
+Fixes mouse focus policies in kwin_iii. Already in official Qt.
+
+--- src/kernel/qapplication_x11.cpp.sav 2003-06-20 13:23:03.000000000 +0200
++++ src/kernel/qapplication_x11.cpp 2003-06-20 15:14:23.000000000 +0200
+@@ -3667,9 +3667,12 @@ int QApplication::x11ProcessEvent( XEven
+ QWidget* enter = 0;
+ XEvent ev;
+ while ( XCheckMaskEvent( widget->x11Display(), EnterWindowMask | LeaveWindowMask , &ev )
+- && !qt_x11EventFilter( &ev ) && !widget->x11Event( &ev ) ) {
++ && !qt_x11EventFilter( &ev )) {
++ QWidget* event_widget = QWidget::find( ev.xcrossing.window );
++ if( event_widget && event_widget->x11Event( &ev ) )
++ break;
+ if ( ev.type == LeaveNotify && ev.xcrossing.mode == NotifyNormal ){
+- enter = QWidget::find( ev.xcrossing.window );
++ enter = event_widget;
+ XPutBackEvent( widget->x11Display(), &ev );
+ break;
+ }
+@@ -3677,7 +3680,7 @@ int QApplication::x11ProcessEvent( XEven
+ ev.xcrossing.detail == NotifyVirtual ||
+ ev.xcrossing.detail == NotifyNonlinearVirtual )
+ continue;
+- enter = QWidget::find( ev.xcrossing.window );
++ enter = event_widget;
+ if ( ev.xcrossing.focus &&
+ enter && !enter->isDesktop() && !enter->isActiveWindow() ) {
+ if ( qt_focus_model == FocusModel_Unknown ) // check focus model
diff --git a/x11-libs/qt/files/digest-qt-3.2.1 b/x11-libs/qt/files/digest-qt-3.2.1
index bdba907c9968..98da42dd513a 100644
--- a/x11-libs/qt/files/digest-qt-3.2.1
+++ b/x11-libs/qt/files/digest-qt-3.2.1
@@ -1 +1 @@
-MD5 9ae022ffe7603ec34aba150f6cca257a qt-x11-free-3.2.1.tar.bz2 13981279
+MD5 bdc578b1ac55e3120757973b4119c269 qt-x11-commercial-3.2.1.tar.bz2 14053777
diff --git a/x11-libs/qt/files/digest-qt-3.2.1-r1 b/x11-libs/qt/files/digest-qt-3.2.1-r1
new file mode 100644
index 000000000000..98da42dd513a
--- /dev/null
+++ b/x11-libs/qt/files/digest-qt-3.2.1-r1
@@ -0,0 +1 @@
+MD5 bdc578b1ac55e3120757973b4119c269 qt-x11-commercial-3.2.1.tar.bz2 14053777
diff --git a/x11-libs/qt/qt-3.2.1-r1.ebuild b/x11-libs/qt/qt-3.2.1-r1.ebuild
new file mode 100644
index 000000000000..f16306c6a1ab
--- /dev/null
+++ b/x11-libs/qt/qt-3.2.1-r1.ebuild
@@ -0,0 +1,195 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt/qt-3.2.1-r1.ebuild,v 1.1 2003/09/19 17:37:30 caleb Exp $
+
+DESCRIPTION="QT version ${PV}"
+HOMEPAGE="http://www.trolltech.com/"
+SRC_URI="ftp://ftp.trolltech.com/qt/source/qt-x11-free-${PV}.tar.bz2"
+
+LICENSE="QPL-1.0 | GPL-2"
+SLOT="3"
+KEYWORDS="~x86 ~ppc"
+IUSE="cups nas postgres opengl mysql odbc gif"
+
+DEPEND="virtual/x11
+ media-libs/libpng
+ media-libs/lcms
+ media-libs/jpeg
+ >=media-libs/libmng-1.0.0
+ >=media-libs/freetype-2
+ virtual/xft
+ !<kde-base/kdelibs-3.1.4
+ nas? ( >=media-libs/nas-1.4.1 )
+ odbc? ( >=dev-db/unixODBC-2.0 )
+ mysql? ( >=dev-db/mysql-3.2.10 )
+ opengl? ( virtual/opengl virtual/glu )
+ postgres? ( >=dev-db/postgresql-7.2 )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/qt-x11-free-${PV}
+
+QTBASE=/usr/qt/3
+export QTDIR=${S}
+
+src_unpack() {
+ unpack ${A}
+
+ export QTDIR=${S}
+ cd ${S}
+
+ cp configure configure.orig
+ sed -e 's:read acceptance:acceptance=yes:' configure.orig > configure
+
+ cd mkspecs/linux-g++
+ # use env's $CC, $CXX
+ if [ -n "$CXX" ]; then
+ einfo 'Using environment definition of $CXX'
+ cp qmake.conf qmake.conf.orig
+ sed -e "s:= g++:= ${CXX}:" qmake.conf.orig > qmake.conf
+ fi
+ if [ -n "$CC" ]; then
+ einfo 'Using environment definition of $CC'
+ cp qmake.conf qmake.conf.orig
+ sed -e "s:= gcc:= ${CC}:" qmake.conf.orig > qmake.conf
+ fi
+
+ # hppa and alpha people, please review the following
+
+ # hppa need some additional flags
+ if [ "${ARCH}" = "hppa" ]; then
+ echo "QMAKE_CFLAGS += -fPIC -ffunction-sections" >> qmake.conf
+ echo "QMAKE_CXXFLAGS += -fPIC -ffunction-sections" >> qmake.conf
+ echo "QMAKE_LFLAGS += -ffunction-sections -Wl,--stub-group-size=25000" >> qmake.conf
+ fi
+
+ # on alpha we need to compile everything with -fPIC
+ if [ ${ARCH} == "alpha" ]; then
+ cp qmake.conf qmake.conf.orig
+ sed -e "s:= -O2:= -O2 -fPIC:" qmake.conf.orig > qmake.conf
+ cat >> ${S}/tools/designer/editor/editor.pro <<_EOF_
+QMAKE_CFLAGS += -fPIC
+QMAKE_CXXFLAGS += -fPIC
+_EOF_
+ fi
+
+ cd ${S}
+ epatch ${FILESDIR}/0001-dnd_optimization.patch
+ epatch ${FILESDIR}/0002-dnd_active_window_fix.patch
+ epatch ${FILESDIR}/0003-qmenubar_fitts_law.patch
+ epatch ${FILESDIR}/0004-qiconview_etc_ctrl_selecting.patch
+ epatch ${FILESDIR}/0009-window_group.patch
+ epatch ${FILESDIR}/0011-listview_keys.patch
+ epatch ${FILESDIR}/0013-qtabwidget-less_flicker.patch
+ epatch ${FILESDIR}/0014-qiconview-autoscroll.patch
+ epatch ${FILESDIR}/0015-qiconview-finditem.patch
+ epatch ${FILESDIR}/0016-qiconview-rebuildcontainer.patch
+ epatch ${FILESDIR}/0017-qiconview-ctrl_rubber.patch
+ epatch ${FILESDIR}/0018-qlistview-paintcell.patch
+ epatch ${FILESDIR}/0019-qlistview-adjustcolumn.patch
+ epatch ${FILESDIR}/0020-designer-deletetabs.patch
+ epatch ${FILESDIR}/0021-qiconview-dragalittle.patch
+ epatch ${FILESDIR}/0022-qdragobject-hotspot.patch
+ epatch ${FILESDIR}/0024-fix_enter_leave_notify.patch
+}
+
+src_compile() {
+ export QTDIR=${S}
+ export SYSCONF=${QTBASE}/etc/settings
+ LD_LIBRARY_PATH_OLD=${LD_LIBRARY_PATH}
+ export LD_LIBRARY_PATH=${S}/lib:${LD_LIBRARY_PATH}
+
+ # fix #11144; qt wants to create lock files etc. in that directory
+ [ -d "$QTBASE/etc/settings" ] && addwrite "$QTBASE/etc/settings"
+ [ ! -d "$QTBASE/etc/settings" ] && dodir ${QTBASE}/etc/settings
+
+ export LDFLAGS="-ldl"
+
+ use cups || myconf="${myconf} -no-cups"
+ use nas && myconf="${myconf} -system-nas-sound"
+ use gif && myconf="${myconf} -qt-gif"
+ use mysql && myconf="${myconf} -plugin-sql-mysql -I/usr/include/mysql -L/usr/lib/mysql"
+ use postgres && myconf="${myconf} -plugin-sql-psql -I/usr/include/postgresql/server"
+ use odbc && myconf="${myconf} -plugin-sql-odbc"
+ use opengl && myconf="${myconf} -enable-module=opengl" || myconf="${myconf} -disable-opengl"
+ use debug && myconf="${myconf} -debug" || myconf="${myconf} -release -no-g++-exceptions"
+ use xinerama && myconf="${myconf} -xinerama"
+
+ # avoid wasting time building things we won't install
+ #rm -rf tutorial examples
+
+ export YACC='byacc -d'
+
+ ./configure -sm -thread -stl -system-zlib -system-libjpeg -verbose \
+ -qt-imgfmt-{jpeg,mng,png} -tablet -system-libmng \
+ -system-libpng -ldl -lpthread -xft -platform linux-g++ -xplatform \
+ linux-g++ -xrender -prefix ${D}${QTBASE} -fast ${myconf} || die
+
+ export QTDIR=${S}
+ emake src-qmake src-moc sub-src sub-tools || die
+ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH_OLD}
+}
+
+src_install() {
+ export QTDIR=${S}
+
+ # binaries
+ into $QTBASE
+ dobin bin/*
+
+ # libraries
+ dolib lib/libqt-mt.so.3.2.1 lib/libqui.so.1.0.0 lib/lib{editor,qassistantclient,designer}.a
+ cd ${D}$QTBASE/lib
+ for x in libqui.so ; do
+ ln -s $x.1.0.0 $x.1.0
+ ln -s $x.1.0 $x.1
+ ln -s $x.1 $x
+ done
+
+ # version symlinks - 3.2.1->3.2->3->.so
+ ln -s libqt-mt.so.3.2.1 libqt-mt.so.3.2
+ ln -s libqt-mt.so.3.2 libqt-mt.so.3
+ ln -s libqt-mt.so.3 libqt-mt.so
+
+ # libqt -> libqt-mt symlinks
+ ln -s libqt-mt.so.3.2.1 libqt.so.3.2.1
+ ln -s libqt-mt.so.3.2 libqt.so.3.2
+ ln -s libqt-mt.so.3 libqt.so.3
+ ln -s libqt-mt.so libqt.so
+
+ # includes
+ cd ${S}
+ dodir ${QTBASE}/include/private
+ cp include/* ${D}/${QTBASE}/include/
+ cp include/private/* ${D}/${QTBASE}/include/private/
+
+ # misc
+ insinto /etc/env.d
+ doins ${FILESDIR}/{45qt3,50qtdir3}
+
+ dodir ${QTBASE}/tools/designer/templates
+
+ cd ${S}/doc
+ dodir ${QTBASE}/doc
+ for x in html flyers; do
+ cp -r $x ${D}/${QTBASE}/doc
+ done
+
+ cp -r ${S}/doc/man ${D}/${QTBASE}
+ cp -r ${S}/examples ${D}/${QTBASE}
+ cp -r ${S}/tutorial ${D}/${QTBASE}
+
+ # misc build reqs
+ dodir ${QTBASE}/mkspecs
+ cp -R ${S}/mkspecs/linux-g++ ${D}/${QTBASE}/mkspecs/
+
+ sed -e "s:${S}:${QTBASE}:g" \
+ ${S}/.qmake.cache > ${D}${QTBASE}/.qmake.cache
+
+ # plugins
+ cd ${S}
+ plugins=`find plugins -name "lib*.so" -print`
+ for x in $plugins; do
+ insinto ${QTBASE}/`dirname $x`
+ doins $x
+ done
+}