summaryrefslogtreecommitdiff
path: root/src/application.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-04-21 11:27:17 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-04-21 11:27:17 +0200
commit8eac211c434358cbe536eb6f1448f1d565a5f26f (patch)
tree379776ba033cbf868d8a66d80b20359d9c19fb4c /src/application.cpp
parentSimpler MessageBoxs handling.. (diff)
downloadrekonq-8eac211c434358cbe536eb6f1448f1d565a5f26f.tar.xz
Moving new download system to mainline.
I did some changes to fit things as simple as possible. We can obviously improve things in a second moment..
Diffstat (limited to 'src/application.cpp')
-rw-r--r--src/application.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 65f6e8a8..3399dde4 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -50,7 +50,7 @@
HistoryManager *Application::s_historyManager = 0;
NetworkAccessManager *Application::s_networkAccessManager = 0;
-
+DownloadManager *Application::s_downloadManager = 0;
Application::Application()
: KUniqueApplication()
@@ -67,6 +67,7 @@ Application::Application()
Application::~Application()
{
+ delete s_downloadManager;
delete s_networkAccessManager;
delete s_historyManager;
}
@@ -117,12 +118,6 @@ void Application::postLaunch()
}
-void Application::downloadUrl(const KUrl &srcUrl, const KUrl &destUrl)
-{
- new Download(srcUrl, destUrl);
-}
-
-
void Application::openUrl(const KUrl &url)
{
mainWindow()->loadUrl(url);
@@ -169,6 +164,16 @@ HistoryManager *Application::historyManager()
}
+DownloadManager *Application::downloadManager()
+{
+ if (!s_downloadManager)
+ {
+ s_downloadManager = new DownloadManager();
+ }
+ return s_downloadManager;
+}
+
+
KIcon Application::icon(const KUrl &url) const
{
KIcon icon = KIcon(QWebSettings::iconForUrl(url));