]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinview.cpp
SVN_SILENT made messages (.desktop file)
[dolphin.git] / src / dolphinview.cpp
index 85bc21c771579384dc0bfc10992d40f12b4dbd64..5ae81f31da0665f1391d6323e4153bc947c3f97b 100644 (file)
@@ -134,8 +134,8 @@ DolphinView::DolphinView(QWidget* parent,
             this, SLOT(clearHoverInformation()));
 
     KDirLister* dirLister = m_viewAccessor.dirLister();
-    connect(dirLister, SIGNAL(redirection(KUrl, KUrl)),
-            this, SIGNAL(redirection(KUrl, KUrl)));
+    connect(dirLister, SIGNAL(redirection(KUrl,KUrl)),
+            this, SLOT(slotRedirection(KUrl,KUrl)));
     connect(dirLister, SIGNAL(completed()),
             this, SLOT(slotDirListerCompleted()));
     connect(dirLister, SIGNAL(refreshItems(const QList<QPair<KFileItem,KFileItem>>&)),
@@ -246,7 +246,7 @@ void DolphinView::setMode(Mode mode)
     emit modeChanged();
 
     updateZoomLevel(oldZoomLevel);
-    if (m_showPreview) {   
+    if (m_showPreview) {
         loadDirectory(viewPropsUrl);
     }
 }
@@ -309,7 +309,8 @@ void DolphinView::invertSelection()
 
 bool DolphinView::hasSelection() const
 {
-    return m_viewAccessor.itemView()->selectionModel()->hasSelection();
+    const QAbstractItemView* view = m_viewAccessor.itemView();
+    return view && view->selectionModel()->hasSelection();
 }
 
 void DolphinView::clearSelection()
@@ -624,7 +625,7 @@ void DolphinView::renameSelectedItems()
             return;
         }
         delete dialog;
-        
+
         // the selection would be invalid after renaming the items, so just clear
         // it before
         clearSelection();
@@ -1499,4 +1500,10 @@ KDirLister* DolphinView::ViewAccessor::dirLister() const
     return dirModel()->dirLister();
 }
 
+void DolphinView::slotRedirection(const KUrl& oldUrl, const KUrl& newUrl)
+{
+    emit redirection(oldUrl, newUrl);
+    m_controller->redirectToUrl(newUrl); // #186947
+}
+
 #include "dolphinview.moc"