summaryrefslogtreecommitdiffstats
path: root/filestreemodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'filestreemodel.cpp')
-rw-r--r--filestreemodel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/filestreemodel.cpp b/filestreemodel.cpp
index 35883d3..76dca8b 100644
--- a/filestreemodel.cpp
+++ b/filestreemodel.cpp
@@ -224,6 +224,9 @@ bool FilesTreeModel::addFile(const QString &fullPath, int type, int quality, int
//insert item
if(mInsertFileQuery->exec()){
-
+ mDb.commit();
+ return true;
}
+ mDb.rollback();
+ return false;
}