From 8118d8e24317b697f78bf32b41fda4200bc56ff9 Mon Sep 17 00:00:00 2001 From: David Faure Date: Tue, 28 Aug 2007 21:47:20 +0000 Subject: [PATCH] dolphinview fix: don't emit urlChanged twice in DolphinView::setUrl (it's already emitted by the controller, and we forward that) dolphinpart fix: don't let the konq wheel spin forever when clicking on the Home button and we're already viewing $HOME. svn path=/trunk/KDE/kdebase/apps/; revision=705916 --- src/dolphinpart.cpp | 6 +++++- src/dolphinview.cpp | 5 ++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index 5d52c78a8..1bc1edac0 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -107,9 +107,13 @@ bool DolphinPart::openUrl(const KUrl& url) const QString prettyUrl = url.pathOrUrl(); emit setWindowCaption(prettyUrl); emit m_extension->setLocationBarUrl(prettyUrl); + const bool reload = arguments().reload(); + if (m_view->url() == url && !reload) { // DolphinView won't do anything in that case, so don't emit started + return true; + } setUrl(url); // remember it at the KParts level m_view->setUrl(url); - if (arguments().reload()) + if (reload) m_view->reload(); emit started(0); // get the wheel to spin return true; diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 073ab5589..3a8d6a8ea 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -430,12 +430,11 @@ void DolphinView::setUrl(const KUrl& url) return; } - m_controller->setUrl(url); + m_controller->setUrl(url); // emits urlChanged, which we forward applyViewProperties(url); startDirLister(url); - emit urlChanged(url); } void DolphinView::mouseReleaseEvent(QMouseEvent* event) @@ -917,7 +916,7 @@ void DolphinView::updateViewportColor() { QColor color = KColorScheme(KColorScheme::View).background(); if (m_active) { - emit urlChanged(url()); + emit urlChanged(url()); // Hmm, this is a hack; the url hasn't really changed. emit selectionChanged(selectedItems()); } else { color.setAlpha(0); -- 2.47.3