1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 21:23:52 +00:00

Allow Qt to cleanup its signals.

This commit is contained in:
cc9cii 2015-04-21 10:25:19 +10:00
parent a836446d22
commit f326b14604
2 changed files with 2 additions and 6 deletions

View file

@ -69,7 +69,7 @@ void CSMDoc::DocumentManager::removeDocument (CSMDoc::Document *document)
throw std::runtime_error ("removing invalid document"); throw std::runtime_error ("removing invalid document");
mDocuments.erase (iter); mDocuments.erase (iter);
delete document; document->deleteLater();
if (mDocuments.empty()) if (mDocuments.empty())
emit lastDocumentDeleted(); emit lastDocumentDeleted();

View file

@ -32,10 +32,6 @@ void CSVDoc::View::closeEvent (QCloseEvent *event)
event->ignore(); event->ignore();
else 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 // closeRequest() returns true if last document
mViewManager.removeDocAndView(mDocument); mViewManager.removeDocAndView(mDocument);
} }