┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dolphinpart.cpp3
-rw-r--r--src/dolphinviewcontainer.cpp9
2 files changed, 2 insertions, 10 deletions
diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp
index f44ada304..a01e07265 100644
--- a/src/dolphinpart.cpp
+++ b/src/dolphinpart.cpp
@@ -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()
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
index 380c27692..45490e363 100644
--- a/src/dolphinviewcontainer.cpp
+++ b/src/dolphinviewcontainer.cpp
@@ -109,7 +109,7 @@ DolphinViewContainer::DolphinViewContainer(const KUrl& url, QWidget* parent) :
m_dirLister->setDelayedMimeTypes(true);
m_dolphinModel = new DolphinModel(this);
- m_dolphinModel->setDirLister(m_dirLister);
+ m_dolphinModel->setDirLister(m_dirLister); // m_dolphinModel takes ownership of m_dirLister
m_dolphinModel->setDropsAllowed(DolphinModel::DropOnDirectory);
m_proxyModel = new DolphinSortFilterProxyModel(this);
@@ -191,13 +191,6 @@ DolphinViewContainer::DolphinViewContainer(const KUrl& url, QWidget* parent) :
DolphinViewContainer::~DolphinViewContainer()
{
- m_dirLister->disconnect();
-
- delete m_proxyModel;
- m_proxyModel = 0;
- delete m_dolphinModel;
- m_dolphinModel = 0;
- m_dirLister = 0; // deleted by m_dolphinModel
}
KUrl DolphinViewContainer::url() const