From d78fe954abb9ea0ed05f8c22d6842a457c0a209e Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Mon, 17 Sep 2007 14:36:41 +0000 Subject: drag and drop fixes for the column view (implied a signal changed which affected other views too) svn path=/trunk/KDE/kdebase/apps/; revision=713430 --- src/dolphinview.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/dolphinview.cpp') diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 31ee64fed..aeb10dc9c 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -93,8 +93,8 @@ DolphinView::DolphinView(QWidget* parent, this, SIGNAL(urlChanged(const KUrl&))); connect(m_controller, SIGNAL(requestContextMenu(const QPoint&)), this, SLOT(openContextMenu(const QPoint&))); - connect(m_controller, SIGNAL(urlsDropped(const KUrl::List&, const QModelIndex&, QWidget*)), - this, SLOT(dropUrls(const KUrl::List&, const QModelIndex&, QWidget*))); + connect(m_controller, SIGNAL(urlsDropped(const KUrl::List&, const KUrl&, const QModelIndex&, QWidget*)), + this, SLOT(dropUrls(const KUrl::List&, const KUrl&, const QModelIndex&, QWidget*))); connect(m_controller, SIGNAL(sortingChanged(DolphinView::Sorting)), this, SLOT(updateSorting(DolphinView::Sorting))); connect(m_controller, SIGNAL(sortOrderChanged(Qt::SortOrder)), @@ -655,12 +655,13 @@ void DolphinView::openContextMenu(const QPoint& pos) } void DolphinView::dropUrls(const KUrl::List& urls, - const QModelIndex& index, + const KUrl& destPath, + const QModelIndex& destIndex, QWidget* source) { KFileItem directory; - if (isValidNameIndex(index)) { - KFileItem item = fileItem(index); + if (isValidNameIndex(destIndex)) { + KFileItem item = fileItem(destIndex); Q_ASSERT(!item.isNull()); if (item.isDir()) { // the URLs are dropped above a directory @@ -675,7 +676,7 @@ void DolphinView::dropUrls(const KUrl::List& urls, } const KUrl& destination = (directory.isNull()) ? - url() : directory.url(); + destPath : directory.url(); dropUrls(urls, destination); } -- cgit v1.3