diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-11-17 16:52:33 +0100 |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2015-01-22 16:22:12 +0100 |
commit | 35630628d927d95bd5b7a8720e982294e7281b15 (patch) | |
tree | dd39f51154b5448140da3a455731a13779f9d7d6 /src/webengine | |
parent | 9d9268ae1ce34a853b48d3b7189dba6448c38033 (diff) |
Replace the inspectable property with an environment variable
The current implementation would enable or disable the inspector
globally when the inspectable property was set on a WebEngineView,
overwriting the value previously set by other pages.
Instead of havind default port for the debugging server and having
to enable debugging on individual pages, use an environment variable,
QTWEBENGINE_REMOTE_DEBUGGING, to enable the debugging server for the
whole application at the same time as specifying the port. The format
is the same as for QTWEBKIT_INSPECTOR_SERVER in QtWebKit.
QTWEBENGINE_REMOTE_DEBUGGING is set by default in quicktestbrowser
to ease development.
This also keeps the input reading from the --remote-debugging-port
command line switch for convenience, but its usage should be
considered internal.
This patch also take the opportunity to remove the unused
DevToolsHttpHandlerDelegateQt::m_browserContext and to move the
ownership from ContentBrowserClientQt to WebEngineContext since
the list of inspectable pages isn't bound to the BrowserContext
anyway.
Change-Id: I772687f88f4feee0cc14dd182b0129cc0ea384dd
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
Diffstat (limited to 'src/webengine')
-rw-r--r-- | src/webengine/api/qquickwebengineview.cpp | 17 | ||||
-rw-r--r-- | src/webengine/api/qquickwebengineview_p_p.h | 4 |
2 files changed, 0 insertions, 21 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp index 1b95f86b4..92807380f 100644 --- a/src/webengine/api/qquickwebengineview.cpp +++ b/src/webengine/api/qquickwebengineview.cpp @@ -84,7 +84,6 @@ QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate() , m_settings(new QQuickWebEngineSettings) , contextMenuExtraItems(0) , loadProgress(0) - , inspectable(false) , m_isFullScreen(false) , isLoading(false) , devicePixelRatio(QGuiApplication::primaryScreen()->devicePixelRatio()) @@ -534,7 +533,6 @@ void QQuickWebEngineViewPrivate::ensureContentsAdapter() if (!adapter) { adapter = new WebContentsAdapter(); adapter->initialize(this); - adapter->enableInspector(inspectable); if (explicitUrl.isValid()) adapter->load(explicitUrl); } @@ -724,21 +722,6 @@ qreal QQuickWebEngineView::zoomFactor() const return d->adapter->currentZoomFactor(); } -bool QQuickWebEngineViewExperimental::inspectable() const -{ - Q_D(const QQuickWebEngineView); - return d->inspectable; -} - -void QQuickWebEngineViewExperimental::setInspectable(bool enable) -{ - Q_D(QQuickWebEngineView); - d->inspectable = enable; - if (!d->adapter) - return; - d->adapter->enableInspector(enable); -} - void QQuickWebEngineViewExperimental::setIsFullScreen(bool fullscreen) { d_ptr->m_isFullScreen = fullscreen; diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h index f773b3d28..f97f2a8cf 100644 --- a/src/webengine/api/qquickwebengineview_p_p.h +++ b/src/webengine/api/qquickwebengineview_p_p.h @@ -79,7 +79,6 @@ 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_PROPERTY(QQuickWebEngineSettings *settings READ settings) @@ -100,8 +99,6 @@ public: }; Q_DECLARE_FLAGS(FindFlags, FindFlag) - bool inspectable() const; - void setInspectable(bool); void setIsFullScreen(bool fullscreen); bool isFullScreen() const; QQuickWebEngineViewport *viewport() const; @@ -199,7 +196,6 @@ public: QUrl explicitUrl; QUrl icon; int loadProgress; - bool inspectable; bool m_isFullScreen; bool isLoading; qreal devicePixelRatio; |