-bool DolphinIconsView::bypassVisualRectIssue() const
-{
- // TODO: QListView::visualRect() calculates a wrong position of the items under
- // certain circumstances (e. g. if the text is too long). This issue is bypassed
- // inside DolphinIconsView::visualRect(), but internally QListView does not use
- // visualRect() but the (non-virtual) QListView::rectForIndex(). This leads
- // to problems in combination with drag & drop operations: visual fragments get
- // created. To bypass the drag & drop issue the calls for QListView::dragMoveEvent(),
- // QListView::dropEvent() are replaced by the QAbstractItemView counterparts and
- // QAbstractItemView::startDrag() has been reimplemented.
- //
- // I'll try create a patch for Qt but as Dolphin must also work with
- // Qt 4.3.0 this workaround must get applied at least for KDE 4.0.
- KCategorizedSortFilterProxyModel* proxyModel = dynamic_cast<KCategorizedSortFilterProxyModel*>(model());
- return !proxyModel->isCategorizedModel();
-}
-