]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinview.cpp
fix linking
[dolphin.git] / src / dolphinview.cpp
index 18ffe0a27ddb82bdca525d0cf45a5905ed509cc3..0b04d0afad8eb1be1cf1612bb75503c9ef34abbb 100644 (file)
@@ -796,8 +796,8 @@ 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) {
         DolphinDropController dropController(this);
@@ -1143,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();