summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Kallai <kadam@inf.u-szeged.hu>2014-02-24 09:17:39 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-25 15:08:38 +0100
commite40ebfe6e8fb543e68f3527b9256b60a485106cd (patch)
tree94ac715c04dc20f390910b756a4fa267d6b224da
parente7793c99669f635ea4dab6d025a4db7a45bf718e (diff)
Fixing QQuickWebEngineView.loadingChanged public API test case
Rename QQuickWebEngineView.loadingStateChanged signal name to QQuickWebEngineView.loadingChanged. Change-Id: I0e01034f7b2eea57f5211ff0d8258d9f27d278f0 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
-rw-r--r--src/webengine/api/qquickwebengineloadrequest.cpp6
-rw-r--r--src/webengine/api/qquickwebengineview.cpp10
-rw-r--r--src/webengine/api/qquickwebengineview_p.h8
-rw-r--r--tests/auto/quick/qmltests/data/TestWebEngineView.qml2
-rw-r--r--tests/auto/quick/qmltests/data/tst_loadUrl.qml4
5 files changed, 15 insertions, 15 deletions
diff --git a/src/webengine/api/qquickwebengineloadrequest.cpp b/src/webengine/api/qquickwebengineloadrequest.cpp
index e9e6fab14..227a86710 100644
--- a/src/webengine/api/qquickwebengineloadrequest.cpp
+++ b/src/webengine/api/qquickwebengineloadrequest.cpp
@@ -46,12 +46,12 @@
\instantiates QQuickWebEngineLoadRequest
\inqmlmodule QtWebEngine 1.0
- \brief A utility class for the WebEngineView::loadingStateChanged signal.
+ \brief A utility class for the WebEngineView::loadingChanged signal.
This class contains information about a requested load of a web page, like the URL and
current loading status (started, finished, failed).
- \sa WebEngineView::onLoadingStateChanged
+ \sa WebEngineView::onLoadingChanged
*/
QQuickWebEngineLoadRequest::QQuickWebEngineLoadRequest(const QUrl& url, QQuickWebEngineView::LoadStatus status, const QString& errorString, int errorCode, QQuickWebEngineView::ErrorDomain errorDomain, QObject* parent)
: QObject(parent)
@@ -84,7 +84,7 @@ QUrl QQuickWebEngineLoadRequest::url() const
\endlist
\sa WebEngineLoadRequest
- \sa WebEngineView::onLoadingStateChanged
+ \sa WebEngineView::onLoadingChanged
*/
QQuickWebEngineView::LoadStatus QQuickWebEngineLoadRequest::status() const
{
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 0c6ef7ce7..6522137a8 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -224,7 +224,7 @@ void QQuickWebEngineViewPrivate::loadingStateChanged()
m_isLoading = adapter->isLoading();
if (m_isLoading && !wasLoading) {
QQuickWebEngineLoadRequest loadRequest(q->url(), QQuickWebEngineView::LoadStartedStatus);
- Q_EMIT q->loadingStateChanged(&loadRequest);
+ Q_EMIT q->loadingChanged(&loadRequest);
}
}
@@ -251,12 +251,12 @@ void QQuickWebEngineViewPrivate::loadFinished(bool success, int error_code, cons
Q_Q(QQuickWebEngineView);
if (error_code == WebEngineError::UserAbortedError) {
QQuickWebEngineLoadRequest loadRequest(q->url(), QQuickWebEngineView::LoadStoppedStatus);
- Q_EMIT q->loadingStateChanged(&loadRequest);
+ Q_EMIT q->loadingChanged(&loadRequest);
return;
}
if (success) {
QQuickWebEngineLoadRequest loadRequest(q->url(), QQuickWebEngineView::LoadSucceededStatus);
- Q_EMIT q->loadingStateChanged(&loadRequest);
+ Q_EMIT q->loadingChanged(&loadRequest);
return;
}
@@ -267,7 +267,7 @@ void QQuickWebEngineViewPrivate::loadFinished(bool success, int error_code, cons
error_description,
error_code,
static_cast<QQuickWebEngineView::ErrorDomain>(WebEngineError::toQtErrorDomain(error_code)));
- Q_EMIT q->loadingStateChanged(&loadRequest);
+ Q_EMIT q->loadingChanged(&loadRequest);
return;
}
@@ -354,7 +354,7 @@ void QQuickWebEngineViewPrivate::adoptWebContents(WebContentsAdapter *webContent
// FIXME: The current loading state should be stored in the WebContentAdapter
// and it should be checked here if the signal emission is really necessary.
QQuickWebEngineLoadRequest loadRequest(adapter->activeUrl(), QQuickWebEngineView::LoadSucceededStatus);
- emit q->loadingStateChanged(&loadRequest);
+ emit q->loadingChanged(&loadRequest);
emit q->loadProgressChanged();
}
diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h
index 1d4664bf9..f17f5d11a 100644
--- a/src/webengine/api/qquickwebengineview_p.h
+++ b/src/webengine/api/qquickwebengineview_p.h
@@ -54,11 +54,11 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem {
Q_OBJECT
Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged)
Q_PROPERTY(QUrl icon READ icon NOTIFY iconChanged)
- Q_PROPERTY(bool loading READ isLoading NOTIFY loadingStateChanged)
+ 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 loadingStateChanged)
- Q_PROPERTY(bool canGoForward READ canGoForward NOTIFY loadingStateChanged)
+ Q_PROPERTY(bool canGoBack READ canGoBack NOTIFY loadingChanged)
+ Q_PROPERTY(bool canGoForward READ canGoForward NOTIFY loadingChanged)
Q_PROPERTY(bool inspectable READ inspectable WRITE setInspectable)
Q_ENUMS(LoadStatus);
Q_ENUMS(ErrorDomain);
@@ -112,7 +112,7 @@ Q_SIGNALS:
void titleChanged();
void urlChanged();
void iconChanged();
- void loadingStateChanged(QQuickWebEngineLoadRequest *loadRequest);
+ void loadingChanged(QQuickWebEngineLoadRequest *loadRequest);
void loadProgressChanged();
void javaScriptConsoleMessage(int level, const QString &message, int lineNumber, const QString &sourceID);
diff --git a/tests/auto/quick/qmltests/data/TestWebEngineView.qml b/tests/auto/quick/qmltests/data/TestWebEngineView.qml
index 44a7f4f83..e76780fae 100644
--- a/tests/auto/quick/qmltests/data/TestWebEngineView.qml
+++ b/tests/auto/quick/qmltests/data/TestWebEngineView.qml
@@ -83,7 +83,7 @@ WebEngineView {
TestResult { id: testResult }
- onLoadingStateChanged: {
+ onLoadingChanged: {
loadStatus = loadRequest.status
if (loadRequest.status == WebEngineView.LoadStartedStatus)
viewportReady = false
diff --git a/tests/auto/quick/qmltests/data/tst_loadUrl.qml b/tests/auto/quick/qmltests/data/tst_loadUrl.qml
index b49b5b571..9723052de 100644
--- a/tests/auto/quick/qmltests/data/tst_loadUrl.qml
+++ b/tests/auto/quick/qmltests/data/tst_loadUrl.qml
@@ -59,7 +59,7 @@ TestWebEngineView {
}
}
- onLoadingStateChanged: {
+ onLoadingChanged: {
if (loadRequest.status == WebEngineView.LoadStartedStatus)
++numLoadStarted
if (loadRequest.status == WebEngineView.LoadSucceededStatus)
@@ -104,7 +104,7 @@ TestWebEngineView {
function test_stopStatus() {
var url = Qt.resolvedUrl("test1.html")
- webEngineView.loadingStateChanged.connect(function(loadRequest) {
+ webEngineView.loadingChanged.connect(function(loadRequest) {
if (loadRequest.status == WebEngineView.LoadStoppedStatus) {
compare(webEngineView.url, url)
compare(loadRequest.url, url)