]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinviewcontainer.cpp
fixed memory leaks (thanks to David for fixing this in KDirOperator)
[dolphin.git] / src / dolphinviewcontainer.cpp
index 7e28a30fe3fe570925f9690af1e9cacfcb5609fd..99c76bee261327f64f047d0d005415406d59612a 100644 (file)
@@ -129,6 +129,8 @@ DolphinViewContainer::DolphinViewContainer(DolphinMainWindow* mainWindow,
             this, SLOT(showErrorMessage(const QString&)));
     connect(m_view, SIGNAL(infoMessage(const QString&)),
             this, SLOT(showInfoMessage(const QString&)));
+    connect(m_view, SIGNAL(operationCompletedMessage(const QString&)),
+            this, SLOT(showOperationCompletedMessage(const QString&)));
     connect(m_view, SIGNAL(itemTriggered(KFileItem)),
             this, SLOT(slotItemTriggered(KFileItem)));
     connect(m_view, SIGNAL(startedPathLoading(const KUrl&)),
@@ -156,8 +158,9 @@ DolphinViewContainer::DolphinViewContainer(DolphinMainWindow* mainWindow,
 
 DolphinViewContainer::~DolphinViewContainer()
 {
-    delete m_dirLister;
-    m_dirLister = 0;
+    delete m_dolphinModel;
+    m_dolphinModel = 0;
+    m_dirLister = 0; // deleted by m_dolphinModel
 }
 
 void DolphinViewContainer::setUrl(const KUrl& url)
@@ -250,6 +253,11 @@ void DolphinViewContainer::showErrorMessage(const QString& msg)
     m_statusBar->setMessage(msg, DolphinStatusBar::Error);
 }
 
+void DolphinViewContainer::showOperationCompletedMessage(const QString& msg)
+{
+    m_statusBar->setMessage(msg, DolphinStatusBar::OperationCompleted);
+}
+
 void DolphinViewContainer::closeFilterBar()
 {
     m_filterBar->hide();