]> git.sur5r.net Git - minitube/blobdiff - src/downloadmodel.cpp
Upload 3.9.3-2 to unstable
[minitube] / src / downloadmodel.cpp
index 2031d3f66288413fc0551741d78d5bc4790ce949..17bbeaa4531354c70164c4af09bc822fa2a2af68 100644 (file)
@@ -1,3 +1,23 @@
+/* $BEGIN_LICENSE
+
+This file is part of Minitube.
+Copyright 2009, Flavio Tordini <flavio.tordini@gmail.com>
+
+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 <http://www.gnu.org/licenses/>.
+
+$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<DownloadItem*> items = downloadManager->getItems();
+    QVector<DownloadItem*> 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) {