From 1b1d3a18a8fffdd61f533fd4b0bde4f75d683212 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 27 Jul 2013 07:18:32 +0200 Subject: Cleanup closeEvent Don't try to delete all the prepared statements manually. Get rid of the ~destructors and just close the QSqlDatabase. close() deletes all Statements. Also, quit() all QThreads on closeEvent() except CompleterProducer. When the experimental archive view gets merged, that QThread is gone. No need to bother... --- mappingtreemodel.cpp | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'mappingtreemodel.cpp') diff --git a/mappingtreemodel.cpp b/mappingtreemodel.cpp index 9c6be13..650a21d 100644 --- a/mappingtreemodel.cpp +++ b/mappingtreemodel.cpp @@ -43,20 +43,6 @@ MappingTreeModel::MappingTreeModel(QStringList &headers, QObject *parent) : SmTr mDescriptionQ->prepare("SELECT tdescription_name, idescription_id FROM mapping_description WHERE idescription_type = :type"); } -MappingTreeModel::~MappingTreeModel(){ - delete mTypesQ; - delete mUpdateTypeQ; - delete mUpdateChildQ; - delete mAddMappingTypeQ; - delete mDeleteMappingTypeQ; - delete mAddDescriptionQ; - delete mSelectDescriptionQ; - delete mAddParentQ; - delete mUpdateParentQ; - delete mDescriptionQ; - mDb = QSqlDatabase(); -} - QStringList MappingTreeModel::mappingTypeNames() const { QStringList retval; foreach(mappingType t, mMappingTypes){ -- cgit v1.2.3-70-g09d2