diff options
Diffstat (limited to 'filestreemodel.cpp')
-rw-r--r-- | filestreemodel.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/filestreemodel.cpp b/filestreemodel.cpp index db16d95..35ae8bc 100644 --- a/filestreemodel.cpp +++ b/filestreemodel.cpp @@ -413,11 +413,6 @@ bool FilesTreeModel::addFile(const QString &fullPath, int type, int quality, int } bool FilesTreeModel::deleteFile(const QModelIndex &file){ - QString fullPath = file.data(FullPathRole).toString(); - QFileInfo fi(fullPath); - if(!fi.exists()){ - return false; - } QVariant fileId = file.data(FilesIdRole); mDb.transaction(); mDeleteFileQuery->bindValue(":id", fileId); @@ -425,10 +420,6 @@ bool FilesTreeModel::deleteFile(const QModelIndex &file){ mDb.rollback(); return false; } - if(!QFile::remove(fullPath)){ - mDb.rollback(); - return false; - } removeRows(file.row(), 1, file.parent()); mDb.commit(); return true; |