diff options
author | Adam Kallai <kadam@inf.u-szeged.hu> | 2014-02-24 09:17:39 -0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-25 15:08:38 +0100 |
commit | e40ebfe6e8fb543e68f3527b9256b60a485106cd (patch) | |
tree | 94ac715c04dc20f390910b756a4fa267d6b224da /src | |
parent | e7793c99669f635ea4dab6d025a4db7a45bf718e (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>
Diffstat (limited to 'src')
-rw-r--r-- | src/webengine/api/qquickwebengineloadrequest.cpp | 6 | ||||
-rw-r--r-- | src/webengine/api/qquickwebengineview.cpp | 10 | ||||
-rw-r--r-- | src/webengine/api/qquickwebengineview_p.h | 8 |
3 files changed, 12 insertions, 12 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); |