X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/246c18a93c63cd3eaa7b53ce27f82009481f3401..db552079bebc5ac7273ad8389a3dfd738445dbfc:/src/dolphinpart.cpp diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index 39df8feae..bb9a1ea59 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -20,9 +20,9 @@ #include "dolphinpart.h" #include "dolphinsortfilterproxymodel.h" #include "dolphinview.h" +#include "dolphinmodel.h" #include -#include #include #include #include @@ -53,16 +53,16 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QStringLi connect(m_dirLister, SIGNAL(completed(KUrl)), this, SLOT(slotCompleted(KUrl))); connect(m_dirLister, SIGNAL(canceled(KUrl)), this, SLOT(slotCanceled(KUrl))); - m_dirModel = new KDirModel(this); - m_dirModel->setDirLister(m_dirLister); + m_dolphinModel = new DolphinModel(this); + m_dolphinModel->setDirLister(m_dirLister); m_proxyModel = new DolphinSortFilterProxyModel(this); - m_proxyModel->setSourceModel(m_dirModel); + m_proxyModel->setSourceModel(m_dolphinModel); m_view = new DolphinView(parentWidget, KUrl(), m_dirLister, - m_dirModel, + m_dolphinModel, m_proxyModel); setWidget(m_view); @@ -107,8 +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;