From 0b807eba97e65bf9e25f83387826ef2579b79c90 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 26 Jun 2010 15:24:00 +0200 Subject: Actors and genre edit Implemented widgets for actor and genre editing of movies. Created new MappingTableWidget for both genres and actors and revamped ArchiveTreeView to show 2 widgets below the FilesTreeView separated by a splitter. While testing the new setup several bugs were fixed: -an SQL syntax error in FilesTreeModel -fixed SmModelSingleton to properly work with table names I also changed the signature of MappingTableModel::addMapping for the ease of use and added MappingTableModel::removeMapping. MappingTableModel got 2 new convenience functions: 1. bool contains(QString) to check if an item is already present 2. QModelIndex find() to get the index of a specific value from the model. --- filestreemodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'filestreemodel.cpp') diff --git a/filestreemodel.cpp b/filestreemodel.cpp index 973e7a6..cbfbd24 100644 --- a/filestreemodel.cpp +++ b/filestreemodel.cpp @@ -18,7 +18,7 @@ FilesTreeModel::FilesTreeModel(QStringList &headers, QObject *parent) : SmTreeMo mUpdateDvdQuery = new QSqlQuery(mDb); mUpdateDvdQuery->prepare("UPDATE files SET idvd = :dvd WHERE ifiles_id = :id"); mUpdateQualityQuery = new QSqlQuery(mDb); - mUpdateQualityQuery->prepare("UPDATE files SET iquality = :quality WHERE ifiles_id = :id"); + mUpdateQualityQuery->prepare("UPDATE files SET siquality = :quality WHERE ifiles_id = :id"); } FilesTreeModel::~FilesTreeModel(){ -- cgit v1.2.3-70-g09d2