X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/dcbf1a11783d47e7e4fa30d488ac93a8bc547e71..0772ebc3aaa1ea4717aedcdd7dacc95dedf8a307:/src/dolphincontroller.cpp diff --git a/src/dolphincontroller.cpp b/src/dolphincontroller.cpp index fe8c426f3..81cec2868 100644 --- a/src/dolphincontroller.cpp +++ b/src/dolphincontroller.cpp @@ -59,7 +59,7 @@ void DolphinController::setItemView(QAbstractItemView* view) if (m_itemView != 0) { m_zoomLevel = ZoomLevelInfo::zoomLevelForIconSize(m_itemView->iconSize()); - + // TODO: this is a workaround until Qt-issue 176832 has been fixed connect(m_itemView, SIGNAL(pressed(const QModelIndex&)), this, SLOT(updateMouseButtonState())); @@ -129,12 +129,13 @@ void DolphinController::handleKeyPressEvent(QKeyEvent* event) const QItemSelectionModel* selModel = m_itemView->selectionModel(); const QModelIndex currentIndex = selModel->currentIndex(); const bool trigger = currentIndex.isValid() - && (event->key() == Qt::Key_Return) + && ((event->key() == Qt::Key_Return) + || (event->key() == Qt::Key_Enter)) && (selModel->selectedIndexes().count() > 0); if (trigger) { const QModelIndexList indexList = selModel->selectedIndexes(); foreach (const QModelIndex& index, indexList) { - triggerItem(index); + emit itemTriggered(itemForIndex(index)); } } } @@ -178,9 +179,6 @@ void DolphinController::triggerItem(const QModelIndex& index) m_itemView->clearSelection(); emit itemEntered(KFileItem()); } - m_mouseButtons = Qt::NoButton; - } else if (m_mouseButtons & Qt::RightButton) { - m_mouseButtons = Qt::NoButton; } } @@ -194,9 +192,6 @@ void DolphinController::requestTab(const QModelIndex& index) if (validRequest) { emit tabRequested(item.url()); } - m_mouseButtons = Qt::NoButton; - } else if (m_mouseButtons & Qt::RightButton) { - m_mouseButtons = Qt::NoButton; } }