X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fdownloadmodel.cpp;h=17bbeaa4531354c70164c4af09bc822fa2a2af68;hb=fe9d17324e88a65d4f28afccf21857c5a5e60649;hp=2031d3f66288413fc0551741d78d5bc4790ce949;hpb=a8e005af0aa72f809f823bbd741bb3d0def00ced;p=minitube diff --git a/src/downloadmodel.cpp b/src/downloadmodel.cpp index 2031d3f..17bbeaa 100644 --- a/src/downloadmodel.cpp +++ b/src/downloadmodel.cpp @@ -1,3 +1,23 @@ +/* $BEGIN_LICENSE + +This file is part of Minitube. +Copyright 2009, Flavio Tordini + +Minitube is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Minitube is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Minitube. If not, see . + +$END_LICENSE */ + #include "downloadmodel.h" #include "downloadmanager.h" #include "downloaditem.h" @@ -21,7 +41,7 @@ QVariant DownloadModel::data(const QModelIndex &index, int role) const { int row = index.row(); if (row < 0 || row >= rowCount()) return QVariant(); - QList items = downloadManager->getItems(); + QVector items = downloadManager->getItems(); if (items.isEmpty()) return QVariant(); switch (role) { @@ -45,7 +65,8 @@ QVariant DownloadModel::data(const QModelIndex &index, int role) const { } void DownloadModel::sendReset() { - reset(); + beginResetModel(); + endResetModel(); } void DownloadModel::setHoveredRow(int row) {