]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinpart.cpp
KDirModel takes ownership of the directory lister, so don't delete the directory...
[dolphin.git] / src / dolphinpart.cpp
index f44ada30462fb170bff3cba600f2d00d8cd9e6e0..a01e072658a9fa7d05a38c3c56cbef418a9aa5a1 100644 (file)
@@ -78,7 +78,7 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL
     connect(m_dirLister, SIGNAL(errorMessage(QString)), this, SLOT(slotErrorMessage(QString)));
 
     m_dolphinModel = new DolphinModel(this);
-    m_dolphinModel->setDirLister(m_dirLister);
+    m_dolphinModel->setDirLister(m_dirLister); // m_dolphinModel takes ownership of m_dirLister
 
     m_proxyModel = new DolphinSortFilterProxyModel(this);
     m_proxyModel->setSourceModel(m_dolphinModel);
@@ -148,7 +148,6 @@ DolphinPart::~DolphinPart()
 {
     DolphinSettings::instance().save();
     DolphinNewFileMenuObserver::instance().detach(m_newFileMenu);
-    delete m_dirLister;
 }
 
 void DolphinPart::createActions()