aboutsummaryrefslogtreecommitdiff
path: root/src/webengine
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/webpage.cpp8
-rw-r--r--src/webengine/webpage.h8
-rw-r--r--src/webengine/webview.cpp3
3 files changed, 18 insertions, 1 deletions
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);