summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-05-09 15:57:24 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-09 16:57:33 +0200
commit17ffa82410b7470fc26fce0e2be2e107635fc0c6 (patch)
tree4ebd42523e487c651c5f8d05bc6eea6842b4c970
parent15ca2336302e21da3e11c8607f6f3ff4e433d09e (diff)
Move the WebEngineView.inspectable property to experimental
The property is still not properly implemented and we'll make it first go through the experimental tryout like other APIs we add. Change-Id: I6eb99fcebb7ca1fc33338d786585cfe7fbc0afd4 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
-rw-r--r--src/webengine/api/qquickwebengineview.cpp24
-rw-r--r--src/webengine/api/qquickwebengineview_p.h3
-rw-r--r--src/webengine/api/qquickwebengineview_p_p.h3
-rw-r--r--tests/auto/quick/publicapi/tst_publicapi.cpp1
4 files changed, 15 insertions, 16 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index fa7243b2..0a5150c3 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -500,29 +500,29 @@ bool QQuickWebEngineView::canGoForward() const
return d->adapter->canGoForward();
}
-bool QQuickWebEngineView::inspectable() const
+void QQuickWebEngineView::forceActiveFocus()
+{
+ Q_FOREACH (QQuickItem *child, childItems()) {
+ if (qobject_cast<RenderWidgetHostViewQtDelegateQuick *>(child)) {
+ child->forceActiveFocus();
+ break;
+ }
+ }
+}
+
+bool QQuickWebEngineViewExperimental::inspectable() const
{
Q_D(const QQuickWebEngineView);
return d->inspectable;
}
-void QQuickWebEngineView::setInspectable(bool enable)
+void QQuickWebEngineViewExperimental::setInspectable(bool enable)
{
Q_D(QQuickWebEngineView);
d->inspectable = enable;
d->adapter->enableInspector(enable);
}
-void QQuickWebEngineView::forceActiveFocus()
-{
- Q_FOREACH (QQuickItem *child, childItems()) {
- if (qobject_cast<RenderWidgetHostViewQtDelegateQuick *>(child)) {
- child->forceActiveFocus();
- break;
- }
- }
-}
-
void QQuickWebEngineViewExperimental::setIsFullScreen(bool fullscreen)
{
d_ptr->m_isFullScreen = fullscreen;
diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h
index 92cf1f53..2956c61a 100644
--- a/src/webengine/api/qquickwebengineview_p.h
+++ b/src/webengine/api/qquickwebengineview_p.h
@@ -59,7 +59,6 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem {
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 inspectable READ inspectable WRITE setInspectable)
Q_ENUMS(LoadStatus);
Q_ENUMS(ErrorDomain);
Q_ENUMS(NewViewDestination);
@@ -77,8 +76,6 @@ public:
QString title() const;
bool canGoBack() const;
bool canGoForward() const;
- bool inspectable() const;
- void setInspectable(bool);
void forceActiveFocus();
enum LoadStatus {
diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h
index c5d32b55..6813b8a0 100644
--- a/src/webengine/api/qquickwebengineview_p_p.h
+++ b/src/webengine/api/qquickwebengineview_p_p.h
@@ -83,6 +83,7 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineViewExperimental : public QObjec
Q_OBJECT
Q_PROPERTY(QQuickWebEngineViewport *viewport READ viewport)
Q_PROPERTY(QQmlComponent *extraContextMenuEntriesComponent READ extraContextMenuEntriesComponent WRITE setExtraContextMenuEntriesComponent NOTIFY extraContextMenuEntriesComponentChanged)
+ Q_PROPERTY(bool inspectable READ inspectable WRITE setInspectable)
Q_PROPERTY(bool isFullScreen READ isFullScreen WRITE setIsFullScreen NOTIFY isFullScreenChanged)
Q_PROPERTY(QQuickWebEngineHistory *navigationHistory READ navigationHistory CONSTANT FINAL)
Q_ENUMS(Feature)
@@ -94,6 +95,8 @@ public:
MediaAudioVideoDevices
};
+ bool inspectable() const;
+ void setInspectable(bool);
void setIsFullScreen(bool fullscreen);
bool isFullScreen() const;
QQuickWebEngineViewport *viewport() const;
diff --git a/tests/auto/quick/publicapi/tst_publicapi.cpp b/tests/auto/quick/publicapi/tst_publicapi.cpp
index bd5abd7a..3edc85ce 100644
--- a/tests/auto/quick/publicapi/tst_publicapi.cpp
+++ b/tests/auto/quick/publicapi/tst_publicapi.cpp
@@ -95,7 +95,6 @@ static QStringList expectedAPI = QStringList()
<< "QQuickWebEngineView.icon --> QUrl"
<< "QQuickWebEngineView.canGoBack --> bool"
<< "QQuickWebEngineView.canGoForward --> bool"
- << "QQuickWebEngineView.inspectable --> bool"
<< "QQuickWebEngineView.loading --> bool"
<< "QQuickWebEngineView.loadProgress --> int"
<< "QQuickWebEngineView.titleChanged() --> void"