From: Flavio Date: Wed, 25 Jul 2012 14:25:51 +0000 (+0200) Subject: New downloads are now added at the top of the list X-Git-Tag: 1.9~19 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=16823dd9631c2dd36bebd9a49773e61bd60b1c0d;p=minitube New downloads are now added at the top of the list --- diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 6944e16..a4f1c49 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -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()));