From 16823dd9631c2dd36bebd9a49773e61bd60b1c0d Mon Sep 17 00:00:00 2001 From: Flavio Date: Wed, 25 Jul 2012 16:25:51 +0200 Subject: [PATCH] New downloads are now added at the top of the list --- src/downloadmanager.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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())); -- 2.39.5