From 47bd57b5027f0fe34a6619d3d1902a9e67a16673 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 26 May 2011 00:12:01 +0200 Subject: Adding DownloadManager class, following Pierre and Benjamin code changes. First step in the introduction of the new rekonq pages --- src/newtabpage.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/newtabpage.cpp') diff --git a/src/newtabpage.cpp b/src/newtabpage.cpp index 1dd8b462..940e2c4f 100644 --- a/src/newtabpage.cpp +++ b/src/newtabpage.cpp @@ -35,6 +35,7 @@ // Local Includes #include "application.h" #include "bookmarkprovider.h" +#include "downloadmanager.h" #include "historymodels.h" #include "mainview.h" #include "mainwindow.h" @@ -560,7 +561,7 @@ void NewTabPage::downloadsPage() KIconLoader::Toolbar); m_root.document().findFirst(QL1S("#actions")).appendInside(clearData); - DownloadList list = rApp->downloads(); + DownloadList list = rApp->downloadManager()->downloads(); if (list.isEmpty()) { @@ -569,14 +570,14 @@ void NewTabPage::downloadsPage() return; } - foreach(const DownloadItem &item, list) + foreach(DownloadItem *item, list) { m_root.prependInside(markup(QL1S("div"))); QWebElement div = m_root.firstChild(); div.addClass(QL1S("download")); - KUrl u = KUrl(item.destUrlString); + KUrl u = KUrl(item->destinationUrl()); QString fName = u.fileName(); QString dir = QL1S("file://") + u.directory(); QString file = dir + QL1C('/') + fName; @@ -589,11 +590,11 @@ void NewTabPage::downloadsPage() div.appendInside(QL1S("") + fName + QL1S("")); div.appendInside(QL1S(" - ")); - QString date = KGlobal::locale()->formatDateTime(item.dateTime, KLocale::FancyLongDate); + QString date = KGlobal::locale()->formatDateTime(item->dateTime(), KLocale::FancyLongDate); div.appendInside(QL1S("") + date + QL1S("")); div.appendInside(QL1S("
")); - div.appendInside(QL1S("")); + div.appendInside(QL1S("")); div.appendInside(QL1S("
")); div.appendInside(markup(QL1S("a"))); -- cgit v1.2.1