a working multi delete in libraries

This commit is contained in:
Chris Cochrun 2023-03-05 06:51:47 -06:00
parent 8eeb3b5151
commit 6c33e52ea3
10 changed files with 51 additions and 14 deletions

View file

@ -351,3 +351,12 @@ void VideoProxyModel::deleteVideo(const int &row) {
auto model = qobject_cast<VideoSqlModel *>(sourceModel());
model->deleteVideo(mapToSource(index(row,0)).row());
}
void VideoProxyModel::deleteVideos(const QVector<int> &rows) {
auto model = qobject_cast<VideoSqlModel *>(sourceModel());
qDebug() << "DELETING!!!!!!!!!!!!!!!!!!!!!!!" << rows;
for (int i = rows.size() - 1; i >= 0; i--) {
qDebug() << "deleting" << rows.at(i);
model->deleteVideo(rows.at(i));
}
}