diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-04-21 11:27:17 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-04-21 11:27:17 +0200 |
commit | 8eac211c434358cbe536eb6f1448f1d565a5f26f (patch) | |
tree | 379776ba033cbf868d8a66d80b20359d9c19fb4c /src/application.cpp | |
parent | Simpler MessageBoxs handling.. (diff) | |
download | rekonq-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.cpp | 19 |
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)); |