fix memleak on close; save again on close so that the expanded/collapsed state is remembered.

CCBUG: 131127
(this is the actual fix for it, I closed it too early)

svn path=/trunk/KDE/kdebase/apps/; revision=1050729
This commit is contained in:
David Faure 2009-11-18 00:12:05 +00:00
parent 685f1f8926
commit d2d57ea0d7
2 changed files with 5 additions and 0 deletions

View file

@ -199,6 +199,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) {
if (askUser((gotFilenameArg ? filename : QString()), readonly)) {
KEBApp *toplevel = new KEBApp(filename, readonly, address, browser, caption, dbusObjectName);
toplevel->setAttribute(Qt::WA_DeleteOnClose);
toplevel->show();
return app.exec();
}

View file

@ -510,6 +510,10 @@ void KEBApp::updateStatus(const QString &url)
}
KEBApp::~KEBApp() {
// Save again, just in case the user expanded/collapsed folders (#131127)
CurrentMgr::self()->notifyManagers();
s_topLevel = 0;
delete m_cmdHistory;
delete ActionsImpl::self();