From 2abe26db203c75798775a42eae2d7dc7ab9bf354 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Wed, 20 Dec 2017 18:08:56 +0100 Subject: Bug fixes .config/smolbote will now be created if missing Connected profiles to download manager Added missing license from WebPage --- src/webengine/webpage.cpp | 8 ++++++++ src/webengine/webpage.h | 8 ++++++++ src/webengine/webview.cpp | 3 ++- 3 files changed, 18 insertions(+), 1 deletion(-) (limited to 'src/webengine') diff --git a/src/webengine/webpage.cpp b/src/webengine/webpage.cpp index 79ba809..a39c942 100644 --- a/src/webengine/webpage.cpp +++ b/src/webengine/webpage.cpp @@ -1,3 +1,11 @@ +/* + * This file is part of smolbote. It's copyrighted by the contributors recorded + * in the version control history of the file, available from its original + * location: git://neueland.iserlohn-fortress.net/smolbote.git + * + * SPDX-License-Identifier: GPL-3.0 + */ + #include "webpage.h" WebPage::WebPage(QWebEngineProfile *profile, QObject *parent) : diff --git a/src/webengine/webpage.h b/src/webengine/webpage.h index 6ae0802..ffbe34d 100644 --- a/src/webengine/webpage.h +++ b/src/webengine/webpage.h @@ -1,3 +1,11 @@ +/* + * This file is part of smolbote. It's copyrighted by the contributors recorded + * in the version control history of the file, available from its original + * location: git://neueland.iserlohn-fortress.net/smolbote.git + * + * SPDX-License-Identifier: GPL-3.0 + */ + #ifndef WEBPAGE_H #define WEBPAGE_H diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp index 4f7b386..55efad7 100644 --- a/src/webengine/webview.cpp +++ b/src/webengine/webview.cpp @@ -130,7 +130,8 @@ QMenu *WebView::pageMenu() void WebView::setPage(WebPage *page) { Q_CHECK_PTR(page); - //this->page()->deleteLater(); + // make sure the page gets cleaned up if we replace it by taking ownership + page->setParent(this); connect(page, &WebPage::linkHovered, this, &WebView::handleLinkHovered); connect(page, &WebPage::certificateErrorMessage, this, &WebView::handleCertificateError); QWebEngineView::setPage(page); -- cgit v1.2.1