]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Hide message widgets only when reloading the view
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Tue, 4 Oct 2016 15:30:51 +0000 (17:30 +0200)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Tue, 4 Oct 2016 15:30:51 +0000 (17:30 +0200)
Otherwise an error message might be hidden before it's even shown.

BUG: 357651
FIXED-IN: 16.08.2
REVIEW: 129061

src/dolphinmainwindow.cpp
src/dolphinviewcontainer.cpp
src/dolphinviewcontainer.h

index 34008b5eb685104d69f3b18b67affea2912dfcfc..e729ce972ec686cd8f57a5204d7e1db95ccff711 100644 (file)
@@ -526,7 +526,7 @@ void DolphinMainWindow::toggleSplitView()
 void DolphinMainWindow::reloadView()
 {
     clearStatusBar();
-    m_activeViewContainer->view()->reload();
+    m_activeViewContainer->reload();
 }
 
 void DolphinMainWindow::stopLoading()
index 1c43fc9779450f5c392c0479af052a336fb07759..4e625c7d8ee4ddd69e2f9b41c1e1fe0ee7483627 100644 (file)
@@ -98,8 +98,6 @@ DolphinViewContainer::DolphinViewContainer(const QUrl& url, QWidget* parent) :
             m_urlNavigator, &KUrlNavigator::setLocationUrl);
     connect(m_view, &DolphinView::urlChanged,
             m_messageWidget, &KMessageWidget::hide);
-    connect(m_view, &DolphinView::directoryLoadingCompleted,
-            m_messageWidget, &KMessageWidget::hide);
     connect(m_view, &DolphinView::writeStateChanged,
             this, &DolphinViewContainer::writeStateChanged);
     connect(m_view, &DolphinView::requestItemInfo,
@@ -368,6 +366,12 @@ QString DolphinViewContainer::placesText() const
     return text;
 }
 
+void DolphinViewContainer::reload()
+{
+    view()->reload();
+    m_messageWidget->hide();
+}
+
 void DolphinViewContainer::setUrl(const QUrl& newUrl)
 {
     if (newUrl != m_urlNavigator->locationUrl()) {
index 62f91100e9e5d457edd6f4d927c87610335834d7..0b6a76d5eac867a4da8bf0a71414584a2c77c2d7 100644 (file)
@@ -129,6 +129,11 @@ public:
      */
     QString placesText() const;
 
+    /**
+     * Reload the view of this container. This will also hide messages in a messagewidget.
+     */
+    void reload();
+
 public slots:
     /**
      * Sets the current active URL, where all actions are applied. The