From 2cc9a92ad3796e6ec1e4cdfb3fe68eddc86ad4ac Mon Sep 17 00:00:00 2001
From: Jarred Nicholls <jarred.nicholls@gmail.com>
Date: Thu, 9 Oct 2014 08:25:08 -0400
Subject: [PATCH] Notify canGoBack/canGoForward on urlChanged instead of
 loadingChanged.

In order to support Fragment (#) based routing and history navigation
together, canGoBack/canGoForward properties should be notified when the
url is changed instead of when the page is loading.

Task-number: QTBUG-41849
Change-Id: Ic995fffa5c683dade88fbd98ffea90527a77261b
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Reviewed-by: Jarred Nicholls <jarred.nicholls@gmail.com>
---
 src/webengine/api/qquickwebengineview_p.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h
index 402c2ce65..22713ee22 100644
--- a/src/webengine/api/qquickwebengineview_p.h
+++ b/src/webengine/api/qquickwebengineview_p.h
@@ -54,8 +54,8 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem {
     Q_PROPERTY(bool loading READ isLoading NOTIFY loadingChanged)
     Q_PROPERTY(int loadProgress READ loadProgress NOTIFY loadProgressChanged)
     Q_PROPERTY(QString title READ title NOTIFY titleChanged)
-    Q_PROPERTY(bool canGoBack READ canGoBack NOTIFY loadingChanged)
-    Q_PROPERTY(bool canGoForward READ canGoForward NOTIFY loadingChanged)
+    Q_PROPERTY(bool canGoBack READ canGoBack NOTIFY urlChanged)
+    Q_PROPERTY(bool canGoForward READ canGoForward NOTIFY urlChanged)
     Q_ENUMS(NavigationRequestAction);
     Q_ENUMS(NavigationType);
     Q_ENUMS(LoadStatus);
-- 
GitLab