summaryrefslogtreecommitdiffstats
path: root/archivemodel.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2013-07-12 17:23:33 +0200
committerArno <am@disconnect.de>2013-07-12 17:23:33 +0200
commite8edacfc5175e91d27d6fcba8e3ffa1b1c80754c (patch)
tree799a4731f2b5ed5c5993c1fbf83341f228061303 /archivemodel.cpp
parentea96c5b64b1fd1a0ae152363c5ec804eaf960dcf (diff)
downloadSheMov-e8edacfc5175e91d27d6fcba8e3ffa1b1c80754c.tar.gz
SheMov-e8edacfc5175e91d27d6fcba8e3ffa1b1c80754c.tar.bz2
SheMov-e8edacfc5175e91d27d6fcba8e3ffa1b1c80754c.zip
Dis/enable QActions for ContextMenu
Handle actions dependent on type node.
Diffstat (limited to 'archivemodel.cpp')
-rw-r--r--archivemodel.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/archivemodel.cpp b/archivemodel.cpp
index 621ee9c..cbca042 100644
--- a/archivemodel.cpp
+++ b/archivemodel.cpp
@@ -112,6 +112,7 @@ bool ArchiveModel::setData(const QModelIndex &idx, const QVariant &value, int ro
}
SmTreeItem *item = itemAt(idx);
int nodeType = item->data(Type).toInt();
+ // handle duplicate key error!!!
QSqlQuery updateQuery(mDb);
if(nodeType == GenreNode){
updateQuery.prepare("UPDATE genres SET tgenrename = :value WHERE igenres_id = :id");