Skip to content

Commit

Permalink
Allow Qt to cleanup its signals.
Browse files Browse the repository at this point in the history
  • Loading branch information
cc9cii committed Apr 21, 2015
1 parent a836446 commit f326b14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/opencs/model/doc/documentmanager.cpp
Expand Up @@ -69,7 +69,7 @@ void CSMDoc::DocumentManager::removeDocument (CSMDoc::Document *document)
throw std::runtime_error ("removing invalid document");

mDocuments.erase (iter);
delete document;
document->deleteLater();

if (mDocuments.empty())
emit lastDocumentDeleted();
Expand Down
6 changes: 1 addition & 5 deletions apps/opencs/view/doc/view.cpp
Expand Up @@ -32,10 +32,6 @@ void CSVDoc::View::closeEvent (QCloseEvent *event)
event->ignore();
else
{
// delete the subviews first
for (QList<CSVDoc::SubView *>::iterator iter = mSubViews.begin(); iter != mSubViews.end(); ++iter)
delete *iter;

// closeRequest() returns true if last document
mViewManager.removeDocAndView(mDocument);
}
Expand Down Expand Up @@ -98,7 +94,7 @@ void CSVDoc::View::setupEditMenu()

QAction *search = new QAction (tr ("Search"), this);
connect (search, SIGNAL (triggered()), this, SLOT (addSearchSubView()));
edit->addAction (search);
edit->addAction (search);
}

void CSVDoc::View::setupViewMenu()
Expand Down

0 comments on commit f326b14

Please sign in to comment.