diff options
| author | Peter Penz <[email protected]> | 2008-02-16 14:37:13 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-02-16 14:37:13 +0000 |
| commit | 9cc43beb598c7f417f3d3b00928b7eb1e6c5df46 (patch) | |
| tree | d0ca0ca4efc2962aaeb289b5a0470b9764387294 /src/dolphindetailsview.cpp | |
| parent | 67f36d71e78c2c64500229150d262b621f69fe54 (diff) | |
Bypassed a bug in QTreeView::mouseMoveEvent() (see comment in code). Submitted a bug-report to Trolltech, bug tracker ID is still pending (will add the ID into the code as soon as I get it).
svn path=/trunk/KDE/kdebase/apps/; revision=775736
Diffstat (limited to 'src/dolphindetailsview.cpp')
| -rw-r--r-- | src/dolphindetailsview.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index 63498ed9d..ff4ce540f 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -227,11 +227,30 @@ void DolphinDetailsView::mouseMoveEvent(QMouseEvent* event) setSelection(selRect, QItemSelectionModel::Select); } - QTreeView::mouseMoveEvent(event); + // TODO: see comment at end of method + // QTreeView::mouseMoveEvent(event); + QAbstractItemView::mouseMoveEvent(event); updateElasticBand(); } else { - QTreeView::mouseMoveEvent(event); + // TODO: see comment at end of method + //QTreeView::mouseMoveEvent(event); + QAbstractItemView::mouseMoveEvent(event); } + + // The original implementation of QTreeView::mouseMoveEvent() looks like this (Qt4.4): + // + // void QTreeView::mouseMoveEvent(QMouseEvent *event) + // { + // Q_D(QTreeView); + // if (d->itemDecorationAt(event->pos()) == -1) // ### what about expanding/collapsing state ? + // QAbstractItemView::mouseMoveEvent(event); + // } + // + // This prevents that the signal 'entered()' is emitted when the mouse is above a decoration, + // although the hovered item has changed. The SelectionManager is connected to 'entered()' + // and assumes that the old item is selected. This is currently bypassed by skipping + // the base implementation and invoking QAbstractItemView::mouseMoveEvent() directly. + // Submitted a bug report to Trolltech, bug ID is still pending. } void DolphinDetailsView::mouseReleaseEvent(QMouseEvent* event) |
