Remove the content.developer_extras setting

This commit is contained in:
Florian Bruhin 2018-06-11 18:08:53 +02:00
parent e5fbb9f68a
commit 263d298449
7 changed files with 6 additions and 44 deletions

View File

@ -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)
-------------------

View File

@ -115,7 +115,6 @@
|<<content.cookies.accept,content.cookies.accept>>|Which cookies to accept.
|<<content.cookies.store,content.cookies.store>>|Store cookies.
|<<content.default_encoding,content.default_encoding>>|Default encoding to use for websites.
|<<content.developer_extras,content.developer_extras>>|Enable extra tools for Web developers.
|<<content.dns_prefetch,content.dns_prefetch>>|Try to pre-fetch DNS entries to speed up browsing.
|<<content.frame_flattening,content.frame_flattening>>|Expand each subframe to its contents.
|<<content.geolocation,content.geolocation>>|Allow websites to request geolocations.
@ -1537,17 +1536,6 @@ Type: <<types,String>>
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: <<types,Bool>>
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.

View File

@ -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)

View File

@ -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':

View File

@ -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

View File

@ -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: <PyQt5.QtWebKitWidgets.QWebView object at *>" in the log
And I run :fake-key x

View File

@ -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: <PyQt5.QtWebKitWidgets.QWebView object at *>" 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: <PyQt5.QtWebKitWidgets.QWebView object at *>" in the log
And I run :inspector