From 1e5d35be7c17de3fee9155b754aa55f6ed92ee62 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 17 Nov 2013 23:40:36 +0100 Subject: Get sure webkit objects are deleted in the app d-tor CCBUG: 321557 --- src/application.cpp | 15 ++++++++++++++- src/application.h | 2 +- src/webtab/webpage.cpp | 2 ++ src/webtab/webview.cpp | 2 ++ 4 files changed, 19 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/application.cpp b/src/application.cpp index a6d7288d..bec02687 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -2,7 +2,7 @@ * * This file is a part of the rekonq project * -* Copyright (C) 2012 by Andrea Diamantini +* Copyright (C) 2012-2013 by Andrea Diamantini * * * This program is free software; you can redistribute it and/or @@ -108,6 +108,19 @@ Application::~Application() delete m_activityConsumer; #endif + // Destroy all windows... + Q_FOREACH(QWeakPointer pointer, m_rekonqWindows) + { + delete pointer.data(); + pointer.clear(); + } + + // Destroy all web apps + Q_FOREACH(WebTab *tab, m_webApps) + { + delete tab; + } + kDebug() << "Bye bye (k)baby..."; } diff --git a/src/application.h b/src/application.h index e97d653f..752f7964 100644 --- a/src/application.h +++ b/src/application.h @@ -2,7 +2,7 @@ * * This file is a part of the rekonq project * -* Copyright (C) 2012 by Andrea Diamantini +* Copyright (C) 2012-2013 by Andrea Diamantini * * * This program is free software; you can redistribute it and/or diff --git a/src/webtab/webpage.cpp b/src/webtab/webpage.cpp index b404013d..c488ee9b 100644 --- a/src/webtab/webpage.cpp +++ b/src/webtab/webpage.cpp @@ -192,6 +192,8 @@ WebPage::~WebPage() QString path = WebSnap::imagePathFromUrl(mainFrame()->url().toString()); QFile::remove(path); preview.save(path); + + kDebug() << "BYE BYE WEBPAGE"; } diff --git a/src/webtab/webview.cpp b/src/webtab/webview.cpp index 6b8416fe..f2349c01 100644 --- a/src/webtab/webview.cpp +++ b/src/webtab/webview.cpp @@ -128,6 +128,8 @@ WebView::~WebView() { if (m_isViewSmoothScrolling) stopSmoothScrolling(); + + kDebug() << "BYE BYE WEBVIEW"; } -- cgit v1.2.1