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()));
}
}
-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);
{
/**
* The directory items are shown as icons including an
- * icon name. */
+ * icon name.
+ */
IconsView = 0,
/**
*/
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);
*/
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
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&)));
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();
* 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;