diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-01-14 22:56:26 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-01-14 22:56:26 (GMT) |
commit | 8f3277d808e2f77661df0e28dfb8f4c6025258cb (patch) | |
tree | a0bd9d89e79b8273a0ee1aef0d02ec6a062ab30d /src/gui | |
parent | d39f3980f5ba449a43d25d46a3c0eee81001856a (diff) | |
parent | c6f1e91c114eaf331fd40c909553b173136ffe99 (diff) | |
download | Qt-8f3277d808e2f77661df0e28dfb8f4c6025258cb.zip Qt-8f3277d808e2f77661df0e28dfb8f4c6025258cb.tar.gz Qt-8f3277d808e2f77661df0e28dfb8f4c6025258cb.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
QListView in icon view mode, drop enabled items wouldn't receive anything
Fixes wrong stroke clipping with the raster engine.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/itemviews/qlistview.cpp | 7 | ||||
-rw-r--r-- | src/gui/painting/qpaintengineex.cpp | 16 |
2 files changed, 16 insertions, 7 deletions
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp index f289c7d..19b1e8c 100644 --- a/src/gui/itemviews/qlistview.cpp +++ b/src/gui/itemviews/qlistview.cpp @@ -2621,6 +2621,13 @@ bool QIconModeViewBase::filterDropEvent(QDropEvent *e) const QSize contents = contentsSize; QPoint offset(horizontalOffset(), verticalOffset()); QPoint end = e->pos() + offset; + if (qq->acceptDrops()) { + const Qt::ItemFlags dropableFlags = Qt::ItemIsDropEnabled|Qt::ItemIsEnabled; + const QVector<QModelIndex> &dropIndices = intersectingSet(QRect(end, QSize(1, 1))); + foreach (const QModelIndex &index, dropIndices) + if ((index.flags() & dropableFlags) == dropableFlags) + return false; + } QPoint start = dd->pressedPosition; QPoint delta = (dd->movement == QListView::Snap ? snapToGrid(end) - snapToGrid(start) : end - start); QList<QModelIndex> indexes = dd->selectionModel->selectedIndexes(); diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp index 058f226..4f2fffa 100644 --- a/src/gui/painting/qpaintengineex.cpp +++ b/src/gui/painting/qpaintengineex.cpp @@ -417,13 +417,6 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) } else if (style == Qt::NoPen) { d->activeStroker = 0; } else { - // ### re-enable... - if (pen.isCosmetic()) { - d->dasher.setClipRect(d->exDeviceRect); - } else { - QRectF clipRect = state()->matrix.inverted().mapRect(QRectF(d->exDeviceRect)); - d->dasher.setClipRect(clipRect); - } d->dasher.setDashPattern(pen.dashPattern()); d->dasher.setDashOffset(pen.dashOffset()); d->activeStroker = &d->dasher; @@ -434,6 +427,15 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) return; } + if (pen.style() > Qt::SolidLine) { + if (pen.isCosmetic()) { + d->activeStroker->setClipRect(d->exDeviceRect); + } else { + QRectF clipRect = state()->matrix.inverted().mapRect(QRectF(d->exDeviceRect)); + d->activeStroker->setClipRect(clipRect); + } + } + const QPainterPath::ElementType *types = path.elements(); const qreal *points = path.points(); int pointCount = path.elementCount(); |