diff options
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)); |