diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2011-05-26 00:12:01 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-05-26 00:12:01 +0200 |
commit | 47bd57b5027f0fe34a6619d3d1902a9e67a16673 (patch) | |
tree | e02b667975eef3d35efa3ab325a67279065ff32e /src/newtabpage.cpp | |
parent | Fixes the size of a tab preview to a constant size, decorate it a bit (diff) | |
download | rekonq-47bd57b5027f0fe34a6619d3d1902a9e67a16673.tar.xz |
Adding DownloadManager class, following Pierre and Benjamin code changes.
First step in the introduction of the new rekonq pages
Diffstat (limited to 'src/newtabpage.cpp')
-rw-r--r-- | src/newtabpage.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
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("<strong>") + fName + QL1S("</strong>")); div.appendInside(QL1S(" - ")); - QString date = KGlobal::locale()->formatDateTime(item.dateTime, KLocale::FancyLongDate); + QString date = KGlobal::locale()->formatDateTime(item->dateTime(), KLocale::FancyLongDate); div.appendInside(QL1S("<em>") + date + QL1S("</em>")); div.appendInside(QL1S("<br />")); - div.appendInside(QL1S("<a href=") + item.srcUrlString + QL1C('>') + item.srcUrlString + QL1S("</a>")); + div.appendInside(QL1S("<a href=") + item->originUrl() + QL1C('>') + item->originUrl() + QL1S("</a>")); div.appendInside(QL1S("<br />")); div.appendInside(markup(QL1S("a"))); |