X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/b8a4e0fac2820ec8fc442c2abeea700ae4947e01..f28ee3152a05f09abd117df19bb99d0966947e6b:/src/dolphinview.cpp diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 221d20376..0b04d0afa 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -796,24 +796,18 @@ void DolphinView::dropUrls(const KUrl::List& urls, const KFileItem& destItem) { Q_ASSERT(!urls.isEmpty()); - const KUrl& destination = !destItem.isNull() && destItem.isDir() ? - destItem.url() : destPath; + const KUrl destination = !destItem.isNull() && destItem.isDir() ? + destItem.url() : destPath; const KUrl sourceDir = KUrl(urls.first().directory()); if (sourceDir != destination) { - dropUrls(urls, destination); + DolphinDropController dropController(this); + // forward doingOperation signal up to the mainwindow + connect(&dropController, SIGNAL(doingOperation(KIO::FileUndoManager::CommandType)), + this, SIGNAL(doingOperation(KIO::FileUndoManager::CommandType))); + dropController.dropUrls(urls, destination); } } -void DolphinView::dropUrls(const KUrl::List& urls, - const KUrl& destination) -{ - DolphinDropController dropController(this); - // forward doingOperation signal up to the mainwindow - connect(&dropController, SIGNAL(doingOperation(KIO::FileUndoManager::CommandType)), - this, SIGNAL(doingOperation(KIO::FileUndoManager::CommandType))); - dropController.dropUrls(urls, destination); -} - void DolphinView::updateSorting(DolphinView::Sorting sorting) { ViewProperties props(viewPropertiesUrl()); @@ -1149,6 +1143,12 @@ void DolphinView::deleteView() { QAbstractItemView* view = itemView(); if (view != 0) { + // It's important to set the keyboard focus to the parent + // before deleting the view: Otherwise when having a split + // view the other view will get the focus and will request + // an activation (see DolphinView::eventFilter()). + setFocus(); + m_topLayout->removeWidget(view); view->close(); view->deleteLater();