summaryrefslogtreecommitdiffstats
path: root/src/webengine/api/qquickwebengineview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine/api/qquickwebengineview.cpp')
-rw-r--r--src/webengine/api/qquickwebengineview.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index f9a47a61..ac19de15 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -260,13 +260,20 @@ qreal QQuickWebEngineViewPrivate::dpiScale() const
void QQuickWebEngineViewPrivate::loadStarted(const QUrl &provisionalUrl)
{
Q_Q(QQuickWebEngineView);
+ m_history->reset();
QQuickWebEngineLoadRequest loadRequest(provisionalUrl, QQuickWebEngineView::LoadStartedStatus);
Q_EMIT q->loadingChanged(&loadRequest);
}
+void QQuickWebEngineViewPrivate::loadCommitted()
+{
+ m_history->reset();
+}
+
void QQuickWebEngineViewPrivate::loadFinished(bool success, int error_code, const QString &error_description)
{
Q_Q(QQuickWebEngineView);
+ m_history->reset();
if (error_code == WebEngineError::UserAbortedError) {
QQuickWebEngineLoadRequest loadRequest(q->url(), QQuickWebEngineView::LoadStoppedStatus);
Q_EMIT q->loadingChanged(&loadRequest);
@@ -382,9 +389,6 @@ QQuickWebEngineView::QQuickWebEngineView(QQuickItem *parent)
Q_D(QQuickWebEngineView);
d->e->q_ptr = this;
d->adapter->initialize(d);
-
- QObject::connect(this, &QQuickWebEngineView::loadingChanged, d->m_history.data(), &QQuickWebEngineHistory::reset);
-
this->setFocus(true);
this->setActiveFocusOnTab(true);
this->setFlag(QQuickItem::ItemIsFocusScope);