diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index b9bfe66a6..0853df301 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -71,6 +71,8 @@ Removed ~~~~~~~ - `:tab-detach` which has been deprecated in v1.1.0 has been removed. +- The `content.developer_extras` setting got removed. On QtWebKit, developer + extras are now automatically enabled when opening the inspector. v1.3.3 (unreleased) ------------------- diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index 67089aa0a..92bdbf26b 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -115,7 +115,6 @@ |<>|Which cookies to accept. |<>|Store cookies. |<>|Default encoding to use for websites. -|<>|Enable extra tools for Web developers. |<>|Try to pre-fetch DNS entries to speed up browsing. |<>|Expand each subframe to its contents. |<>|Allow websites to request geolocations. @@ -1537,17 +1536,6 @@ Type: <> Default: +pass:[iso-8859-1]+ -[[content.developer_extras]] -=== content.developer_extras -Enable extra tools for Web developers. -This needs to be enabled for `:inspector` to work and also adds an _Inspect_ entry to the context menu. For QtWebEngine, see `--enable-webengine-inspector` in `qutebrowser --help` instead. - -Type: <> - -Default: +pass:[false]+ - -This setting is only available with the QtWebKit backend. - [[content.dns_prefetch]] === content.dns_prefetch Try to pre-fetch DNS entries to speed up browsing. diff --git a/qutebrowser/browser/webkit/webkitinspector.py b/qutebrowser/browser/webkit/webkitinspector.py index 9872243d5..35e4ba36b 100644 --- a/qutebrowser/browser/webkit/webkitinspector.py +++ b/qutebrowser/browser/webkit/webkitinspector.py @@ -19,7 +19,7 @@ """Customized QWebInspector for QtWebKit.""" - +from PyQt5.QtWebKit import QWebSettings from PyQt5.QtWebKitWidgets import QWebInspector from qutebrowser.browser import inspector @@ -36,8 +36,6 @@ class WebKitInspector(inspector.AbstractWebInspector): self._set_widget(qwebinspector) def inspect(self, page): - if not config.val.content.developer_extras: - raise inspector.WebInspectorError( - "Please enable content.developer_extras before using the " - "webinspector!") + settings = QWebSettings.globalSettings() + settings.setAttribute(QWebSettings.DeveloperExtrasEnabled, True) self._widget.setPage(page) diff --git a/qutebrowser/browser/webkit/webkitsettings.py b/qutebrowser/browser/webkit/webkitsettings.py index 9b120e514..5a6484fcd 100644 --- a/qutebrowser/browser/webkit/webkitsettings.py +++ b/qutebrowser/browser/webkit/webkitsettings.py @@ -72,8 +72,6 @@ class WebKitSettings(websettings.AbstractSettings): 'content.local_storage': [QWebSettings.LocalStorageEnabled, QWebSettings.OfflineStorageDatabaseEnabled], - 'content.developer_extras': - [QWebSettings.DeveloperExtrasEnabled], 'content.print_element_backgrounds': [QWebSettings.PrintElementBackgrounds], 'content.xss_auditing': diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index 03b1b1a4e..acb8ce04f 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -295,15 +295,7 @@ content.windowed_fullscreen: Limit fullscreen to the browser window (does not expand to fill the screen). content.developer_extras: - type: Bool - default: false - backend: QtWebKit - desc: >- - Enable extra tools for Web developers. - - This needs to be enabled for `:inspector` to work and also adds an - _Inspect_ entry to the context menu. For QtWebEngine, see - `--enable-webengine-inspector` in `qutebrowser --help` instead. + deleted: true content.dns_prefetch: default: true diff --git a/tests/end2end/features/keyinput.feature b/tests/end2end/features/keyinput.feature index 226891259..b5ab7fcc1 100644 --- a/tests/end2end/features/keyinput.feature +++ b/tests/end2end/features/keyinput.feature @@ -64,7 +64,6 @@ Feature: Keyboard input @no_xvfb @posix @qtwebengine_skip Scenario: :fake-key sending key to the website with other window focused When I open data/keyinput/log.html - And I set content.developer_extras to true And I run :inspector And I wait for "Focus object changed: " in the log And I run :fake-key x diff --git a/tests/end2end/features/misc.feature b/tests/end2end/features/misc.feature index 03aa9fada..31f38b1f9 100644 --- a/tests/end2end/features/misc.feature +++ b/tests/end2end/features/misc.feature @@ -157,12 +157,6 @@ Feature: Various utility commands. # :inspect - @qtwebengine_skip - Scenario: Inspector without developer extras - When I set content.developer_extras to false - And I run :inspector - Then the error "Please enable content.developer_extras before using the webinspector!" should be shown - @qtwebkit_skip @qt<5.11 Scenario: Inspector without --enable-webengine-inspector When I run :inspector @@ -170,24 +164,15 @@ Feature: Various utility commands. @no_xvfb @posix @qtwebengine_skip Scenario: Inspector smoke test - When I set content.developer_extras to true And I run :inspector And I wait for "Focus object changed: " in the log And I run :inspector And I wait for "Focus object changed: *" in the log Then no crash should happen - # Different code path as an inspector got created now - @qtwebengine_skip - Scenario: Inspector without developer extras (after smoke) - When I set content.developer_extras to false - And I run :inspector - Then the error "Please enable content.developer_extras before using the webinspector!" should be shown - # Different code path as an inspector got created now @no_xvfb @posix @qtwebengine_skip Scenario: Inspector smoke test 2 - When I set content.developer_extras to true And I run :inspector And I wait for "Focus object changed: " in the log And I run :inspector