From ccb06e68ac2f983c4de5a4f37754362ca7ad6b12 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 21 Jan 2007 22:12:49 +0000 Subject: - Fixed crash when showing "Open With..." items of the context menu: the model index from the proxy model was used instead of the model index from the KDirModel. - Use QMenu::addSeparator() instead of QMenu::insertSeparator(). svn path=/trunk/playground/utils/dolphin/; revision=626040 --- src/dolphinview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/dolphinview.cpp') diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 63bbf22b8..7d24ebca5 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -501,7 +501,8 @@ KUrl::List DolphinView::selectedUrls() const KFileItem* DolphinView::fileItem(const QModelIndex index) const { - return m_dirModel->itemForIndex(index); + const QModelIndex dirModelIndex = m_proxyModel->mapToSource(index); + return m_dirModel->itemForIndex(dirModelIndex); } void DolphinView::openContextMenu(KFileItem* fileInfo, const QPoint& pos) -- cgit v1.3