]> git.sur5r.net Git - minitube/commitdiff
New downloads are now added at the top of the list
authorFlavio <flavio@odisseo.local>
Wed, 25 Jul 2012 14:25:51 +0000 (16:25 +0200)
committerFlavio <flavio@odisseo.local>
Wed, 25 Jul 2012 14:25:51 +0000 (16:25 +0200)
src/downloadmanager.cpp

index 6944e1639f77c87d4c9374fb66970c795160ac41..a4f1c495d60c9704123ab1e86f3600dc24325f06 100644 (file)
@@ -117,9 +117,8 @@ void DownloadManager::gotStreamUrl(QUrl url) {
     Video *videoCopy = video->clone();
     DownloadItem *item = new DownloadItem(videoCopy, url, filename, this);
 
-    int row = items.count();
-    downloadModel->beginInsertRows(QModelIndex(), row, row);
-    items.append(item);
+    downloadModel->beginInsertRows(QModelIndex(), 0, 0);
+    items.prepend(item);
     downloadModel->endInsertRows();
 
     // connect(item, SIGNAL(statusChanged()), SLOT(updateStatusMessage()));