Update min/max values for lifecycle settings
It doesn't make sense to allow setting these to negative values, so lets help the user out by refusing to do so if they try. But leave `-1` as an allowed value for the "discard" option so users can have "freeze" enabled but turn the discard state off. Remove the mention of -1 from the freeze setting since we don't allow that anymore.
This commit is contained in:
parent
fec97696ae
commit
734b30f7d1
|
|
@ -369,17 +369,21 @@ qt.chromium.use_recommended_page_lifecycle_state:
|
|||
# yamllint enable rule:line-length
|
||||
|
||||
qt.chromium.lifecycle_state_freeze_delay:
|
||||
type: Int
|
||||
type:
|
||||
name: Int
|
||||
minval: 0
|
||||
maxval: maxint
|
||||
default: 0
|
||||
backend: QtWebEngine
|
||||
desc: >-
|
||||
The amount of time (in milliseconds) to wait before transitioning a page to
|
||||
the frozen lifecycle state.
|
||||
|
||||
Set to -1 to disable this state (will also disable the discard state).
|
||||
|
||||
qt.chromium.lifecycle_state_discard_delay:
|
||||
type: Int
|
||||
type:
|
||||
name: Int
|
||||
minval: -1
|
||||
maxval: maxint
|
||||
default: 0
|
||||
backend: QtWebEngine
|
||||
desc: >-
|
||||
|
|
|
|||
|
|
@ -352,9 +352,9 @@ class TestPageLifecycle:
|
|||
"""For negative delay values, the timer shouldn't be scheduled."""
|
||||
self.set_config(
|
||||
config_stub,
|
||||
freeze_delay=-1,
|
||||
discard_delay=-1,
|
||||
)
|
||||
webengine_tab._on_recommended_state_changed(QWebEnginePage.LifecycleState.Frozen)
|
||||
webengine_tab._on_recommended_state_changed(QWebEnginePage.LifecycleState.Discarded)
|
||||
assert not webengine_tab._lifecycle_timer.isActive()
|
||||
|
||||
def test_pinned_tabs_untouched(
|
||||
|
|
|
|||
Loading…
Reference in New Issue