diff options
Diffstat (limited to 'src/application.cpp')
-rw-r--r-- | src/application.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/application.cpp b/src/application.cpp index f37720ff..14e34686 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -50,6 +50,7 @@ #include "stackedurlbar.h" #include "tabbar.h" #include "urlbar.h" +#include "useragentmanager.h" #include "webtab.h" // KDE Includes @@ -142,6 +143,13 @@ Application::~Application() m_adblockManager.clear(); } + if (!m_userAgentManager.isNull()) + { + kDebug() << "deleting user agent manager"; + delete m_userAgentManager.data(); + m_userAgentManager.clear(); + } + // TODO: // add a check to NOT close rekonq // until last download is finished @@ -385,6 +393,16 @@ DownloadManager *Application::downloadManager() } +UserAgentManager *Application::userAgentManager() +{ + if (m_userAgentManager.isNull()) + { + m_userAgentManager = new UserAgentManager(instance()); + } + return m_userAgentManager.data(); +} + + void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type) { if (url.isEmpty()) |