From d9ed1e53b7ea0c994972f4628a4dbb431fdf9fde Mon Sep 17 00:00:00 2001 From: Arno Date: Wed, 21 Aug 2013 16:59:04 +0200 Subject: Fix MappingTreeModel for good * Again: remove the transaction madness besides almost everywhere leaving one instance where it is actually useful. * Hide the buttons to add and delete mapping types. Haven't thought that through complete. What should be deleted on cascade? Do we really want/ --- mappingtreemodel.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'mappingtreemodel.h') diff --git a/mappingtreemodel.h b/mappingtreemodel.h index 1fd2c82..c28967a 100644 --- a/mappingtreemodel.h +++ b/mappingtreemodel.h @@ -64,7 +64,7 @@ class MappingTreeModel : public SmTreeModel { QVariant name; }; void getMappings(); - int addChild(const QString &name, int type); + int addDescription(const QString &name, int type); void getMappingTypes(); void getChildrenRecursive(SmTreeItem *item); bool updateChild(SmTreeItem *item, const QVariant &value); @@ -74,13 +74,6 @@ class MappingTreeModel : public SmTreeModel { int lowerBound(SmTreeItem *item, const QVariant &value, int column = 0) const; QSqlDatabase mDb; QString mSParentsQ; - QSqlQuery *mAddMappingTypeQ; - QSqlQuery *mDeleteMappingTypeQ; - QSqlQuery *mAddDescriptionQ; - QSqlQuery *mSelectDescriptionQ; - QSqlQuery *mUpdateParentQ; - QSqlQuery *mDeleteMappingParentQ; - QSqlQuery *mDescriptionQ; QList mMappingTypes; QMap mMappings; const QString mForbidden; -- cgit v1.2.3-70-g09d2