┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dolphinview.cpp9
-rw-r--r--src/dolphinview.h15
-rw-r--r--src/dolphinviewcontainer.cpp11
-rw-r--r--src/dolphinviewcontainer.h7
4 files changed, 27 insertions, 15 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp
index 9d6038c2c..9e454ea71 100644
--- a/src/dolphinview.cpp
+++ b/src/dolphinview.cpp
@@ -126,7 +126,7 @@ DolphinView::DolphinView(QWidget* parent,
this, SLOT(clearHoverInformation()));
connect(m_dirLister, SIGNAL(redirection(KUrl, KUrl)),
- this, SLOT(slotRedirection(KUrl, KUrl)));
+ this, SIGNAL(redirection(KUrl, KUrl)));
connect(m_dirLister, SIGNAL(completed()),
this, SLOT(restoreCurrentItem()));
@@ -1027,13 +1027,6 @@ void DolphinView::slotDeleteFileFinished(KJob* job)
}
}
-void DolphinView::slotRedirection(const KUrl& oldUrl, const KUrl& newUrl)
-{
- if (oldUrl == m_controller->url()) {
- m_controller->setUrl(newUrl);
- }
-}
-
void DolphinView::slotRequestUrlChange(const KUrl& url)
{
emit requestUrlChange(url);
diff --git a/src/dolphinview.h b/src/dolphinview.h
index 6c67f986b..170bc6bf8 100644
--- a/src/dolphinview.h
+++ b/src/dolphinview.h
@@ -85,7 +85,8 @@ public:
{
/**
* The directory items are shown as icons including an
- * icon name. */
+ * icon name.
+ */
IconsView = 0,
/**
@@ -525,6 +526,12 @@ signals:
*/
void startedPathLoading(const KUrl& url);
+ /**
+ * Emitted when KDirLister emits redirection.
+ * Testcase: fish://localhost
+ */
+ void redirection(const KUrl& oldUrl, const KUrl& newUrl);
+
protected:
/** @see QWidget::mouseReleaseEvent */
virtual void mouseReleaseEvent(QMouseEvent* event);
@@ -608,12 +615,6 @@ private slots:
void slotDeleteFileFinished(KJob* job);
/**
- * Called when KDirLister emits redirection.
- * Testcase: fish://localhost
- */
- void slotRedirection(const KUrl& oldUrl, const KUrl& newUrl);
-
- /**
* Is emitted if the controller requests a changing of the current
* URL to \a url
*/
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
index bed7d2758..3c1445fa5 100644
--- a/src/dolphinviewcontainer.cpp
+++ b/src/dolphinviewcontainer.cpp
@@ -140,6 +140,8 @@ DolphinViewContainer::DolphinViewContainer(DolphinMainWindow* mainWindow,
this, SLOT(slotItemTriggered(KFileItem)));
connect(m_view, SIGNAL(startedPathLoading(const KUrl&)),
this, SLOT(saveRootUrl(const KUrl&)));
+ connect(m_view, SIGNAL(redirection(KUrl, KUrl)),
+ this, SLOT(redirect(KUrl, KUrl)));
connect(m_urlNavigator, SIGNAL(urlChanged(const KUrl&)),
this, SLOT(restoreView(const KUrl&)));
@@ -370,6 +372,15 @@ void DolphinViewContainer::dropUrls(const KUrl& destination, QDropEvent* event)
DolphinDropController::dropUrls(KFileItem(), destination, event, this);
}
+void DolphinViewContainer::redirect(const KUrl& oldUrl, const KUrl& newUrl)
+{
+ Q_UNUSED(oldUrl);
+ const bool block = m_urlNavigator->signalsBlocked();
+ m_urlNavigator->blockSignals(true);
+ m_urlNavigator->setUrl(newUrl);
+ m_urlNavigator->blockSignals(block);
+}
+
void DolphinViewContainer::slotItemTriggered(const KFileItem& item)
{
KUrl url = item.targetUrl();
diff --git a/src/dolphinviewcontainer.h b/src/dolphinviewcontainer.h
index 4938835d8..1c6f8a6bc 100644
--- a/src/dolphinviewcontainer.h
+++ b/src/dolphinviewcontainer.h
@@ -212,6 +212,13 @@ private slots:
* above the destination \a destination.
*/
void dropUrls(const KUrl& destination, QDropEvent* event);
+
+ /**
+ * Is invoked when a redirection is done and changes the
+ * URL of the URL navigator to \a newUrl without triggering
+ * a reloading of the directory.
+ */
+ void redirect(const KUrl& oldUrl, const KUrl& newUrl);
private:
bool m_showProgress;