Merge storage -> offline-storage-database into local-storage setting
Looks like it's the same with QtWebEngine too - setting LocalStorageEnabled also toggles WebSQL there.
This commit is contained in:
parent
626d299a0d
commit
c696723650
@ -96,6 +96,7 @@ Changed
|
||||
- `storage -> offline-web-application-cache-quota` (defaults to no quota)
|
||||
- `storage -> object-cache-capacities` (default depends on disk space)
|
||||
- `content -> css-regions` (now always turned off)
|
||||
- `storage -> offline-storage-database` (merged into `storage -> local-storage`)
|
||||
|
||||
|
||||
Fixed
|
||||
|
@ -145,9 +145,8 @@
|
||||
|<<storage-prompt-download-directory,prompt-download-directory>>|Whether to prompt the user for the download location.
|
||||
|<<storage-remember-download-directory,remember-download-directory>>|Whether to remember the last used download directory.
|
||||
|<<storage-maximum-pages-in-cache,maximum-pages-in-cache>>|The maximum number of pages to hold in the global memory page cache.
|
||||
|<<storage-offline-storage-database,offline-storage-database>>|Whether support for the HTML 5 offline storage feature is enabled.
|
||||
|<<storage-offline-web-application-storage,offline-web-application-storage>>|Whether support for the HTML 5 web application cache feature is enabled.
|
||||
|<<storage-local-storage,local-storage>>|Whether support for the HTML 5 local storage feature is enabled.
|
||||
|<<storage-local-storage,local-storage>>|Whether support for HTML 5 local storage and Web SQL is enabled.
|
||||
|<<storage-cache-size,cache-size>>|Size of the HTTP network cache. Empty to use the default value.
|
||||
|==============
|
||||
|
||||
@ -1320,19 +1319,6 @@ Default: +pass:[0]+
|
||||
|
||||
This setting is only available with the QtWebKit backend.
|
||||
|
||||
[[storage-offline-storage-database]]
|
||||
=== offline-storage-database
|
||||
Whether support for the HTML 5 offline storage feature is enabled.
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
This setting is only available with the QtWebKit backend.
|
||||
|
||||
[[storage-offline-web-application-storage]]
|
||||
=== offline-web-application-storage
|
||||
Whether support for the HTML 5 web application cache feature is enabled.
|
||||
@ -1352,7 +1338,7 @@ This setting is only available with the QtWebKit backend.
|
||||
|
||||
[[storage-local-storage]]
|
||||
=== local-storage
|
||||
Whether support for the HTML 5 local storage feature is enabled.
|
||||
Whether support for HTML 5 local storage and Web SQL is enabled.
|
||||
|
||||
Valid values:
|
||||
|
||||
|
@ -228,12 +228,11 @@ MAPPINGS = {
|
||||
# Attribute(QWebSettings.TiledBackingStoreEnabled),
|
||||
},
|
||||
'storage': {
|
||||
'offline-storage-database':
|
||||
Attribute(QWebSettings.OfflineStorageDatabaseEnabled),
|
||||
'offline-web-application-storage':
|
||||
Attribute(QWebSettings.OfflineWebApplicationCacheEnabled),
|
||||
'local-storage':
|
||||
Attribute(QWebSettings.LocalStorageEnabled),
|
||||
Attribute(QWebSettings.LocalStorageEnabled,
|
||||
QWebSettings.OfflineStorageDatabaseEnabled),
|
||||
'maximum-pages-in-cache':
|
||||
StaticSetter(QWebSettings.setMaximumPagesInCache),
|
||||
},
|
||||
|
@ -409,6 +409,7 @@ class ConfigManager(QObject):
|
||||
('hints', 'opacity'),
|
||||
('completion', 'auto-open'),
|
||||
('storage', 'object-cache-capacities'),
|
||||
('storage', 'offline-storage-database'),
|
||||
('storage', 'offline-storage-default-quota'),
|
||||
('storage', 'offline-web-application-cache-quota'),
|
||||
('content', 'css-regions'),
|
||||
|
@ -767,12 +767,6 @@ def data(readonly=False):
|
||||
"For more information about the feature, please refer to: "
|
||||
"http://webkit.org/blog/427/webkit-page-cache-i-the-basics/"),
|
||||
|
||||
('offline-storage-database',
|
||||
SettingValue(typ.Bool(), 'true',
|
||||
backends=[usertypes.Backend.QtWebKit]),
|
||||
"Whether support for the HTML 5 offline storage feature is "
|
||||
"enabled."),
|
||||
|
||||
('offline-web-application-storage',
|
||||
SettingValue(typ.Bool(), 'true',
|
||||
backends=[usertypes.Backend.QtWebKit]),
|
||||
@ -787,7 +781,7 @@ def data(readonly=False):
|
||||
|
||||
('local-storage',
|
||||
SettingValue(typ.Bool(), 'true'),
|
||||
"Whether support for the HTML 5 local storage feature is "
|
||||
"Whether support for HTML 5 local storage and Web SQL is "
|
||||
"enabled."),
|
||||
|
||||
('cache-size',
|
||||
|
@ -99,23 +99,24 @@ class Attribute(Base):
|
||||
"""A setting set via QWeb(Engine)Settings::setAttribute.
|
||||
|
||||
Attributes:
|
||||
self._attribute: A QWeb(Engine)Settings::WebAttribute instance.
|
||||
self._attributes: A list of QWeb(Engine)Settings::WebAttribute members.
|
||||
"""
|
||||
|
||||
ENUM_BASE = None
|
||||
|
||||
def __init__(self, attribute, default=UNSET):
|
||||
def __init__(self, *attributes, default=UNSET):
|
||||
super().__init__(default=default)
|
||||
self._attribute = attribute
|
||||
self._attributes = list(attributes)
|
||||
|
||||
def __repr__(self):
|
||||
return utils.get_repr(
|
||||
self, attribute=debug.qenum_key(self.ENUM_BASE, self._attribute),
|
||||
constructor=True)
|
||||
self, attributes=[debug.qenum_key(self.ENUM_BASE, attr)
|
||||
for attr in self._attributes], constructor=True)
|
||||
|
||||
def _set(self, value, settings=None):
|
||||
for obj in self._get_settings(settings):
|
||||
obj.setAttribute(self._attribute, value)
|
||||
for attribute in self._attributes:
|
||||
obj.setAttribute(attribute, value)
|
||||
|
||||
|
||||
class Setter(Base):
|
||||
|
Loading…
Reference in New Issue
Block a user