rev 3910 - in trunk/packages/qt-x11-free/debian: . patches
Christopher Martin
chrsmrtn at costa.debian.org
Wed Jun 7 23:12:55 UTC 2006
Author: chrsmrtn
Date: 2006-06-07 23:12:49 +0000 (Wed, 07 Jun 2006)
New Revision: 3910
Modified:
trunk/packages/qt-x11-free/debian/changelog
trunk/packages/qt-x11-free/debian/patches/11_qt_rubberband.dpatch
Log:
Please test, and report regressions.
Modified: trunk/packages/qt-x11-free/debian/changelog
===================================================================
--- trunk/packages/qt-x11-free/debian/changelog 2006-06-07 21:03:36 UTC (rev 3909)
+++ trunk/packages/qt-x11-free/debian/changelog 2006-06-07 23:12:49 UTC (rev 3910)
@@ -9,6 +9,9 @@
libqt3-mt-dev). Also include the Immodule README.
(Closes: #370742, #370744)
+ * Patch the 11_qt_rubberband patch, to fix a crash and a signal bug with
+ Kimdaba (and probably others). (Closes: #341982, #352409, #362155)
+
-- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Wed, 7 Jun 2006 16:12:34 -0400
qt-x11-free (3:3.3.6-2) unstable; urgency=low
Modified: trunk/packages/qt-x11-free/debian/patches/11_qt_rubberband.dpatch
===================================================================
--- trunk/packages/qt-x11-free/debian/patches/11_qt_rubberband.dpatch 2006-06-07 21:03:36 UTC (rev 3909)
+++ trunk/packages/qt-x11-free/debian/patches/11_qt_rubberband.dpatch 2006-06-07 23:12:49 UTC (rev 3910)
@@ -29,14 +29,15 @@
QPtrDict<QIconViewItem> selectedItems;
struct ItemContainer {
-@@ -1974,14 +1975,27 @@
+@@ -1975,14 +1976,30 @@
if ( picture() ) {
QPicture *pic = picture();
if ( isSelected() ) {
- p->fillRect( pixmapRect( FALSE ), QBrush( cg.highlight(), QBrush::Dense4Pattern) );
+ p->setBrush( QBrush( cg.highlight(), QBrush::Dense4Pattern ) );
+ p->setPen( QPen( cg.highlight(), QBrush::Dense4Pattern ) );
-+ p->drawRoundRect( pixmapRect( FALSE ),
++ if (pixmapRect( FALSE ).width() && pixmapRect( FALSE ).height())
++ p->drawRoundRect( pixmapRect( FALSE ),
+ 1000 / pixmapRect( FALSE ).width(),
+ 1000 / pixmapRect( FALSE ).height() );
}
@@ -45,7 +46,8 @@
- p->fillRect( textRect( FALSE ), cg.highlight() );
+ p->setBrush( QBrush( cg.highlight() ) );
+ p->setPen( QPen( cg.highlight() ) );
-+ p->drawRoundRect( textRect( FALSE ),
++ if (textRect( FALSE ).width() && textRect( FALSE ).width())
++ p->drawRoundRect( textRect( FALSE ),
+ 1000 / textRect( FALSE ).width(),
+ 1000 / textRect( FALSE ).height() );
p->setPen( QPen( cg.highlightedText() ) );
@@ -54,21 +56,23 @@
+ } else if ( view->d->itemTextBrush != NoBrush ) {
+ p->setBrush( view->d->itemTextBrush );
+ p->setPen( QPen( view->d->itemTextBrush.color() ) );
-+ p->drawRoundRect( textRect( FALSE ),
++ if (textRect( FALSE ).width() && textRect( FALSE ).width())
++ p->drawRoundRect( textRect( FALSE ),
+ 1000 / textRect( FALSE ).width(),
+ 1000 / textRect( FALSE ).height() );
+ }
int align = view->itemTextPos() == QIconView::Bottom ? AlignHCenter : AlignAuto;
if ( view->d->wordWrapIconText )
-@@ -2039,10 +2053,19 @@
+@@ -2040,10 +2057,21 @@
p->save();
if ( isSelected() ) {
- p->fillRect( textRect( FALSE ), cg.highlight() );
+ p->setBrush( QBrush( cg.highlight() ) );
+ p->setPen( QPen( cg.highlight() ) );
-+ p->drawRoundRect( textRect( FALSE ),
++ if (textRect( FALSE ).width() && textRect( FALSE ).width())
++ p->drawRoundRect( textRect( FALSE ),
+ 1000 / textRect( FALSE ).width(),
+ 1000 / textRect( FALSE ).height() );
p->setPen( QPen( cg.highlightedText() ) );
@@ -77,14 +81,15 @@
+ } else if ( view->d->itemTextBrush != NoBrush ) {
+ p->setBrush( view->d->itemTextBrush );
+ p->setPen( QPen( view->d->itemTextBrush.color() ) );
-+ p->drawRoundRect( textRect( FALSE ),
++ if (textRect( FALSE ).width() && textRect( FALSE ).width())
++ p->drawRoundRect( textRect( FALSE ),
+ 1000 / textRect( FALSE ).width(),
+ 1000 / textRect( FALSE ).height() );
+ }
int align = AlignHCenter;
if ( view->d->wordWrapIconText )
-@@ -2058,31 +2081,13 @@
+@@ -2059,31 +2087,13 @@
/*!
Paints the focus rectangle of the item using the painter \a p and
the color group \a cg.
@@ -120,7 +125,7 @@
}
/*!
-@@ -2780,6 +2785,7 @@
+@@ -2781,6 +2791,7 @@
d->renamingItem = 0;
d->drawActiveSelection = TRUE;
d->drawDragShapes = FALSE;
@@ -128,7 +133,7 @@
connect( d->adjustTimer, SIGNAL( timeout() ),
this, SLOT( adjustItems() ) );
-@@ -3264,7 +3270,7 @@
+@@ -3265,7 +3276,7 @@
void QIconView::doAutoScroll()
{
@@ -137,7 +142,7 @@
QPoint vp = viewport()->mapFromGlobal( QCursor::pos() );
QPoint pos = viewportToContents( vp );
-@@ -3281,7 +3287,6 @@
+@@ -3282,7 +3293,6 @@
bool block = signalsBlocked();
QRect rr;
@@ -145,7 +150,7 @@
blockSignals( TRUE );
viewport()->setUpdatesEnabled( FALSE );
-@@ -3307,9 +3312,6 @@
+@@ -3308,9 +3318,6 @@
item->setSelected( TRUE, TRUE );
changed = TRUE;
rr = rr.unite( item->rect() );
@@ -155,28 +160,51 @@
}
minx = QMIN( minx, item->x() - 1 );
-@@ -3326,42 +3328,76 @@
+@@ -3327,37 +3334,72 @@
viewport()->setUpdatesEnabled( TRUE );
blockSignals( block );
- QRect r = *d->rubber;
- *d->rubber = oldRubber;
+-
+- QPainter p;
+- p.begin( viewport() );
+- p.setRasterOp( NotROP );
+- p.setPen( QPen( color0, 1 ) );
+- p.setBrush( NoBrush );
+- drawRubber( &p );
+- d->dragging = FALSE;
+- p.end();
+-
+- *d->rubber = r;
+-
+- if ( changed ) {
+- d->drawAllBack = FALSE;
+- d->clipRegion = region;
+- repaintContents( rr, FALSE );
+- d->drawAllBack = TRUE;
+ // static bool drawAll;
+ if ( d->backrubber == 0 ) {
+ d->backrubber = new QPixmap( viewport()->rect().size() );
+ d->backrubber->fill( viewport(), viewport()->rect().topLeft() );
+ // drawAll = true;
-+ }
-+
+ }
+
+ // int oldX = 0, oldY = 0;
+ // if ( !drawAll && d->scrollTimer ) {
+ // oldX = contentsX();
+ // oldY = contentsY();
+ // }
-+ ensureVisible( pos.x(), pos.y() );
+ ensureVisible( pos.x(), pos.y() );
+ // if ( !drawAll && d->scrollTimer && ( oldX != contentsX() || oldY != contentsY() ) )
+ // drawAll = true;
-+
+
+- p.begin( viewport() );
+- p.setRasterOp( NotROP );
+- p.setPen( QPen( color0, 1 ) );
+- p.setBrush( NoBrush );
+- drawRubber( &p );
+- d->dragging = TRUE;
+ QRect allRect = oldRubber.normalize();
+ if ( changed )
+ allRect |= rr.normalize();
@@ -184,17 +212,9 @@
+ QPoint point = contentsToViewport( allRect.topLeft() );
+ allRect = QRect( point.x(), point.y(), allRect.width(), allRect.height() );
+ allRect &= viewport()->rect();
-
-- QPainter p;
-- p.begin( viewport() );
-- p.setRasterOp( NotROP );
-- p.setPen( QPen( color0, 1 ) );
-- p.setBrush( NoBrush );
-- drawRubber( &p );
- d->dragging = FALSE;
-- p.end();
-
-- *d->rubber = r;
++
++ d->dragging = FALSE;
++
+ QPainter p( d->backrubber );
+ p.translate( -contentsX(), -contentsY() );
+#if 0
@@ -203,30 +223,17 @@
+ point = contentsToViewport( oldRubber.topLeft() );
+ oldRubber = QRect( point.x(), point.y(), oldRubber.width(), oldRubber.height() );
+ oldRubber &= viewport()->rect();
-
-- if ( changed ) {
-- d->drawAllBack = FALSE;
-- d->clipRegion = region;
-- repaintContents( rr, FALSE );
-- d->drawAllBack = TRUE;
-- }
++
+ point = contentsToViewport( nr.topLeft() );
+ nr = QRect( point.x(), point.y(), nr.width(), nr.height() );
+ nr &= viewport()->rect();
-
-- ensureVisible( pos.x(), pos.y() );
++
+ QRegion region;
+ if ( allRect != nr )
+ region = QRegion(allRect).subtract( QRegion( nr ) );
+ if ( allRect != oldRubber )
+ region += QRegion(allRect).subtract( QRegion( oldRubber ) );
-
-- p.begin( viewport() );
-- p.setRasterOp( NotROP );
-- p.setPen( QPen( color0, 1 ) );
-- p.setBrush( NoBrush );
-- drawRubber( &p );
-- d->dragging = TRUE;
++
+ QMemArray< QRect > ar = region.rects();
+ for ( uint i = 0; i < ar.size(); ++i ) {
+ ar[i].addCoords( -2, -2, 4, 4 );
@@ -250,16 +257,9 @@
+ bitBlt( viewport(), allRect.topLeft(), d->backrubber, allRect );
if ( changed ) {
-- emit selectionChanged();
-- if ( d->selectionMode == Single )
-- emit selectionChanged( d->currentItem );
-+ if ( d->selectionMode == Single )
-+ emit selectionChanged( d->currentItem );
- }
+ emit selectionChanged();
+@@ -3389,9 +3431,7 @@
- if ( !QRect( 50, 50, viewport()->width()-100, viewport()->height()-100 ).contains( vp ) &&
-@@ -3388,9 +3424,7 @@
-
void QIconView::drawContents( QPainter *p, int cx, int cy, int cw, int ch )
{
- if ( d->dragging && d->rubber )
@@ -269,7 +269,7 @@
QRect r = QRect( cx, cy, cw, ch );
QIconViewPrivate::ItemContainer *c = d->firstContainer;
-@@ -3464,8 +3498,16 @@
+@@ -3465,8 +3505,16 @@
d->currentItem->paintFocus( p, colorGroup() );
}
@@ -288,7 +288,7 @@
}
/*!
-@@ -4364,17 +4406,15 @@
+@@ -4365,17 +4413,15 @@
void QIconView::contentsMousePressEventEx( QMouseEvent *e )
{
if ( d->rubber ) {
@@ -314,7 +314,7 @@
if ( d->scrollTimer ) {
disconnect( d->scrollTimer, SIGNAL( timeout() ), this, SLOT( doAutoScroll() ) );
-@@ -4559,21 +4599,17 @@
+@@ -4560,21 +4606,17 @@
d->startDragItem = 0;
if ( d->rubber ) {
@@ -343,7 +343,7 @@
d->currentItem = d->tmpCurrentItem;
d->tmpCurrentItem = 0;
if ( d->currentItem )
-@@ -5333,9 +5369,9 @@
+@@ -5334,9 +5376,9 @@
QPoint pnt( d->rubber->x(), d->rubber->y() );
pnt = contentsToViewport( pnt );
@@ -358,7 +358,7 @@
/*!
--- qt.orig/src/widgets/qlistbox.cpp
+++ qt.patched/src/widgets/qlistbox.cpp
-@@ -2162,7 +2162,7 @@
+@@ -2163,7 +2163,7 @@
}
if ( d->rubber ) {
@@ -367,7 +367,7 @@
delete d->rubber;
d->rubber = 0;
d->current = d->tmpCurrent;
-@@ -2240,11 +2240,9 @@
+@@ -2241,11 +2241,9 @@
}
if ( d->rubber ) {
@@ -380,7 +380,7 @@
return;
}
-@@ -4381,6 +4379,7 @@
+@@ -4388,6 +4386,7 @@
return;
if ( !d->rubber->width() && !d->rubber->height() )
return;
@@ -388,7 +388,7 @@
QPainter p( viewport() );
p.setRasterOp( NotROP );
style().drawPrimitive( QStyle::PE_RubberBand, &p, d->rubber->normalize(),
-@@ -4413,13 +4412,24 @@
+@@ -4420,13 +4419,24 @@
}
}
}
More information about the pkg-kde-commits
mailing list