summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKirill Burtsev <kirill.burtsev@qt.io>2021-06-03 16:25:29 +0200
committerKirill Burtsev <kirill.burtsev@qt.io>2021-06-04 18:41:49 +0200
commitb3909c2d860a53e85eea51e77ee40ed8adf60842 (patch)
tree2996cf4b35427d15ea185204109efbbd856f98ae
parent742b9db0e34c8fc08e9f50c3053aed5f501f08d2 (diff)
WebEngineView: rename navigationHistory to history
Match widgets API name for the same QWebEngineHistory class [ChangeLog][QWebEngineQuick][WebEngineView] 'navigationHistory' property is now just 'history' Change-Id: I78507929baa84c8be08f79050568d04868171b3f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--examples/webengine/quicknanobrowser/BrowserWindow.qml2
-rw-r--r--src/webenginequick/api/qquickwebengineview.cpp2
-rw-r--r--src/webenginequick/api/qquickwebengineview_p.h4
-rw-r--r--src/webenginequick/doc/src/navigation_history.qdoc6
-rw-r--r--src/webenginequick/doc/src/webengineview_lgpl.qdoc4
-rw-r--r--src/webenginequick/plugin/plugins.qmltypes2
-rw-r--r--tests/auto/quick/publicapi/tst_publicapi.cpp2
-rw-r--r--tests/auto/quick/qmltests/data/tst_navigationHistory.qml10
-rw-r--r--tests/quicktestbrowser/BrowserWindow.qml4
9 files changed, 18 insertions, 18 deletions
diff --git a/examples/webengine/quicknanobrowser/BrowserWindow.qml b/examples/webengine/quicknanobrowser/BrowserWindow.qml
index 2fa4019c1..e5557ec42 100644
--- a/examples/webengine/quicknanobrowser/BrowserWindow.qml
+++ b/examples/webengine/quicknanobrowser/BrowserWindow.qml
@@ -224,7 +224,7 @@ ApplicationWindow {
id: historyMenu
Instantiator {
- model: currentWebView && currentWebView.navigationHistory.items
+ model: currentWebView && currentWebView.history.items
MenuItem {
text: model.title
onTriggered: currentWebView.goBackOrForward(model.offset)
diff --git a/src/webenginequick/api/qquickwebengineview.cpp b/src/webenginequick/api/qquickwebengineview.cpp
index 1d65ad3ac..b80bead98 100644
--- a/src/webenginequick/api/qquickwebengineview.cpp
+++ b/src/webenginequick/api/qquickwebengineview.cpp
@@ -1523,7 +1523,7 @@ void QQuickWebEngineView::findText(const QString &subString, FindFlags options,
d->adapter->findTextHelper()->startFinding(subString, options & FindCaseSensitively, options & FindBackward, callback);
}
-QWebEngineHistory *QQuickWebEngineView::navigationHistory() const
+QWebEngineHistory *QQuickWebEngineView::history() const
{
Q_D(const QQuickWebEngineView);
return d->m_history.data();
diff --git a/src/webenginequick/api/qquickwebengineview_p.h b/src/webenginequick/api/qquickwebengineview_p.h
index 74fe13c25..bf8b0d5e0 100644
--- a/src/webenginequick/api/qquickwebengineview_p.h
+++ b/src/webenginequick/api/qquickwebengineview_p.h
@@ -106,7 +106,7 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem {
Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor NOTIFY zoomFactorChanged REVISION(1,1) FINAL)
Q_PROPERTY(QQuickWebEngineProfile *profile READ profile WRITE setProfile NOTIFY profileChanged FINAL REVISION(1,1))
Q_PROPERTY(QQuickWebEngineSettings *settings READ settings REVISION(1,1) CONSTANT FINAL)
- Q_PROPERTY(QWebEngineHistory *navigationHistory READ navigationHistory CONSTANT FINAL REVISION(1,1))
+ Q_PROPERTY(QWebEngineHistory *history READ history CONSTANT FINAL REVISION(1,1))
#if QT_CONFIG(webengine_webchannel)
Q_PROPERTY(QQmlWebChannel *webChannel READ webChannel WRITE setWebChannel NOTIFY webChannelChanged REVISION(1,1) FINAL)
#endif
@@ -443,7 +443,7 @@ public:
QQuickWebEngineSettings *settings();
QQmlWebChannel *webChannel();
void setWebChannel(QQmlWebChannel *);
- QWebEngineHistory *navigationHistory() const;
+ QWebEngineHistory *history() const;
uint webChannelWorld() const;
void setWebChannelWorld(uint);
Q_REVISION(1,8) Q_INVOKABLE QQuickWebEngineAction *action(WebAction action);
diff --git a/src/webenginequick/doc/src/navigation_history.qdoc b/src/webenginequick/doc/src/navigation_history.qdoc
index cdee9ffa0..f24668422 100644
--- a/src/webenginequick/doc/src/navigation_history.qdoc
+++ b/src/webenginequick/doc/src/navigation_history.qdoc
@@ -41,7 +41,7 @@
was visited before the current page.
This type is uncreatable, but it can be accessed by using the
- \l{WebEngineView::navigationHistory}{WebEngineView.navigationHistory} property.
+ \l{WebEngineView::history}{WebEngineView.history} property.
\sa WebEngineHistory
*/
@@ -55,7 +55,7 @@
\brief Provides data models that represent the history of a web engine page.
The WebEngineHistory type can be accessed by using the
- \l{WebEngineView::navigationHistory}{WebEngineView.navigationHistory} property.
+ \l{WebEngineView::history}{WebEngineView.history} property.
The WebEngineHistory type provides the following WebEngineHistoryModel data model objects:
@@ -74,7 +74,7 @@
ListView {
id: historyItemsList
anchors.fill: parent
- model: webEngineView.navigationHistory.items
+ model: webEngineView.history.items
delegate:
Text {
color: "black"
diff --git a/src/webenginequick/doc/src/webengineview_lgpl.qdoc b/src/webenginequick/doc/src/webengineview_lgpl.qdoc
index 04bf71550..29a71f979 100644
--- a/src/webenginequick/doc/src/webengineview_lgpl.qdoc
+++ b/src/webenginequick/doc/src/webengineview_lgpl.qdoc
@@ -52,7 +52,7 @@
method is always used to load URLs.
The history is represented by a WebEngineHistory data model that is held by
- the \l navigationHistory property.
+ the \l history property.
The following sample QML application loads a web page using the \c url property:
@@ -286,7 +286,7 @@
*/
/*!
- \qmlproperty WebEngineHistory WebEngineView::navigationHistory
+ \qmlproperty WebEngineHistory WebEngineView::history
\since QtWebEngine 1.1
\readonly
diff --git a/src/webenginequick/plugin/plugins.qmltypes b/src/webenginequick/plugin/plugins.qmltypes
index 7e0652c09..541976d34 100644
--- a/src/webenginequick/plugin/plugins.qmltypes
+++ b/src/webenginequick/plugin/plugins.qmltypes
@@ -1322,7 +1322,7 @@ Module {
isPointer: true
}
Property {
- name: "navigationHistory"
+ name: "history"
revision: 1
type: "QWebEngineHistory"
isReadonly: true
diff --git a/tests/auto/quick/publicapi/tst_publicapi.cpp b/tests/auto/quick/publicapi/tst_publicapi.cpp
index 4ea079b63..773ab12d1 100644
--- a/tests/auto/quick/publicapi/tst_publicapi.cpp
+++ b/tests/auto/quick/publicapi/tst_publicapi.cpp
@@ -704,6 +704,7 @@ static const QStringList expectedAPI = QStringList()
<< "QQuickWebEngineView.goBackOrForward(int) --> void"
<< "QQuickWebEngineView.goForward() --> void"
<< "QQuickWebEngineView.grantFeaturePermission(QUrl,Feature,bool) --> void"
+ << "QQuickWebEngineView.history --> QWebEngineHistory*"
<< "QQuickWebEngineView.icon --> QUrl"
<< "QQuickWebEngineView.iconChanged() --> void"
<< "QQuickWebEngineView.inspectedView --> QQuickWebEngineView*"
@@ -721,7 +722,6 @@ static const QStringList expectedAPI = QStringList()
<< "QQuickWebEngineView.loadProgressChanged() --> void"
<< "QQuickWebEngineView.loading --> bool"
<< "QQuickWebEngineView.loadingChanged(QWebEngineLoadRequest) --> void"
- << "QQuickWebEngineView.navigationHistory --> QWebEngineHistory*"
<< "QQuickWebEngineView.navigationRequested(QWebEngineNavigationRequest*) --> void"
<< "QQuickWebEngineView.newViewRequested(QWebEngineNewWindowRequest*) --> void"
<< "QQuickWebEngineView.pdfPrintingFinished(QString,bool) --> void"
diff --git a/tests/auto/quick/qmltests/data/tst_navigationHistory.qml b/tests/auto/quick/qmltests/data/tst_navigationHistory.qml
index 26f1fade4..d5073bef1 100644
--- a/tests/auto/quick/qmltests/data/tst_navigationHistory.qml
+++ b/tests/auto/quick/qmltests/data/tst_navigationHistory.qml
@@ -38,7 +38,7 @@ TestWebEngineView {
ListView {
id: backItemsList
anchors.fill: parent
- model: webEngineView.navigationHistory.backItems
+ model: webEngineView.history.backItems
currentIndex: count - 1
delegate:
Text {
@@ -50,7 +50,7 @@ TestWebEngineView {
ListView {
id: forwardItemsList
anchors.fill: parent
- model: webEngineView.navigationHistory.forwardItems
+ model: webEngineView.history.forwardItems
currentIndex: 0
delegate:
Text {
@@ -75,7 +75,7 @@ TestWebEngineView {
name: "NavigationHistory"
function test_navigationHistory() {
- webEngineView.navigationHistory.clear()
+ webEngineView.history.clear()
webEngineView.url = Qt.resolvedUrl("test1.html")
verify(webEngineView.waitForLoadSucceeded())
@@ -147,7 +147,7 @@ TestWebEngineView {
compare(backItemsList.currentItem.text, Qt.resolvedUrl("test1.html"))
compare(forwardItemsList.currentItem.text, Qt.resolvedUrl("javascript.html"))
- webEngineView.navigationHistory.clear()
+ webEngineView.history.clear()
compare(webEngineView.url, Qt.resolvedUrl("test2.html"))
compare(webEngineView.canGoBack, false)
compare(webEngineView.canGoForward, false)
@@ -156,7 +156,7 @@ TestWebEngineView {
}
function test_navigationButtons() {
- webEngineView.navigationHistory.clear()
+ webEngineView.history.clear()
const url1 = Qt.resolvedUrl("test1.html")
webEngineView.url = url1
diff --git a/tests/quicktestbrowser/BrowserWindow.qml b/tests/quicktestbrowser/BrowserWindow.qml
index 6c3c160ac..2c4972366 100644
--- a/tests/quicktestbrowser/BrowserWindow.qml
+++ b/tests/quicktestbrowser/BrowserWindow.qml
@@ -142,7 +142,7 @@ ApplicationWindow {
id: backHistoryMenu
Instantiator {
- model: currentWebView && currentWebView.navigationHistory.backItems
+ model: currentWebView && currentWebView.history.backItems
MenuItem {
text: model.title
onTriggered: currentWebView.goBackOrForward(model.offset)
@@ -157,7 +157,7 @@ ApplicationWindow {
id: forwardHistoryMenu
Instantiator {
- model: currentWebView && currentWebView.navigationHistory.forwardItems
+ model: currentWebView && currentWebView.history.forwardItems
MenuItem {
text: model.title
onTriggered: currentWebView.goBackOrForward(model.offset)