void setUrl(const KUrl& url);
const KUrl& url() const;
+ /**
+ * Sets the URL to \a url and does nothing else. Called when
+ * a redirection happens.
+ */
+ void redirectToUrl(const KUrl& url);
+
/**
* Changes the current item view where the controller is working. This
* is only necessary for views like the tree view, where internally
void indicateSortOrderChange(Qt::SortOrder order);
/**
- * Informs the abstract Dolphin view about a change between separate sorting
+ * Informs the abstract Dolphin view about a change between separate sorting
* (with folders first) and mixed sorting of files and folders done inside
* the view implementation. This method should be invoked by the view
* implementation (e. g. the details view uses this method in combination
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>>&)),
emit modeChanged();
updateZoomLevel(oldZoomLevel);
- if (m_showPreview) {
+ if (m_showPreview) {
loadDirectory(viewPropsUrl);
}
}
return;
}
delete dialog;
-
+
// the selection would be invalid after renaming the items, so just clear
// it before
clearSelection();
return dirModel()->dirLister();
}
+void DolphinView::slotRedirection(const KUrl& oldUrl, const KUrl& newUrl)
+{
+ emit redirection(oldUrl, newUrl);
+ m_controller->redirectToUrl(newUrl); // #186947
+}
+
#include "dolphinview.moc"
*/
void restoreSelection();
+ /**
+ * Called when a redirection happens.
+ * Testcase: fish://localhost
+ */
+ void slotRedirection(const KUrl& oldUrl, const KUrl& newUrl);
+
private:
void loadDirectory(const KUrl& url, bool reload = false);