mirror of
https://github.com/YACReader/yacreader
synced 2025-07-21 06:24:39 -04:00
a?adida la funci?n de borrar c?mics del disco
This commit is contained in:
@ -433,4 +433,20 @@ QModelIndex TableModel::getIndexFromId(quint64 id)
|
||||
}
|
||||
|
||||
return index(i,0);
|
||||
}
|
||||
|
||||
void TableModel::remove(ComicDB * comic, int row)
|
||||
{
|
||||
beginRemoveRows(QModelIndex(),row,row);
|
||||
QSqlDatabase db = DataBaseManagement::loadDatabase(_databasePath);
|
||||
|
||||
DBHelper::removeFromDB(comic,db);
|
||||
|
||||
removeRow(row);
|
||||
delete _data.at(row);
|
||||
_data.removeAt(row);
|
||||
|
||||
db.close();
|
||||
QSqlDatabase::removeDatabase(_databasePath);
|
||||
endRemoveRows();
|
||||
}
|
Reference in New Issue
Block a user