aboutsummaryrefslogtreecommitdiff
path: root/x11-toolkits/qt33
diff options
context:
space:
mode:
authorMichael Nottebrock <lofi@FreeBSD.org>2005-03-20 18:17:55 +0000
committerMichael Nottebrock <lofi@FreeBSD.org>2005-03-20 18:17:55 +0000
commitd57e6a82578ae8c5008de9b8a118e7286b5ac8bd (patch)
tree3242aa4d74a61f6856c81b2ca2de2e77f3bdfe80 /x11-toolkits/qt33
parent6d03af1e2cf23cd31fdb26de95a70d7cfaa23986 (diff)
downloadports-d57e6a82578ae8c5008de9b8a118e7286b5ac8bd.tar.gz
ports-d57e6a82578ae8c5008de9b8a118e7286b5ac8bd.zip
Notes
Diffstat (limited to 'x11-toolkits/qt33')
-rw-r--r--x11-toolkits/qt33/Makefile32
-rw-r--r--x11-toolkits/qt33/files/0001-dnd_optimization.patch187
-rw-r--r--x11-toolkits/qt33/files/0002-dnd_active_window_fix.patch189
-rw-r--r--x11-toolkits/qt33/files/0007-qpixmap_constants.patch383
-rw-r--r--x11-toolkits/qt33/files/0015-qiconview-finditem.patch43
-rw-r--r--x11-toolkits/qt33/files/0016-qiconview-rebuildcontainer.patch34
-rw-r--r--x11-toolkits/qt33/files/0017-qiconview-ctrl_rubber.patch90
-rw-r--r--x11-toolkits/qt33/files/0020-designer-deletetabs.patch76
-rw-r--r--x11-toolkits/qt33/files/0032-fix_rotated_randr.diff94
-rw-r--r--x11-toolkits/qt33/files/0035-qvaluelist-streaming-operator.patch27
-rw-r--r--x11-toolkits/qt33/files/0036-qprogressbar-optimization.patch126
-rw-r--r--x11-toolkits/qt33/files/0037-dnd-timestamp-fix.patch56
-rw-r--r--x11-toolkits/qt33/files/0038-dragobject-dont-prefer-unknown.patch57
-rw-r--r--x11-toolkits/qt33/files/0044-qscrollview-windowactivate-fix.diff38
-rw-r--r--x11-toolkits/qt33/files/0046-qiconview-no-useless-scrollbar.diff150
-rw-r--r--x11-toolkits/qt33/files/0047-fix-kmenu-width.diff25
-rw-r--r--x11-toolkits/qt33/files/0048-qclipboard_hack_80072.patch48
-rw-r--r--x11-toolkits/qt33/files/0049-qiconview-rubber_on_move.diff114
-rw-r--r--x11-toolkits/qt33/files/0051-qtoolbar_77047.patch29
-rw-r--r--x11-toolkits/qt33/files/0053-png-gamma-fix.diff50
-rw-r--r--x11-toolkits/qt33/files/0056-khotkeys_input_84434.patch21
-rw-r--r--x11-toolkits/qt33/files/0059-qpopup_has_mouse.patch68
-rw-r--r--x11-toolkits/qt33/files/0060-qpopup_ignore_mousepos.patch59
-rw-r--r--x11-toolkits/qt33/files/0061-qscrollview-propagate-horizontal-wheelevent.patch32
24 files changed, 2028 insertions, 0 deletions
diff --git a/x11-toolkits/qt33/Makefile b/x11-toolkits/qt33/Makefile
index 411d6ac9915b..45039d59a100 100644
--- a/x11-toolkits/qt33/Makefile
+++ b/x11-toolkits/qt33/Makefile
@@ -55,6 +55,7 @@ EXTRACT_AFTER_ARGS=| ${TAR} -xf - \
--exclude '${DISTNAME}/include/np*'
OPTIONS= CUPS "Enable CUPS support" on \
+ KDE_PATCHES "Apply KDE patches" off \
NAS "Enable NAS support" on \
OPENGL "Enable OpenGL support" on \
XFT "Enable Xft support" on
@@ -108,6 +109,37 @@ CONFIGURE_ARGS+=-system-nas-sound -no-pch
CONFIGURE_ARGS+=-no-nas-sound
.endif
+.if defined(WITH_KDE_PATCHES)
+EXTRA_PATCHES= ${PATCHDIR}/0001-dnd_optimization.patch \
+ ${PATCHDIR}/0002-dnd_active_window_fix.patch \
+ ${PATCHDIR}/0007-qpixmap_constants.patch \
+ ${PATCHDIR}/0015-qiconview-finditem.patch \
+ ${PATCHDIR}/0016-qiconview-rebuildcontainer.patch \
+ ${PATCHDIR}/0017-qiconview-ctrl_rubber.patch \
+ ${PATCHDIR}/0020-designer-deletetabs.patch \
+ ${PATCHDIR}/0032-fix_rotated_randr.diff \
+ ${PATCHDIR}/0035-qvaluelist-streaming-operator.patch \
+ ${PATCHDIR}/0036-qprogressbar-optimization.patch \
+ ${PATCHDIR}/0037-dnd-timestamp-fix.patch \
+ ${PATCHDIR}/0038-dragobject-dont-prefer-unknown.patch \
+ ${PATCHDIR}/0044-qscrollview-windowactivate-fix.diff \
+ ${PATCHDIR}/0046-qiconview-no-useless-scrollbar.diff \
+ ${PATCHDIR}/0047-fix-kmenu-width.diff \
+ ${PATCHDIR}/0048-qclipboard_hack_80072.patch \
+ ${PATCHDIR}/0049-qiconview-rubber_on_move.diff \
+ ${PATCHDIR}/0051-qtoolbar_77047.patch \
+ ${PATCHDIR}/0053-png-gamma-fix.diff \
+ ${PATCHDIR}/0056-khotkeys_input_84434.patch \
+ ${PATCHDIR}/0059-qpopup_has_mouse.patch \
+ ${PATCHDIR}/0060-qpopup_ignore_mousepos.patch \
+ ${PATCHDIR}/0061-qscrollview-propagate-horizontal-wheelevent.patch
+PKGNAMESUFFIX= -copy
+COMMENT+= (+ KDE patches)
+CONFLICTS+= qt-3.3.*
+.elseif defined(WITHOUT_KDE_PATCHES)
+CONFLICTS+= qt-copy-[0-9]*
+.endif
+
.if ${X_WINDOW_SYSTEM:L} == xfree86-3
IGNORE= "The QT ${PORTVERSION} port does not support any XFree86 < 4.x"
.endif
diff --git a/x11-toolkits/qt33/files/0001-dnd_optimization.patch b/x11-toolkits/qt33/files/0001-dnd_optimization.patch
new file mode 100644
index 000000000000..d9de28464178
--- /dev/null
+++ b/x11-toolkits/qt33/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-toolkits/qt33/files/0002-dnd_active_window_fix.patch b/x11-toolkits/qt33/files/0002-dnd_active_window_fix.patch
new file mode 100644
index 000000000000..4b497d64f65f
--- /dev/null
+++ b/x11-toolkits/qt33/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-toolkits/qt33/files/0007-qpixmap_constants.patch b/x11-toolkits/qt33/files/0007-qpixmap_constants.patch
new file mode 100644
index 000000000000..2bcc61f190e8
--- /dev/null
+++ b/x11-toolkits/qt33/files/0007-qpixmap_constants.patch
@@ -0,0 +1,383 @@
+qt-bugs@ issue : 11790 (part of)
+applied: no
+author: Lubos Lunak <l.lunak@kde.org>
+
+See 0005-qpixmap_mitshm.patch for details.
+
+--- src/kernel/qpixmap_x11.cpp.sav Tue Nov 26 15:32:21 2002
++++ src/kernel/qpixmap_x11.cpp Tue Nov 26 15:37:21 2002
+@@ -1278,9 +1278,6 @@ bool QPixmap::convertFromImage( const QI
+ return FALSE;
+ int bppc = xi->bits_per_pixel;
+
+- if ( bppc > 8 && xi->byte_order == LSBFirst )
+- bppc++;
+-
+ bool contig_bits = n_bits(red_mask) == rbits &&
+ n_bits(green_mask) == gbits &&
+ n_bits(blue_mask) == bbits;
+@@ -1329,32 +1326,70 @@ bool QPixmap::convertFromImage( const QI
+ }
+ init=TRUE;
+ }
++
++ enum { BPP8,
++ BPP16_8_3_M3, BPP16_7_2_M3, BPP16_MSB, BPP16_LSB,
++ BPP24_MSB, BPP24_LSB,
++ BPP32_16_8_0, BPP32_MSB, BPP32_LSB
++ } mode = BPP8;
+
+- for ( uint y=0; y<h; y++ ) {
+- uchar* src = image.scanLine( y );
+- uchar* dst = newbits + xi->bytes_per_line*y;
+- QRgb* p = (QRgb *)src;
++ if ( bppc > 8 && xi->byte_order == LSBFirst )
++ bppc++;
+
+-#define GET_RGB \
+- int r = qRed ( *p ); \
+- int g = qGreen( *p ); \
+- int b = qBlue ( *p++ ); \
+- r = red_shift > 0 \
+- ? r << red_shift : r >> -red_shift; \
+- g = green_shift > 0 \
+- ? g << green_shift : g >> -green_shift; \
+- b = blue_shift > 0 \
+- ? b << blue_shift : b >> -blue_shift;
++ int wordsize;
++ bool bigendian;
++ qSysInfo( &wordsize, &bigendian );
++ bool same_msb_lsb = ( xi->byte_order == MSBFirst ) == ( bigendian );
++
++ if( bppc == 8 ) // 8 bit
++ mode = BPP8;
++ else if( bppc == 16 || bppc == 17 ) { // 16 bit MSB/LSB
++ if( red_shift == 8 && green_shift == 3 && blue_shift == -3
++ && !d8 && same_msb_lsb )
++ mode = BPP16_8_3_M3;
++ else if( red_shift == 7 && green_shift == 2 && blue_shift == -3
++ && !d8 && same_msb_lsb )
++ mode = BPP16_7_2_M3;
++ else
++ mode = bppc == 17 ? BPP16_LSB : BPP16_MSB;
++ } else if( bppc == 24 || bppc == 25 ) { // 24 bit MSB/LSB
++ mode = bppc == 25 ? BPP24_LSB : BPP24_MSB;
++ } else if( bppc == 32 || bppc == 33 ) { // 32 bit MSB/LSB
++ if( red_shift == 16 && green_shift == 8 && blue_shift == 0
++ && !d8 && same_msb_lsb )
++ mode = BPP32_16_8_0;
++ else
++ mode = bppc == 33 ? BPP32_LSB : BPP32_MSB;
++ } else
++ qFatal("Logic error 3");
+
+ #define GET_PIXEL \
+ int pixel; \
+ if ( d8 ) pixel = pix[*src++]; \
+ else { \
+- GET_RGB \
+- pixel = (b & blue_mask)|(g & green_mask) | (r & red_mask) \
++ int r = qRed ( *p ); \
++ int g = qGreen( *p ); \
++ int b = qBlue ( *p++ ); \
++ r = red_shift > 0 \
++ ? r << red_shift : r >> -red_shift; \
++ g = green_shift > 0 \
++ ? g << green_shift : g >> -green_shift; \
++ b = blue_shift > 0 \
++ ? b << blue_shift : b >> -blue_shift; \
++ pixel = (r & red_mask)|(g & green_mask) | (b & blue_mask) \
+ | ~(blue_mask | green_mask | red_mask); \
+ }
+
++// optimized case - no d8 case, shift only once instead of twice, mask only once instead of twice,
++// use direct values instead of variables, and use only one statement
++// (*p >> 16), (*p >> 8 ) and (*p) are qRed(),qGreen() and qBlue() without masking
++// shifts have to be passed including the shift operator (e.g. '>>3'), because of the direction
++#define GET_PIXEL_OPT(red_shift,green_shift,blue_shift,red_mask,green_mask,blue_mask) \
++ int pixel = ((( *p >> 16 ) red_shift ) & red_mask ) \
++ | ((( *p >> 8 ) green_shift ) & green_mask ) \
++ | ((( *p ) blue_shift ) & blue_mask ); \
++ ++p;
++
+ #define GET_PIXEL_DITHER_TC \
+ int r = qRed ( *p ); \
+ int g = qGreen( *p ); \
+@@ -1374,91 +1409,177 @@ bool QPixmap::convertFromImage( const QI
+ ? g << green_shift : g >> -green_shift; \
+ b = blue_shift > 0 \
+ ? b << blue_shift : b >> -blue_shift; \
+- int pixel = (b & blue_mask)|(g & green_mask) | (r & red_mask);
++ int pixel = (r & red_mask)|(g & green_mask) | (b & blue_mask);
+
+- if ( dither_tc ) {
+- uint x;
+- switch ( bppc ) {
+- case 16: // 16 bit MSB
+- for ( x=0; x<w; x++ ) {
+- GET_PIXEL_DITHER_TC
+- *dst++ = (pixel >> 8);
+- *dst++ = pixel;
+- }
++// again, optimized case
++// can't be optimized that much :(
++#define GET_PIXEL_DITHER_TC_OPT(red_shift,green_shift,blue_shift,red_mask,green_mask,blue_mask, \
++ rbits,gbits,bbits) \
++ const int thres = D[x%16][y%16]; \
++ int r = qRed ( *p ); \
++ if ( r <= (255-(1<<(8-rbits))) && ((r<<rbits) & 255) \
++ > thres) \
++ r += (1<<(8-rbits)); \
++ int g = qGreen( *p ); \
++ if ( g <= (255-(1<<(8-gbits))) && ((g<<gbits) & 255) \
++ > thres) \
++ g += (1<<(8-gbits)); \
++ int b = qBlue ( *p++ ); \
++ if ( b <= (255-(1<<(8-bbits))) && ((b<<bbits) & 255) \
++ > thres) \
++ b += (1<<(8-bbits)); \
++ int pixel = (( r red_shift ) & red_mask ) \
++ | (( g green_shift ) & green_mask ) \
++ | (( b blue_shift ) & blue_mask );
++
++#define CYCLE(body) \
++ for ( uint y=0; y<h; y++ ) { \
++ uchar* src = image.scanLine( y ); \
++ uchar* dst = newbits + xi->bytes_per_line*y; \
++ QRgb* p = (QRgb *)src; \
++ body \
++ }
++
++ if ( dither_tc ) {
++ switch ( mode ) {
++ case BPP16_8_3_M3:
++ CYCLE(
++ Q_INT16* dst16 = (Q_INT16*)dst;
++ for ( uint x=0; x<w; x++ ) {
++ GET_PIXEL_DITHER_TC_OPT(<<8,<<3,>>3,0xf800,0x7e0,0x1f,5,6,5)
++ *dst16++ = pixel;
++ }
++ )
+ break;
+- case 17: // 16 bit LSB
+- for ( x=0; x<w; x++ ) {
+- GET_PIXEL_DITHER_TC
+- *dst++ = pixel;
+- *dst++ = pixel >> 8;
+- }
++ case BPP16_7_2_M3:
++ CYCLE(
++ Q_INT16* dst16 = (Q_INT16*)dst;
++ for ( uint x=0; x<w; x++ ) {
++ GET_PIXEL_DITHER_TC_OPT(<<7,<<2,>>3,0x7c00,0x3e0,0x1f,5,5,5)
++ *dst16++ = pixel;
++ }
++ )
++ break;
++ case BPP16_MSB: // 16 bit MSB
++ CYCLE(
++ for ( uint x=0; x<w; x++ ) {
++ GET_PIXEL_DITHER_TC
++ *dst++ = (pixel >> 8);
++ *dst++ = pixel;
++ }
++ )
++ break;
++ case BPP16_LSB: // 16 bit LSB
++ CYCLE(
++ for ( uint x=0; x<w; x++ ) {
++ GET_PIXEL_DITHER_TC
++ *dst++ = pixel;
++ *dst++ = pixel >> 8;
++ }
++ )
+ break;
+ default:
+ qFatal("Logic error");
+ }
+- } else {
+- uint x;
+- switch ( bppc ) {
+- case 8: // 8 bit
+- for ( x=0; x<w; x++ ) {
+- int pixel = pix[*src++];
+- *dst++ = pixel;
+- }
++ } else {
++ switch ( mode ) {
++ case BPP8: // 8 bit
++ CYCLE(
++ Q_UNUSED(p);
++ for ( uint x=0; x<w; x++ ) {
++ int pixel = pix[*src++];
++ *dst++ = pixel;
++ }
++ )
+ break;
+- case 16: // 16 bit MSB
+- for ( x=0; x<w; x++ ) {
+- GET_PIXEL
+- *dst++ = (pixel >> 8);
+- *dst++ = pixel;
+- }
++ case BPP16_8_3_M3:
++ CYCLE(
++ Q_INT16* dst16 = (Q_INT16*)dst;
++ for ( uint x=0; x<w; x++ ) {
++ GET_PIXEL_OPT(<<8,<<3,>>3,0xf800,0x7e0,0x1f)
++ *dst16++ = pixel;
++ }
++ )
+ break;
+- case 17: // 16 bit LSB
+- for ( x=0; x<w; x++ ) {
+- GET_PIXEL
+- *dst++ = pixel;
+- *dst++ = pixel >> 8;
+- }
++ case BPP16_7_2_M3:
++ CYCLE(
++ Q_INT16* dst16 = (Q_INT16*)dst;
++ for ( uint x=0; x<w; x++ ) {
++ GET_PIXEL_OPT(<<7,<<2,>>3,0x7c00,0x3e0,0x1f)
++ *dst16++ = pixel;
++ }
++ )
+ break;
+- case 24: // 24 bit MSB
+- for ( x=0; x<w; x++ ) {
+- GET_PIXEL
+- *dst++ = pixel >> 16;
+- *dst++ = pixel >> 8;
+- *dst++ = pixel;
+- }
++ case BPP16_MSB: // 16 bit MSB
++ CYCLE(
++ for ( uint x=0; x<w; x++ ) {
++ GET_PIXEL
++ *dst++ = (pixel >> 8);
++ *dst++ = pixel;
++ }
++ )
+ break;
+- case 25: // 24 bit LSB
+- for ( x=0; x<w; x++ ) {
+- GET_PIXEL
+- *dst++ = pixel;
+- *dst++ = pixel >> 8;
+- *dst++ = pixel >> 16;
+- }
++ case BPP16_LSB: // 16 bit LSB
++ CYCLE(
++ for ( uint x=0; x<w; x++ ) {
++ GET_PIXEL
++ *dst++ = pixel;
++ *dst++ = pixel >> 8;
++ }
++ )
+ break;
+- case 32: // 32 bit MSB
+- for ( x=0; x<w; x++ ) {
+- GET_PIXEL
+- *dst++ = pixel >> 24;
+- *dst++ = pixel >> 16;
+- *dst++ = pixel >> 8;
+- *dst++ = pixel;
+- }
++ case BPP24_MSB: // 24 bit MSB
++ CYCLE(
++ for ( uint x=0; x<w; x++ ) {
++ GET_PIXEL
++ *dst++ = pixel >> 16;
++ *dst++ = pixel >> 8;
++ *dst++ = pixel;
++ }
++ )
+ break;
+- case 33: // 32 bit LSB
+- for ( x=0; x<w; x++ ) {
+- GET_PIXEL
+- *dst++ = pixel;
+- *dst++ = pixel >> 8;
+- *dst++ = pixel >> 16;
+- *dst++ = pixel >> 24;
+- }
++ case BPP24_LSB: // 24 bit LSB
++ CYCLE(
++ for ( uint x=0; x<w; x++ ) {
++ GET_PIXEL
++ *dst++ = pixel;
++ *dst++ = pixel >> 8;
++ *dst++ = pixel >> 16;
++ }
++ )
+ break;
+- default:
+- qFatal("Logic error 2");
+- }
+- }
+- }
+- xi->data = (char *)newbits;
++ case BPP32_16_8_0:
++ CYCLE(
++ memcpy( dst, p, w * 4 );
++ )
++ break;
++ case BPP32_MSB: // 32 bit MSB
++ CYCLE(
++ for ( uint x=0; x<w; x++ ) {
++ GET_PIXEL
++ *dst++ = pixel >> 24;
++ *dst++ = pixel >> 16;
++ *dst++ = pixel >> 8;
++ *dst++ = pixel;
++ }
++ )
++ break;
++ case BPP32_LSB: // 32 bit LSB
++ CYCLE(
++ for ( uint x=0; x<w; x++ ) {
++ GET_PIXEL
++ *dst++ = pixel;
++ *dst++ = pixel >> 8;
++ *dst++ = pixel >> 16;
++ *dst++ = pixel >> 24;
++ }
++ )
++ break;
++ default:
++ qFatal("Logic error 2");
++ }
++ }
++ xi->data = (char *)newbits;
+ }
+
+ if ( d == 8 && !trucol ) { // 8 bit pixmap
+@@ -1738,15 +1859,24 @@ bool QPixmap::convertFromImage( const QI
+
+ if (image.depth() == 32) {
+ const int *iptr = (const int *) image.bits();
+- int max = w * h;
+- while (max--)
+- *aptr++ = *iptr++ >> 24; // squirt
++ if( axi->bytes_per_line == (int)w ) {
++ int max = w * h;
++ while (max--)
++ *aptr++ = *iptr++ >> 24; // squirt
++ } else {
++ for (uint i = 0; i < h; ++i ) {
++ for (uint j = 0; j < w; ++j )
++ *aptr++ = *iptr++ >> 24; // squirt
++ aptr += ( axi->bytes_per_line - w );
++ }
++ }
+ } else if (image.depth() == 8) {
+ const QRgb * const rgb = image.colorTable();
+ for (uint y = 0; y < h; ++y) {
+ const uchar *iptr = image.scanLine(y);
+ for (uint x = 0; x < w; ++x)
+ *aptr++ = qAlpha(rgb[*iptr++]);
++ aptr += ( axi->bytes_per_line - w );
+ }
+ }
+
diff --git a/x11-toolkits/qt33/files/0015-qiconview-finditem.patch b/x11-toolkits/qt33/files/0015-qiconview-finditem.patch
new file mode 100644
index 000000000000..1c02622972fe
--- /dev/null
+++ b/x11-toolkits/qt33/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-toolkits/qt33/files/0016-qiconview-rebuildcontainer.patch b/x11-toolkits/qt33/files/0016-qiconview-rebuildcontainer.patch
new file mode 100644
index 000000000000..df1c36ad7117
--- /dev/null
+++ b/x11-toolkits/qt33/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-toolkits/qt33/files/0017-qiconview-ctrl_rubber.patch b/x11-toolkits/qt33/files/0017-qiconview-ctrl_rubber.patch
new file mode 100644
index 000000000000..02611de85f13
--- /dev/null
+++ b/x11-toolkits/qt33/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-toolkits/qt33/files/0020-designer-deletetabs.patch b/x11-toolkits/qt33/files/0020-designer-deletetabs.patch
new file mode 100644
index 000000000000..23b1e1d300a2
--- /dev/null
+++ b/x11-toolkits/qt33/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-toolkits/qt33/files/0032-fix_rotated_randr.diff b/x11-toolkits/qt33/files/0032-fix_rotated_randr.diff
new file mode 100644
index 000000000000..276e5994cc0b
--- /dev/null
+++ b/x11-toolkits/qt33/files/0032-fix_rotated_randr.diff
@@ -0,0 +1,94 @@
+qt-bugs@ issue : N34454
+bugs.kde.org number : 67101
+applied: no
+author: Hamish Rodda <rodda@kde.org>
+
+Qt doesn't take screen rotation into account when determining desktop width
+and height
+
+Qt doesn't detect a change in desktop size when the rotation of the screen
+changes to be at right angles (90 and 270 degrees) to the normal rotation (0
+degrees). The xlib functions DisplayWidth / DisplayHeight and WidthOfScreen /
+HeightOfScreen do not take into account the rotation of the screen.
+
+This causes KDE not to reconfigure itself when the rotation of the screen is
+changed.
+
+This patch switches width and height of the desktop when the screen is rotated
+to 90 or 270 degrees. I've only done this for the non-xinerama case, and only
+for QDesktopWidget. I imagine that xinerama needs to have this change made
+too.
+
+Index: src/kernel/qapplication_x11.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/src/kernel/qapplication_x11.cpp,v
+retrieving revision 1.95
+diff -u -p -r1.95 qapplication_x11.cpp
+--- src/kernel/qapplication_x11.cpp 20 Oct 2003 13:53:50 -0000 1.95
++++ src/kernel/qapplication_x11.cpp 8 Nov 2003 03:05:57 -0000
+@@ -3493,10 +3493,23 @@ int QApplication::x11ProcessEvent( XEven
+
+ // update the size for desktop widget
+ int scr = XRRRootToScreen( appDpy, event->xany.window );
++
++ // Determine if we're at right-angles & thus DisplayWidth/DisplayHeight should be switched
++ XRRScreenConfiguration* xrrconfig;
++ xrrconfig = XRRGetScreenInfo( appDpy, event->xany.window );
++ Rotation rotation;
++ XRRConfigCurrentConfiguration( xrrconfig, &rotation );
++ XRRFreeScreenConfigInfo( xrrconfig );
++
+ QWidget *w = desktop()->screen( scr );
+ QSize oldSize( w->size() );
+- w->crect.setWidth( DisplayWidth( appDpy, scr ) );
+- w->crect.setHeight( DisplayHeight( appDpy, scr ) );
++ if (rotation & (RR_Rotate_90 | RR_Rotate_270)) {
++ w->crect.setWidth( DisplayHeight( appDpy, scr ) );
++ w->crect.setHeight( DisplayWidth( appDpy, scr ) );
++ } else {
++ w->crect.setWidth( DisplayWidth( appDpy, scr ) );
++ w->crect.setHeight( DisplayHeight( appDpy, scr ) );
++ }
+ if ( w->size() != oldSize ) {
+ QResizeEvent e( w->size(), oldSize );
+ QApplication::sendEvent( w, &e );
+Index: src/kernel/qdesktopwidget_x11.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/src/kernel/qdesktopwidget_x11.cpp,v
+retrieving revision 1.19
+diff -u -p -r1.19 qdesktopwidget_x11.cpp
+--- src/kernel/qdesktopwidget_x11.cpp 16 May 2003 13:02:39 -0000 1.19
++++ src/kernel/qdesktopwidget_x11.cpp 8 Nov 2003 03:05:58 -0000
+@@ -44,6 +44,9 @@ extern int qt_x11_create_desktop_on_scre
+ // defined in qapplication_x11.cpp
+ extern Atom qt_net_workarea;
+ extern bool qt_net_supports(Atom atom);
++#ifndef QT_NO_XRANDR
++extern bool qt_use_xrandr;
++#endif
+
+ // function to update the workarea of the screen
+ static bool qt_desktopwidget_workarea_dirty = TRUE;
+@@ -154,6 +157,22 @@ void QDesktopWidgetPrivate::init()
+ y = 0;
+ w = WidthOfScreen(ScreenOfDisplay(QPaintDevice::x11AppDisplay(), i));
+ h = HeightOfScreen(ScreenOfDisplay(QPaintDevice::x11AppDisplay(), i));
++
++#ifndef QT_NO_XRANDR
++ if (qt_use_xrandr) {
++ XRRScreenConfiguration* xrrconfig;
++ xrrconfig = XRRGetScreenInfo(QPaintDevice::x11AppDisplay(), QPaintDevice::x11AppRootWindow( i ));
++ Rotation rotation;
++ XRRConfigCurrentConfiguration(xrrconfig, &rotation);
++ XRRFreeScreenConfigInfo(xrrconfig);
++
++ if (rotation & (RR_Rotate_90 | RR_Rotate_270)) {
++ int tmp = h;
++ h = w;
++ w = tmp;
++ }
++ }
++#endif
+ }
+
+ rects[i].setRect(x, y, w, h);
diff --git a/x11-toolkits/qt33/files/0035-qvaluelist-streaming-operator.patch b/x11-toolkits/qt33/files/0035-qvaluelist-streaming-operator.patch
new file mode 100644
index 000000000000..f4c225a85c58
--- /dev/null
+++ b/x11-toolkits/qt33/files/0035-qvaluelist-streaming-operator.patch
@@ -0,0 +1,27 @@
+qt-bugs@ issue: 40192
+applied: no
+author: Frerich Raabe <raabe@kde.org>
+
+This patch should fix QValueList's streaming operator>> for cases where
+the stream operates on a byte array smaller than a Q_UINT32 (for instance,
+QByteArray objects which are 0-3 bytes in size). It used to read one bogus
+item because the loop would get executed once even if reading the 'c'
+variable failed.
+
+--- src/tools/qvaluelist.h.orig 2004-01-27 21:10:52.000000000 +0000
++++ src/tools/qvaluelist.h 2004-01-27 21:11:35.000000000 +0000
+@@ -636,13 +636,11 @@
+ l.clear();
+ Q_UINT32 c;
+ s >> c;
+- for( Q_UINT32 i = 0; i < c; ++i )
++ for( Q_UINT32 i = 0; i < c && !s.atEnd(); ++i )
+ {
+ T t;
+ s >> t;
+ l.append( t );
+- if ( s.atEnd() )
+- break;
+ }
+ return s;
+ }
diff --git a/x11-toolkits/qt33/files/0036-qprogressbar-optimization.patch b/x11-toolkits/qt33/files/0036-qprogressbar-optimization.patch
new file mode 100644
index 000000000000..e93096b1c5ff
--- /dev/null
+++ b/x11-toolkits/qt33/files/0036-qprogressbar-optimization.patch
@@ -0,0 +1,126 @@
+qt-bugs@ issue: 40356
+applied: no
+author: Frerich Raabe <raabe@kde.org>
+
+This optimization makes QProgressBar::setProgress() only repaint itself if
+stepping to the new progress would cause a graphical change. This means
+that for a width W and a total number of steps S, it will repaint itself
+'W' times (every 'S/W' steps) instead of 'S' times (every step) as it is right
+now.
+
+--- src/widgets/qprogressbar.h.orig 2004-01-30 11:10:24.000000000 +0000
++++ src/widgets/qprogressbar.h 2004-01-29 22:24:06.000000000 +0000
+@@ -61,6 +61,7 @@
+ public:
+ QProgressBar( QWidget* parent=0, const char* name=0, WFlags f=0 );
+ QProgressBar( int totalSteps, QWidget* parent=0, const char* name=0, WFlags f=0 );
++ virtual ~QProgressBar();
+
+ int totalSteps() const;
+ int progress() const;
+@@ -91,6 +92,7 @@
+ virtual bool setIndicator( QString & progress_str, int progress,
+ int totalSteps );
+ void styleChange( QStyle& );
++ bool requireRepaint( int newProgress ) const;
+
+ private:
+ int total_steps;
+--- src/widgets/qprogressbar.cpp.orig 2004-01-30 11:10:24.000000000 +0000
++++ src/widgets/qprogressbar.cpp 2004-01-30 11:13:03.000000000 +0000
+@@ -47,6 +47,14 @@
+ #endif
+ #include <limits.h>
+
++class QProgressBarPrivate
++{
++ public:
++ QProgressBarPrivate() : last_painted_progress( 0 ) { }
++
++ int last_painted_progress;
++};
++
+ /*!
+ \class QProgressBar qprogressbar.h
+ \brief The QProgressBar widget provides a horizontal progress bar.
+@@ -99,7 +107,7 @@
+ center_indicator( TRUE ),
+ auto_indicator( TRUE ),
+ percentage_visible( TRUE ),
+- d( 0 )
++ d( new QProgressBarPrivate )
+ {
+ setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ initFrame();
+@@ -130,12 +138,20 @@
+ center_indicator( TRUE ),
+ auto_indicator( TRUE ),
+ percentage_visible( TRUE ),
+- d( 0 )
++ d( new QProgressBarPrivate )
+ {
+ setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ initFrame();
+ }
+
++/*!
++ Destroys the object and frees any allocated ressources.
++*/
++
++QProgressBar::~QProgressBar()
++{
++ delete d;
++}
+
+ /*!
+ Reset the progress bar. The progress bar "rewinds" and shows no
+@@ -188,11 +204,16 @@
+ progress < 0 || ( ( progress > total_steps ) && total_steps ) )
+ return;
+
++ const bool needRepaint = isVisible() && requireRepaint( progress );
++
+ progress_val = progress;
+
+ setIndicator( progress_str, progress_val, total_steps );
+
+- repaint( FALSE );
++ if ( needRepaint ) {
++ repaint( FALSE );
++ d->last_painted_progress = progress;
++ }
+
+ #if defined(QT_ACCESSIBILITY_SUPPORT)
+ QAccessible::updateAccessibility( this, 0, QAccessible::ValueChanged );
+@@ -318,6 +339,31 @@
+ QFrame::styleChange( old );
+ }
+
++/*!
++ This method returns whether changing the progress to the \a newValue
++ would require a repaint of the progress bar. This allows efficient
++ repainting.
++*/
++bool QProgressBar::requireRepaint( int newProgress ) const
++{
++ if ( newProgress == progress_val ||
++ newProgress == d->last_painted_progress ) {
++ return false;
++ }
++
++ const int width = contentsRect().width();
++ if ( width == 0 ) {
++ return false;
++ }
++
++ float progressPerPixel = 1.0;
++ if ( total_steps > width ) {
++ progressPerPixel = float( total_steps ) / float( width );
++ }
++
++ const int delta = d->last_painted_progress - newProgress;
++ return QABS( delta ) >= progressPerPixel;
++}
+
+ /*!
+ This method is called to generate the text displayed in the center
diff --git a/x11-toolkits/qt33/files/0037-dnd-timestamp-fix.patch b/x11-toolkits/qt33/files/0037-dnd-timestamp-fix.patch
new file mode 100644
index 000000000000..234e1b794705
--- /dev/null
+++ b/x11-toolkits/qt33/files/0037-dnd-timestamp-fix.patch
@@ -0,0 +1,56 @@
+qt-bugs@ issue : 38794
+bugs.kde.org number : 69519
+applied: no
+author: Lubos Lunak <l.lunak@kde.org>
+
+ Hello,
+
+please consider applying the attached patch. It changes XDND handling code to
+put the drop timestamp in the right field in the XdndDrop message according
+to http://www.newplanetsoftware.com/xdnd/ . I'm not quite sure why the code
+has the field moved by one, and puts 1<<24 in the flags, but I see it has a
+todo mark next to it. The last snippet of the patch changes it to match the
+XDND spec. I tested briefly with Gtk, Mozilla and OOo, and they still work
+with the patch.
+
+The rest of the patch is for fixing part of
+http://bugs.kde.org/show_bug.cgi?id=69519, when the user drags some data to
+the desktop, and desktop in response popups a dialog asking for filename.
+Without the X user timestamp (qt-bugs@ issue 24923) being updated after the
+drop, KWin's focus stealing prevention will refuse to activate the dialog. As
+the XdndDrop message is kind of an user action too, the timestamp should be
+updated.
+
+--- src/kernel/qdnd_x11.cpp.sav 2004-01-05 19:18:33.000000000 +0100
++++ src/kernel/qdnd_x11.cpp 2004-01-08 19:08:52.000000000 +0100
+@@ -81,6 +81,7 @@ extern void qt_leave_modal( QWidget *wid
+ extern Window qt_x11_findClientWindow( Window, Atom, bool );
+ extern Atom qt_wm_state;
+ extern Time qt_x_time;
++extern Time qt_x_user_time;
+
+ // this stuff is copied from qclb_x11.cpp
+
+@@ -834,6 +835,9 @@ void qt_handle_xdnd_drop( QWidget *, con
+ // l[0], qt_xdnd_dragsource_xid );
+ return;
+ }
++
++ if( l[2] != 0 )
++ qt_x_user_time = l[2];
+ if ( qt_xdnd_source_object )
+ qt_xdnd_source_object->setTarget( qt_xdnd_current_widget );
+
+@@ -1366,9 +1370,9 @@ void QDragManager::drop()
+ drop.format = 32;
+ drop.message_type = qt_xdnd_drop;
+ drop.data.l[0] = object->source()->winId();
+- drop.data.l[1] = 1 << 24; // flags
+- drop.data.l[2] = 0; // ###
+- drop.data.l[3] = qt_x_time;
++ drop.data.l[1] = 0; // flags
++ drop.data.l[2] = qt_x_time;
++ drop.data.l[3] = 0;
+ drop.data.l[4] = 0;
+
+ QWidget * w = QWidget::find( qt_xdnd_current_proxy_target );
diff --git a/x11-toolkits/qt33/files/0038-dragobject-dont-prefer-unknown.patch b/x11-toolkits/qt33/files/0038-dragobject-dont-prefer-unknown.patch
new file mode 100644
index 000000000000..ae4163ae2d29
--- /dev/null
+++ b/x11-toolkits/qt33/files/0038-dragobject-dont-prefer-unknown.patch
@@ -0,0 +1,57 @@
+qt-bugs@ issue : 38642
+bugs.kde.org number : 71084
+applied: no
+author: Lubos Lunak <l.lunak@kde.org>
+
+Hello,
+
+ start Mozilla, go e.g. to http://kde.org, start KWrite (or basically any Qt
+app that accepts text drops), select 'Conquer your Desktop!', and try to
+drag&drop it onto KWrite. The only text pasted should be 'm'.
+
+ I don't know much the related mimetype and encoding stuff, so I'm unsure
+whose fault this actually is. The text drag is provided as a lot of
+text/something targets, to list some text/_moz_htmlinfo, text/x-moz-url,
+text/unicode and similar. The problem is, Kate uses QTextDrag::decode() with
+no subtype specified, probably with the intention that as Kate is a text
+editor, it can accept any text pasted. And since the first target provided by
+mozilla is text/x-moz-url, (which moreover seems to be encoded as 16bit
+unicode), the text dropped is completely wrong. You can easily see all
+targets provided by Mozilla with see_mime.patch applied.
+
+ Solution #1: Say that Kate (any pretty much everybody else expecting text)
+should say "plain" as the subtype. In such case, I suggest you drop the
+QTextDrag::decode() variant with no subtype specified, and stress more the
+fact that not specifying a subtype can result in a lot of rubbish. It's
+simply too tempting to leave the subtype empty and try to accept anything.
+
+ Solution #2: When trying to accept anything, try to get useful data. Which
+means either sorting the subtypes available somehow, checking only the ones
+Qt knows.
+
+ To me, #1 seems to be a better choice, or possibly at least something like
+the attached QTextDrag patch, which simply always tries first "plain" subtype
+if none is specified. With this patch, Mozilla even works (that's irony, of
+course, Mozilla still pastes the text/plain text as HTML, but at least now it
+pastes something where it's easy to point at the offender).
+
+
+--- src/kernel/qdragobject.cpp.sav 2004-01-06 19:24:35.000000000 +0100
++++ src/kernel/qdragobject.cpp 2004-01-06 19:47:01.000000000 +0100
+@@ -844,6 +844,16 @@ bool QTextDrag::decode( const QMimeSourc
+ {
+ if(!e)
+ return FALSE;
++
++ // when subtype is not specified, try text/plain first, otherwise this may read
++ // things like text/x-moz-url even though better targets are available
++ if( subtype.isNull()) {
++ QCString subtmp = "plain";
++ if( decode( e, str, subtmp )) {
++ subtype = subtmp;
++ return true;
++ }
++ }
+
+ if ( e->cacheType == QMimeSource::Text ) {
+ str = *e->cache.txt.str;
diff --git a/x11-toolkits/qt33/files/0044-qscrollview-windowactivate-fix.diff b/x11-toolkits/qt33/files/0044-qscrollview-windowactivate-fix.diff
new file mode 100644
index 000000000000..9a6df32a7c4f
--- /dev/null
+++ b/x11-toolkits/qt33/files/0044-qscrollview-windowactivate-fix.diff
@@ -0,0 +1,38 @@
+qt-bugs@ issue : N45716
+applied: no
+author: Enrico Ros <eros.kde@email.it>
+
+QScrollView unwanted repaint fix.
+
+This fixes the 'flashing' konqueror window on activation / deactivation by
+saving 1 unwanted repaint (when konqueror window has background).
+I tracked down to the problem to the internal QViewportWidget of the
+QScrollView class.
+
+When a window is activated the activation event is recursively propagated
+to all childs triggering the windowActivationChange() functions in the
+widget it passes by.
+What happens when the event gets to the Viewport?
+At this point the event has already been handled by windowActivationChange()
+of the parent widget (a QIconView for example) and has then been propagated
+to the Viewport that will handle it with the default
+QWidget::windowActivationChange implementation, maybe raising an unwanted
+update(); so here we stop the event.
+As an addition: if the parent reimplements the windowActivationChange()
+function, mainly to block the update, it won't be happy if the child will
+trigger the update. If the parent do not reimplement the function il will
+inherits the default implementation and there is no need for the viewport's
+one.
+
+--- src/widgets/qscrollview.cpp.orig 2004-03-29 10:17:04.000000000 +0000
++++ src/widgets/qscrollview.cpp 2004-03-30 16:40:07.599978320 +0000
+@@ -1551,6 +1551,9 @@
+ case QEvent::LayoutHint:
+ d->autoResizeHint(this);
+ break;
++ case QEvent::WindowActivate:
++ case QEvent::WindowDeactivate:
++ return TRUE;
+ default:
+ break;
+ }
diff --git a/x11-toolkits/qt33/files/0046-qiconview-no-useless-scrollbar.diff b/x11-toolkits/qt33/files/0046-qiconview-no-useless-scrollbar.diff
new file mode 100644
index 000000000000..64daf3874210
--- /dev/null
+++ b/x11-toolkits/qt33/files/0046-qiconview-no-useless-scrollbar.diff
@@ -0,0 +1,150 @@
+qt-bugs@ issue: N46490
+bugs.kde.org number: 69589
+applied: no
+author: Benoit Walter <b.walter@free.fr>
+
+Remove unnecessary scrollbar that may appear.
+
+Test case (using konqueror icon view):
+- The first icons are being shown (no scrollbar yet)
+- When there is no space left, a vertical scrollbar is needed
+- The vertical scrollbar may cover the right edge of the icons
+(in the last column) => an horizontal scrollbar is needed :-(
+
+Solution:
+When using ScrollBarMode::Auto, prevent Qt from drawing icons on the
+scrollbar area (before the scrollbar is shown).
+
+Related to KDE bug #69589
+
+Index: qiconview.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/src/iconview/qiconview.cpp,v
+retrieving revision 1.54
+diff -u -3 -p -r1.54 qiconview.cpp
+--- src/iconview/qiconview.cpp 2 Mar 2004 12:50:31 -0000 1.54
++++ src/iconview/qiconview.cpp 12 Apr 2004 10:07:28 -0000
+@@ -1060,7 +1060,7 @@ void QIconViewItem::setText( const QStri
+
+ if ( view ) {
+ if ( QRect( view->contentsX(), view->contentsY(),
+- view->visibleWidth(), view->visibleHeight() ).
++ view->visibleWidthSB(), view->visibleHeightSB() ).
+ intersects( oR ) )
+ view->repaintContents( oR.x() - 1, oR.y() - 1,
+ oR.width() + 2, oR.height() + 2, FALSE );
+@@ -1104,7 +1104,7 @@ void QIconViewItem::setPixmap( const QPi
+
+ if ( view ) {
+ if ( QRect( view->contentsX(), view->contentsY(),
+- view->visibleWidth(), view->visibleHeight() ).
++ view->visibleWidthSB(), view->visibleHeightSB() ).
+ intersects( oR ) )
+ view->repaintContents( oR.x() - 1, oR.y() - 1,
+ oR.width() + 2, oR.height() + 2, FALSE );
+@@ -1140,7 +1140,7 @@ void QIconViewItem::setPicture( const QP
+
+ if ( view ) {
+ if ( QRect( view->contentsX(), view->contentsY(),
+- view->visibleWidth(), view->visibleHeight() ).
++ view->visibleWidthSB(), view->visibleHeightSB() ).
+ intersects( oR ) )
+ view->repaintContents( oR.x() - 1, oR.y() - 1,
+ oR.width() + 2, oR.height() + 2, FALSE );
+@@ -1200,7 +1200,7 @@ void QIconViewItem::setPixmap( const QPi
+
+ if ( view ) {
+ if ( QRect( view->contentsX(), view->contentsY(),
+- view->visibleWidth(), view->visibleHeight() ).
++ view->visibleWidthSB(), view->visibleHeightSB() ).
+ intersects( oR ) )
+ view->repaintContents( oR.x() - 1, oR.y() - 1,
+ oR.width() + 2, oR.height() + 2, FALSE );
+@@ -5448,8 +5448,8 @@ void QIconView::insertInGrid( QIconViewI
+ }
+ item->dirty = FALSE;
+ } else {
+- QRegion r( QRect( 0, 0, QMAX( contentsWidth(), visibleWidth() ),
+- QMAX( contentsHeight(), visibleHeight() ) ) );
++ QRegion r( QRect( 0, 0, QMAX( contentsWidth(), visibleWidthSB() ),
++ QMAX( contentsHeight(), visibleHeightSB() ) ) );
+
+ QIconViewItem *i = d->firstItem;
+ int y = -1;
+@@ -5707,7 +5707,7 @@ QIconViewItem *QIconView::makeRowLayout(
+ QIconViewItem *item = begin;
+ for (;;) {
+ x += d->spacing + item->width();
+- if ( x > visibleWidth() && item != begin ) {
++ if ( x > visibleWidthSB() && item != begin ) {
+ item = item->prev;
+ break;
+ }
+@@ -5732,7 +5732,7 @@ QIconViewItem *QIconView::makeRowLayout(
+ int x;
+ if ( item == begin ) {
+ if ( reverse )
+- x = visibleWidth() - d->spacing - item->width();
++ x = visibleWidthSB() - d->spacing - item->width();
+ else
+ x = d->spacing;
+ } else {
+@@ -5768,7 +5768,7 @@ QIconViewItem *QIconView::makeRowLayout(
+ i += r;
+ x = i * d->rastX + sp * d->spacing;
+ }
+- if ( x > visibleWidth() && item != begin ) {
++ if ( x > visibleWidthSB() && item != begin ) {
+ item = item->prev;
+ break;
+ }
+@@ -5831,7 +5831,7 @@ QIconViewItem *QIconView::makeRowLayout(
+ QIconViewItem *item = begin;
+ for (;;) {
+ y += d->spacing + item->height();
+- if ( y > visibleHeight() && item != begin ) {
++ if ( y > visibleHeightSB() && item != begin ) {
+ item = item->prev;
+ break;
+ }
+@@ -6378,4 +6378,24 @@ bool QIconView::isRenaming() const
+ #endif
+ }
+
++int QIconView::visibleWidthSB() const
++{
++ if ( vScrollBarMode() != Auto )
++ return visibleWidth();
++
++ int offset = verticalScrollBar()->isVisible() ? 0
++ : style().pixelMetric( QStyle::PM_ScrollBarExtent, verticalScrollBar() );
++ return QMAX( 0, visibleWidth() - offset );
++}
++
++int QIconView::visibleHeightSB() const
++{
++ if ( hScrollBarMode() != Auto )
++ return visibleHeight();
++
++ int offset = horizontalScrollBar()->isVisible() ? 0
++ : style().pixelMetric( QStyle::PM_ScrollBarExtent, horizontalScrollBar() );
++ return QMAX( 0, visibleHeight() - offset );
++}
++
+ #endif // QT_NO_ICONVIEW
+Index: qiconview.h
+===================================================================
+RCS file: /home/kde/qt-copy/src/iconview/qiconview.h,v
+retrieving revision 1.35
+diff -u -3 -p -r1.35 qiconview.h
+--- src/iconview/qiconview.h 16 May 2003 13:02:38 -0000 1.35
++++ src/iconview/qiconview.h 12 Apr 2004 10:07:58 -0000
+@@ -496,6 +496,8 @@ private:
+ const QPoint &relativeTo,
+ const QIconViewItem *item ) const;
+ QBitmap mask( QPixmap *pix ) const;
++ int visibleWidthSB() const;
++ int visibleHeightSB() const;
+
+ QIconViewPrivate *d;
+
diff --git a/x11-toolkits/qt33/files/0047-fix-kmenu-width.diff b/x11-toolkits/qt33/files/0047-fix-kmenu-width.diff
new file mode 100644
index 000000000000..fb0bb1678de2
--- /dev/null
+++ b/x11-toolkits/qt33/files/0047-fix-kmenu-width.diff
@@ -0,0 +1,25 @@
+qt-bugs@ issue: N46882
+bugs.kde.org number: 77545
+applied: no
+author: Stephan Binner <binner@kde.org>
+
+Fix wrong K menu width for the case of enabled side pixmap and a menu title
+(like "Recently Used Applications") being longer than every other entry.
+
+Solution: Respect PanelKMenu::setMaximumSize() as up to Qt 3.2.3
+
+Index: src/widgets/qpopupmenu.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/src/widgets/qpopupmenu.cpp,v
+retrieving revision 1.60
+diff -u -3 -p -b -r1.60 qpopupmenu.cpp
+--- src/widgets/qpopupmenu.cpp 29 Apr 2004 22:31:28 -0000 1.60
++++ src/widgets/qpopupmenu.cpp 30 Apr 2004 01:11:59 -0000
+@@ -2531,7 +2531,7 @@ QSize QPopupMenu::sizeHint() const
+
+ QPopupMenu* that = (QPopupMenu*) this;
+ //We do not need a resize here, just the sizeHint..
+- return that->updateSize(FALSE, FALSE).expandedTo( QApplication::globalStrut() );
++ return that->updateSize(FALSE).expandedTo( QApplication::globalStrut() );
+ }
+
diff --git a/x11-toolkits/qt33/files/0048-qclipboard_hack_80072.patch b/x11-toolkits/qt33/files/0048-qclipboard_hack_80072.patch
new file mode 100644
index 000000000000..74c60fb25588
--- /dev/null
+++ b/x11-toolkits/qt33/files/0048-qclipboard_hack_80072.patch
@@ -0,0 +1,48 @@
+qt-bugs@ issue : none, probably even won't be
+bugs.kde.org number : 80072
+applied: no
+author: Lubos Lunak <l.lunak@kde.org>
+
+A crude hack for KDE #80072. No good idea how to fix it properly yet :(.
+
+--- src/kernel/qclipboard_x11.cpp.sav 2004-04-30 12:00:06.000000000 +0200
++++ src/kernel/qclipboard_x11.cpp 2004-05-09 21:18:10.269264304 +0200
+@@ -109,6 +109,7 @@ static int pending_timer_id = 0;
+ static bool pending_clipboard_changed = FALSE;
+ static bool pending_selection_changed = FALSE;
+
++Q_EXPORT bool qt_qclipboard_bailout_hack = false;
+
+ // event capture mechanism for qt_xclb_wait_for_event
+ static bool waiting_for_data = FALSE;
+@@ -453,6 +454,15 @@ static int qt_xclb_event_filter(XEvent *
+ return 0;
+ }
+
++static bool selection_request_pending = false;
++
++static Bool check_selection_request_pending( Display*, XEvent* e, XPointer )
++ {
++ if( e->type == SelectionRequest && e->xselectionrequest.owner == owner->winId())
++ selection_request_pending = true;
++ return False;
++ }
++
+ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
+ int timeout )
+ {
+@@ -504,6 +514,14 @@ bool qt_xclb_wait_for_event( Display *dp
+ do {
+ if ( XCheckTypedWindowEvent(dpy,win,type,event) )
+ return TRUE;
++ if( qt_qclipboard_bailout_hack ) {
++ XEvent dummy;
++ selection_request_pending = false;
++ if ( owner != NULL )
++ XCheckIfEvent(dpy,&dummy,check_selection_request_pending,NULL);
++ if( selection_request_pending )
++ return TRUE;
++ }
+
+ now = QTime::currentTime();
+ if ( started > now ) // crossed midnight
diff --git a/x11-toolkits/qt33/files/0049-qiconview-rubber_on_move.diff b/x11-toolkits/qt33/files/0049-qiconview-rubber_on_move.diff
new file mode 100644
index 000000000000..9ada7f9748ad
--- /dev/null
+++ b/x11-toolkits/qt33/files/0049-qiconview-rubber_on_move.diff
@@ -0,0 +1,114 @@
+qt-bugs@ issue : none
+applied: no
+author: Enrico Ros <eros.kde@email.it>
+
+Unwanted toggling QIconViewItem focus on click.
+
+This fixes the 'flashing' icon when clicking repeatedly on a QIconView or
+derivates (ie KIconView, KonqIconViewWidget, the KDesktop and so on..).
+The current behavior considers that if not over an icon, the user is
+clicking down to perform icons selection (with the rubberband).
+This is not always true, since a click might be used to give focus to a
+window or unselect some icons.
+
+How this is fixed: when clicking down the mouse a flag is set. If the pointer
+is moved on the iconview with the button held down, then (and only at that
+moment) the rubber is created. Now a selection operation (the one done with
+the rubber) begins when moving the mouse and not only when clicking on the
+empty space.
+
+--- src.orig/iconview/qiconview.cpp 2004-05-05 18:55:55.471057880 +0000
++++ src/iconview/qiconview.cpp 2004-05-30 18:24:16.311014024 +0000
+@@ -236,6 +236,7 @@
+ QPoint dragStartPos;
+ QFontMetrics *fm;
+ int minLeftBearing, minRightBearing;
++ int rubberStartX, rubberStartY;
+
+ uint mousePressed :1;
+ uint cleared :1;
+@@ -255,6 +256,7 @@
+ uint firstSizeHint : 1;
+ uint showTips :1;
+ uint pressedSelected :1;
++ uint canStartRubber :1;
+ uint dragging :1;
+ uint drawActiveSelection :1;
+ uint inMenuMode :1;
+@@ -2733,6 +2735,7 @@
+ d->currentItem = 0;
+ d->highlightedItem = 0;
+ d->rubber = 0;
++ d->canStartRubber = FALSE;
+ d->scrollTimer = 0;
+ d->startDragItem = 0;
+ d->tmpCurrentItem = 0;
+@@ -4501,29 +4504,20 @@
+
+ setCurrentItem( item );
+
++ d->canStartRubber = FALSE;
+ if ( e->button() == LeftButton ) {
+- if ( !item && ( d->selectionMode == Multi ||
+- d->selectionMode == Extended ) ) {
+- d->tmpCurrentItem = d->currentItem;
+- d->currentItem = 0;
+- repaintItem( d->tmpCurrentItem );
+- delete d->rubber;
+- d->rubber = new QRect( e->x(), e->y(), 0, 0 );
+- d->selectedItems.clear();
+- 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 );
+- }
++ if ( !item && ( d->selectionMode == Multi || d->selectionMode == Extended ) )
++ {
++ d->canStartRubber = TRUE;
++ d->rubberStartX = e->x();
++ d->rubberStartY = e->y();
+ }
+-
+ d->mousePressed = TRUE;
+ d->controlPressed = ( ( e->state() & ControlButton ) == ControlButton );
+ }
+
+ emit_signals:
+- if ( !d->rubber ) {
++ if ( !d->canStartRubber ) {
+ emit mouseButtonPressed( e->button(), item, e->globalPos() );
+ emit pressed( item );
+ emit pressed( item, e->globalPos() );
+@@ -4567,6 +4561,7 @@
+ d->mousePressed = FALSE;
+ d->startDragItem = 0;
+
++ d->canStartRubber = FALSE;
+ if ( d->rubber ) {
+ QPainter p;
+ p.begin( viewport() );
+@@ -4656,7 +4651,22 @@
+ if ( d->tmpCurrentItem )
+ repaintItem( d->tmpCurrentItem );
+ }
+- } else if ( d->mousePressed && !d->currentItem && d->rubber ) {
++ } else if ( d->mousePressed && ((!d->currentItem && d->rubber) || d->canStartRubber) ) {
++ if ( d->canStartRubber ) {
++ d->canStartRubber = FALSE;
++ d->tmpCurrentItem = d->currentItem;
++ d->currentItem = 0;
++ repaintItem( d->tmpCurrentItem );
++ delete d->rubber;
++ d->rubber = new QRect( d->rubberStartX, d->rubberStartY, 0, 0 );
++ d->selectedItems.clear();
++ 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 );
++ }
++ }
+ doAutoScroll();
+ }
+ }
diff --git a/x11-toolkits/qt33/files/0051-qtoolbar_77047.patch b/x11-toolkits/qt33/files/0051-qtoolbar_77047.patch
new file mode 100644
index 000000000000..40fbfdca874e
--- /dev/null
+++ b/x11-toolkits/qt33/files/0051-qtoolbar_77047.patch
@@ -0,0 +1,29 @@
+qt-bugs@ issue : 54405
+applied: no
+author: Waldo Bastian <bastian@kde.org>
+
+KToolBarButton always uses a non-zero popup-delay because we would like
+to draw the menu-indicator on the toolbar buttons ourselves. Unfortunately
+that means that the menu-item in the toolbar-extension menu does not include
+any sub-menu either. With this patch, KToolBarButton can use a popup-delay
+of -1 so that we can still draw our own popup indicator _AND_ get the sub-menu
+in the toolbar-extension menu.
+
+This fixes http://bugs.kde.org/show_bug.cgi?id=77047
+
+Index: widgets/qtoolbar.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/src/widgets/qtoolbar.cpp,v
+retrieving revision 1.56
+diff -u -p -r1.56 qtoolbar.cpp
+--- src/widgets/qtoolbar.cpp 21 Dec 2003 00:48:21 -0000 1.56
++++ src/widgets/qtoolbar.cpp 12 Aug 2004 11:42:21 -0000
+@@ -648,7 +648,7 @@ void QToolBar::createPopup()
+ QString s = b->textLabel();
+ if ( s.isEmpty() )
+ s = b->text();
+- if ( b->popup() && b->popupDelay() == 0 )
++ if ( b->popup() && b->popupDelay() <= 0 )
+ id = d->extensionPopup->insertItem( b->iconSet(), s, b->popup() );
+ else
+ id = d->extensionPopup->insertItem( b->iconSet(), s, b, SLOT( emulateClick() ) ) ;
diff --git a/x11-toolkits/qt33/files/0053-png-gamma-fix.diff b/x11-toolkits/qt33/files/0053-png-gamma-fix.diff
new file mode 100644
index 000000000000..98346bde5ca5
--- /dev/null
+++ b/x11-toolkits/qt33/files/0053-png-gamma-fix.diff
@@ -0,0 +1,50 @@
+qt-bugs@ issue : N55198
+bugs.kde.org number : 61829
+applied: no
+author: Brad Hards <bradh@frogmouth.net>
+
+This patch fixes a bug report that was logged against KDE for not
+handling gamma correctly (http://bugs.kde.org/show_bug.cgi?id=61829).
+
+Using the example/showimg/showimg example in qt-3.3, the two test
+case images (linked in the original bug report) look the same.
+That isn't the case with a non-Qt based application, such as Mozilla.
+
+The gamma-yes.png file should look a lot lighter in the blue section.
+
+The problem is in src/kernel/qpngio.cpp::setup_qt()
+ if ( screen_gamma != 0.0 && png_get_valid(png_ptr, info_ptr,PNG_INFO_gAMA) ) {
+ double file_gamma;
+ png_get_gAMA(png_ptr, info_ptr, &file_gamma);
+ png_set_gamma( png_ptr, screen_gamma, file_gamma );
+ }
+which is wrong, because file gamma needs to be handled whether or not
+there is a non-default screen gamma value.
+
+
+--- src/kernel/qpngio.cpp 2 Mar 2004 12:50:32 -0000 1.55
++++ src/kernel/qpngio.cpp 25 Aug 2004 08:44:01 -0000
+@@ -109,12 +109,20 @@ void CALLBACK_CALL_TYPE qpiw_flush_fn( p
+
+ static
+ void setup_qt( QImage& image, png_structp png_ptr, png_infop info_ptr, float screen_gamma=0.0 )
+ {
+- if ( screen_gamma != 0.0 && png_get_valid(png_ptr, info_ptr, PNG_INFO_gAMA) ) {
++ if ( 0.0 == screen_gamma )
++ // PNG docs say this is a good guess for a PC monitor
++ // in a dark room
++ screen_gamma = 2.2;
++ if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_gAMA) ) {
++ // the file has a gAMA attribute
+ double file_gamma;
+- png_get_gAMA(png_ptr, info_ptr, &file_gamma);
+- png_set_gamma( png_ptr, screen_gamma, file_gamma );
++ if ( png_get_gAMA(png_ptr, info_ptr, &file_gamma))
++ png_set_gamma( png_ptr, screen_gamma, file_gamma );
++ } else {
++ // no file gamma, use a reasonable default
++ png_set_gamma( png_ptr, screen_gamma, 0.45455 );
+ }
+
+ png_uint_32 width;
+ png_uint_32 height;
diff --git a/x11-toolkits/qt33/files/0056-khotkeys_input_84434.patch b/x11-toolkits/qt33/files/0056-khotkeys_input_84434.patch
new file mode 100644
index 000000000000..f94bb8162de0
--- /dev/null
+++ b/x11-toolkits/qt33/files/0056-khotkeys_input_84434.patch
@@ -0,0 +1,21 @@
+qt-bugs@ issue : 58251
+bugs.kde.org number : 84434
+applied: no
+author: Lubos Lunak <l.lunak@kde.org>
+
+Fixes keyboard input action in KHotKeys (see bug #84434).
+
+--- src/kernel/qapplication_x11.cpp.sav 2004-10-07 15:38:05.000000000 +0200
++++ src/kernel/qapplication_x11.cpp 2004-10-12 11:46:32.513137808 +0200
+@@ -5294,8 +5294,10 @@ static Bool qt_keypress_scanner(Display
+ qt_auto_repeat_data *d = (qt_auto_repeat_data *) arg;
+ if (d->error ||
+ event->xkey.window != d->window ||
+- event->xkey.keycode != d->keycode)
++ event->xkey.keycode != d->keycode) {
++ d->error = TRUE;
+ return FALSE;
++ }
+
+ if (event->type == XKeyPress) {
+ d->error = (! d->release || event->xkey.time - d->timestamp > 10);
diff --git a/x11-toolkits/qt33/files/0059-qpopup_has_mouse.patch b/x11-toolkits/qt33/files/0059-qpopup_has_mouse.patch
new file mode 100644
index 000000000000..620f8e7ad0c0
--- /dev/null
+++ b/x11-toolkits/qt33/files/0059-qpopup_has_mouse.patch
@@ -0,0 +1,68 @@
+qt-bugs@ issue : 49417
+bugs.kde.org number : 58719
+applied: no
+author: Lubos Lunak <l.lunak@kde.org>
+
+Hello,
+
+ please consider applying the two attached QPopupMenu patches fixing KDE bugs
+ #58719 and #74778 (http://bugs.kde.org/show_bug.cgi?id=58719,
+ http://bugs.kde.org/show_bug.cgi?id=74778), which complain about keyboard
+ navigation in popup menus being very uncomfortable because of being affected
+ by mouse position despite mouse not being used at all.
+
+ - hasmouse.patch - (#58719) - use keyboard to open and navigate in any popup
+ menu and "accidentally" hit your mouse. Depending on the mouse cursor
+ position either no popup entry is selected or the random popup entry
+ happening to be at the cursor position becomes highlighted. The patch
+ basically copies the 'hasmouse' code from QMenuBar which prevents the mouse
+ having any effect on the popup if it's outside the popup geometry.
+
+ [ ... #74778 ... ]
+
+--- src/widgets/qpopupmenu.cpp.sav 2004-05-25 21:58:23.000000000 +0200
++++ src/widgets/qpopupmenu.cpp 2004-05-25 22:02:19.520297888 +0200
+@@ -253,6 +253,7 @@ public:
+ } scroll;
+ QSize calcSize;
+ QRegion mouseMoveBuffer;
++ uint hasmouse : 1;
+ };
+
+ static QPopupMenu* active_popup_menu = 0;
+@@ -272,6 +273,7 @@ QPopupMenu::QPopupMenu( QWidget *parent,
+ d->scroll.scrollableSize = d->scroll.topScrollableIndex = 0;
+ d->scroll.scrollable = QPopupMenuPrivate::Scroll::ScrollNone;
+ d->scroll.scrolltimer = 0;
++ d->hasmouse = 0;
+ isPopupMenu = TRUE;
+ #ifndef QT_NO_ACCEL
+ autoaccel = 0;
+@@ -1740,6 +1742,11 @@ void QPopupMenu::mouseMoveEvent( QMouseE
+
+ int item = itemAtPos( e->pos() );
+ if ( item == -1 ) { // no valid item
++ if( !d->hasmouse ) {
++ tryMenuBar( e );
++ return;
++ }
++ d->hasmouse = 0;
+ int lastActItem = actItem;
+ actItem = -1;
+ if ( lastActItem >= 0 )
+@@ -1751,6 +1758,7 @@ void QPopupMenu::mouseMoveEvent( QMouseE
+ }
+ } else { // mouse on valid item
+ // but did not register mouse press
++ d->hasmouse = 1;
+ if ( (e->state() & Qt::MouseButtonMask) && !mouseBtDn )
+ mouseBtDn = TRUE; // so mouseReleaseEvent will pop down
+
+@@ -2159,6 +2167,7 @@ void QPopupMenu::timerEvent( QTimerEvent
+ */
+ void QPopupMenu::leaveEvent( QEvent * )
+ {
++ d->hasmouse = 0;
+ if ( testWFlags( WStyle_Tool ) && style().styleHint(QStyle::SH_PopupMenu_MouseTracking, this) ) {
+ int lastActItem = actItem;
+ actItem = -1;
diff --git a/x11-toolkits/qt33/files/0060-qpopup_ignore_mousepos.patch b/x11-toolkits/qt33/files/0060-qpopup_ignore_mousepos.patch
new file mode 100644
index 000000000000..d26279a3f19c
--- /dev/null
+++ b/x11-toolkits/qt33/files/0060-qpopup_ignore_mousepos.patch
@@ -0,0 +1,59 @@
+qt-bugs@ issue : 49417
+bugs.kde.org number : 74778
+applied: no
+author: Lubos Lunak <l.lunak@kde.org>
+
+ Hello,
+
+ please consider applying the two attached QPopupMenu patches fixing KDE bugs
+ #58719 and #74778 (http://bugs.kde.org/show_bug.cgi?id=58719,
+ http://bugs.kde.org/show_bug.cgi?id=74778), which complain about keyboard
+ navigation in popup menus being very uncomfortable because of being affected
+ by mouse position despite mouse not being used at all.
+
+ [... #58719 ... ]
+
+ - ignoremousepos.patch - (#74778) - use keyboard to open some popup which
+ doesn't show up at mouse position (e.g. Alt+F3 with KWin or the context menu
+ key with some file selected in Konqueror). If the mouse is positioned in the
+ area where the popup shows, the random entry happening to be at the cursor
+ position becomes highlighted.
+ The patch fixes this by ignoring mouse events that happen at mouse position
+ which was current when the popup was shown, i.e. all mouse move events that
+ actually aren't triggered by mouse move are ignored. I first wanted to ignore
+ only the very first mouse move event (which should be caused by EnterNotify
+ for the popup) but I realized that Qt's event handling causes the popup to
+ possibly get more than just one initial move event, caused by LeaveNotify
+ events for normal widgets being transformed to mouse move events for the
+ popup, so I have no better idea how to solve this problem.
+
+--- src/widgets/qpopupmenu.cpp.sav 2004-05-25 17:48:21.000000000 +0200
++++ src/widgets/qpopupmenu.cpp 2004-05-25 17:57:28.981809096 +0200
+@@ -254,6 +254,7 @@ public:
+ QSize calcSize;
+ QRegion mouseMoveBuffer;
+ uint hasmouse : 1;
++ QPoint ignoremousepos;
+ };
+
+ static QPopupMenu* active_popup_menu = 0;
+@@ -1354,6 +1355,7 @@ void QPopupMenu::show()
+ popupActive = -1;
+ if(style().styleHint(QStyle::SH_PopupMenu_SubMenuPopupDelay, this))
+ d->mouseMoveBuffer = QRegion();
++ d->ignoremousepos = QCursor::pos();
+ }
+
+ /*!
+@@ -1701,6 +1703,11 @@ void QPopupMenu::mouseReleaseEvent( QMou
+
+ void QPopupMenu::mouseMoveEvent( QMouseEvent *e )
+ {
++ if( e->globalPos() == d->ignoremousepos ) {
++ return;
++ }
++ d->ignoremousepos = QPoint();
++
+ motion++;
+
+ if ( parentMenu && parentMenu->isPopupMenu ) {
diff --git a/x11-toolkits/qt33/files/0061-qscrollview-propagate-horizontal-wheelevent.patch b/x11-toolkits/qt33/files/0061-qscrollview-propagate-horizontal-wheelevent.patch
new file mode 100644
index 000000000000..426338e3d783
--- /dev/null
+++ b/x11-toolkits/qt33/files/0061-qscrollview-propagate-horizontal-wheelevent.patch
@@ -0,0 +1,32 @@
+qt-bugs@ issue : N64978
+applied: no
+author: Germain Garand <germain@ebooksfrance.org>
+
+In QScrollView, wheel events are forwarded to (viewport|contents)WheelEvent, but
+the horizontal/vertical status of the wheel event is not.
+
+Index: src/widgets/qscrollview.cpp
+===================================================================
+RCS file: /home/kde/qt-copy/src/widgets/qscrollview.cpp,v
+retrieving revision 1.65
+diff -u -3 -p -r1.65 qscrollview.cpp
+--- src/widgets/qscrollview.cpp 29 Apr 2004 22:31:28 -0000 1.65
++++ src/widgets/qscrollview.cpp 25 Jan 2005 12:07:04 -0000
+@@ -1180,7 +1180,7 @@ void QScrollView::mouseMoveEvent( QMous
+ void QScrollView::wheelEvent( QWheelEvent *e )
+ {
+ QWheelEvent ce( viewport()->mapFromGlobal( e->globalPos() ),
+- e->globalPos(), e->delta(), e->state());
++ e->globalPos(), e->delta(), e->state(), e->orientation() );
+ viewportWheelEvent(&ce);
+ if ( !ce.isAccepted() ) {
+ if ( e->orientation() == Horizontal && horizontalScrollBar() )
+@@ -1863,7 +1863,7 @@ void QScrollView::viewportWheelEvent( QW
+ the event itself.
+ */
+ QWheelEvent ce( viewportToContents(e->pos()),
+- e->globalPos(), e->delta(), e->state());
++ e->globalPos(), e->delta(), e->state(), e->orientation());
+ contentsWheelEvent(&ce);
+ if ( ce.isAccepted() )
+ e->accept();