]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Make use of the error messages coming from the places model.
authorKevin Ottens <ervin@kde.org>
Fri, 15 Jun 2007 00:52:25 +0000 (00:52 +0000)
committerKevin Ottens <ervin@kde.org>
Fri, 15 Jun 2007 00:52:25 +0000 (00:52 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=675760

src/dolphinmainwindow.cpp
src/dolphinmainwindow.h

index 35c50e88d783c4e776d8ee6af89a363716c3c84b..42e80f9324353ee1a293dd5e6617916a2aaadd61 100644 (file)
@@ -98,6 +98,8 @@ DolphinMainWindow::DolphinMainWindow(int id) :
             this, SLOT(slotUndoAvailable(bool)));
     connect(undoManager, SIGNAL(undoTextChanged(const QString&)),
             this, SLOT(slotUndoTextChanged(const QString&)));
+    connect(DolphinSettings::instance().placesModel(), SIGNAL(errorMessage(const QString&)),
+            this, SLOT(slotHandlePlacesError(const QString&)));
 }
 
 DolphinMainWindow::~DolphinMainWindow()
@@ -480,6 +482,14 @@ void DolphinMainWindow::quit()
     close();
 }
 
+void DolphinMainWindow::slotHandlePlacesError(const QString &message)
+{
+    if (!message.isEmpty()) {
+        DolphinStatusBar* statusBar = m_activeViewContainer->statusBar();
+        statusBar->setMessage(message, DolphinStatusBar::Error);
+    }
+}
+
 void DolphinMainWindow::slotHandleJobError(KJob* job)
 {
     if (job->error() != 0) {
index a165573a1c08e7449ad00b0c5b0af0802d20e8b9..17a7dce6a505594e2e0eb9e4aeb54df5feef6ac9 100644 (file)
@@ -190,6 +190,12 @@ private slots:
      */
     void properties();
 
+    /**
+     * Shows the error information from the places model
+     * in the status bar.
+     */
+    void slotHandlePlacesError(const QString &message);
+
     /**
      * Shows the error information of the job \a job
      * in the status bar.