diff options
| author | Peter Penz <[email protected]> | 2007-03-11 11:13:07 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-03-11 11:13:07 +0000 |
| commit | 49f881f5ec01014e7b6b0c7fa14abd7e99f605fc (patch) | |
| tree | ea15d16c1285d6e7d724d2a7af22aebbe8850b54 /src/treeviewsidebarpage.cpp | |
| parent | 277e385fd8a1f23cacf801f469e373b64e9443c0 (diff) | |
Fixed some drag & drop issues:
- allow drag & drop inside the view
- prevent a dragging from a directory into itself
- use QModelIndex instead of the position
svn path=/trunk/KDE/kdebase/apps/; revision=641451
Diffstat (limited to 'src/treeviewsidebarpage.cpp')
| -rw-r--r-- | src/treeviewsidebarpage.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/treeviewsidebarpage.cpp b/src/treeviewsidebarpage.cpp index d9c2e8800..63689b6eb 100644 --- a/src/treeviewsidebarpage.cpp +++ b/src/treeviewsidebarpage.cpp @@ -78,8 +78,8 @@ TreeViewSidebarPage::TreeViewSidebarPage(DolphinMainWindow* mainWindow, connect(m_treeView, SIGNAL(clicked(const QModelIndex&)), this, SLOT(updateActiveView(const QModelIndex&))); - connect(m_treeView, SIGNAL(urlsDropped(const KUrl::List&, const QPoint&)), - this, SLOT(dropUrls(const KUrl::List&, const QPoint&))); + connect(m_treeView, SIGNAL(urlsDropped(const KUrl::List&, const QModelIndex&)), + this, SLOT(dropUrls(const KUrl::List&, const QModelIndex&))); QVBoxLayout* layout = new QVBoxLayout(this); layout->addWidget(m_treeView); @@ -202,9 +202,8 @@ void TreeViewSidebarPage::updateActiveView(const QModelIndex& index) } void TreeViewSidebarPage::dropUrls(const KUrl::List& urls, - const QPoint& pos) + const QModelIndex& index) { - const QModelIndex index = m_treeView->indexAt(pos); if (index.isValid()) { #if defined(USE_PROXY_MODEL) const QModelIndex& dirIndex = m_proxyModel->mapToSource(index); |
