X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/609ce0929289f3e26eb1898b184c7dafbf7bcac2..ac73af7bedeebe2afa451249e8a6500651a6ec00:/src/dolphincolumnwidget.cpp diff --git a/src/dolphincolumnwidget.cpp b/src/dolphincolumnwidget.cpp index 7d29251ea..fcda0676a 100644 --- a/src/dolphincolumnwidget.cpp +++ b/src/dolphincolumnwidget.cpp @@ -68,6 +68,7 @@ DolphinColumnWidget::DolphinColumnWidget(QWidget* parent, setSelectionMode(QAbstractItemView::ExtendedSelection); setDragDropMode(QAbstractItemView::DragDrop); setDropIndicatorShown(false); + setSelectionRectVisible(true); // TODO: Remove this check when 4.3.2 is released and KDE requires it... this // check avoids a division by zero happening on versions before 4.3.1. @@ -115,6 +116,7 @@ DolphinColumnWidget::DolphinColumnWidget(QWidget* parent, m_proxyModel = new DolphinSortFilterProxyModel(this); m_proxyModel->setSourceModel(m_dolphinModel); + m_proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive); setModel(m_proxyModel); new KMimeTypeResolver(this, m_dolphinModel); @@ -247,6 +249,11 @@ void DolphinColumnWidget::dragMoveEvent(QDragMoveEvent* event) } } setDirtyRegion(m_dropRect); + + if (event->mimeData()->hasUrls()) { + // accept url drops, independently from the destination item + event->acceptProposedAction(); + } } void DolphinColumnWidget::dropEvent(QDropEvent* event) @@ -290,7 +297,7 @@ void DolphinColumnWidget::paintEvent(QPaintEvent* event) // TODO: remove this code when the issue #160611 is solved in Qt 4.4 if (m_dragging) { const QBrush& brush = viewOptions().palette.brush(QPalette::Normal, QPalette::Highlight); - DragAndDropHelper::drawHoverIndication(viewport(), m_dropRect, brush); + DragAndDropHelper::drawHoverIndication(this, m_dropRect, brush); } } @@ -425,14 +432,6 @@ void DolphinColumnWidget::activate() this, SLOT(triggerItem(const QModelIndex&))); } - if (!m_childUrl.isEmpty()) { - // assure that the current index is set on the index that represents - // the child URL - const QModelIndex dirIndex = m_dolphinModel->indexForUrl(m_childUrl); - const QModelIndex proxyIndex = m_proxyModel->mapFromSource(dirIndex); - selectionModel()->setCurrentIndex(proxyIndex, QItemSelectionModel::Current); - } - updateBackground(); }