*/
#include "dolphinpart.h"
+#include <kdebug.h>
#include "dolphinviewactionhandler.h"
#include "dolphinsortfilterproxymodel.h"
#include "dolphinview.h"
this, SLOT(slotRequestUrlChange(KUrl)));
connect(m_view, SIGNAL(modeChanged()),
this, SIGNAL(viewModeChanged())); // relay signal
+ connect(m_view, SIGNAL(redirection(KUrl, KUrl)),
+ this, SLOT(slotRedirection(KUrl, KUrl)));
// Watch for changes that should result in updates to the
// status bar text.
actionGroups);
}
-void DolphinPart::slotUrlChanged(const KUrl& url)
+// ########### not sure this is still called... seems not.
+void DolphinPart::slotUrlChanged(const KUrl& newUrl)
{
- KParts::ReadOnlyPart::setUrl(url);
- QString prettyUrl = url.pathOrUrl();
- emit m_extension->setLocationBarUrl(prettyUrl);
+ slotRedirection(url(), newUrl);
+}
+
+void DolphinPart::slotRedirection(const KUrl& oldUrl, const KUrl& newUrl)
+{
+ //kDebug() << oldUrl << newUrl << "currentUrl=" << url();
+ if (oldUrl == url()) {
+ KParts::ReadOnlyPart::setUrl(newUrl);
+ const QString prettyUrl = newUrl.pathOrUrl();
+ emit m_extension->setLocationBarUrl(prettyUrl);
+ }
}
void DolphinPart::slotRequestUrlChange(const KUrl& url)
/**
* Informs the host that we are opening \a url (e.g. after a redirection).
+ * ########### not sure this is still called... seems not.
*/
void slotUrlChanged(const KUrl& url);
+ /**
+ * Informs the host that we are opening \a url (e.g. after a redirection
+ * coming from KDirLister).
+ * Testcase 1: fish://localhost
+ * Testcase 2: showing a directory that is being renamed by another window (#180156)
+ */
+ void slotRedirection(const KUrl& oldUrl, const KUrl& newUrl);
+
/**
* Updates the state of the 'Edit' menu actions and emits
* the signal selectionChanged().