parent
5fd3943ebc
commit
054b92bbe8
@ -25,6 +25,7 @@ Added
|
||||
- A new `qute://bindings` page, opened by `:bind`, shows all keybindings.
|
||||
- `:session-load` has a new `--delete` flag which deletes the
|
||||
session after loading it.
|
||||
- QtWebEngine: Retrying downloads is now supported with Qt 5.10 or newer.
|
||||
|
||||
Changed
|
||||
~~~~~~~
|
||||
|
@ -96,9 +96,15 @@ class DownloadItem(downloads.AbstractDownloadItem):
|
||||
self._qt_item.cancel()
|
||||
|
||||
def retry(self):
|
||||
# https://bugreports.qt.io/browse/QTBUG-56840
|
||||
raise downloads.UnsupportedOperationError(
|
||||
"Retrying downloads is unsupported with QtWebEngine")
|
||||
state = self._qt_item.state()
|
||||
assert state == QWebEngineDownloadItem.DownloadInterrupted, state
|
||||
|
||||
try:
|
||||
self._qt_item.resume()
|
||||
except AttributeError:
|
||||
raise downloads.UnsupportedOperationError(
|
||||
"Retrying downloads is unsupported with QtWebEngine on "
|
||||
"Qt/PyQt < 5.10")
|
||||
|
||||
def _get_open_filename(self):
|
||||
return self._filename
|
||||
|
@ -193,13 +193,23 @@ Feature: Downloading things from a website.
|
||||
does-not-exist
|
||||
does-not-exist
|
||||
|
||||
@qtwebkit_skip
|
||||
Scenario: Retrying a failed download with QtWebEngine
|
||||
@qtwebkit_skip @qt<5.10
|
||||
Scenario: Retrying a failed download with QtWebEngine (Qt < 5.10)
|
||||
When I open data/downloads/issue2298.html
|
||||
And I run :click-element id download
|
||||
And I wait for "Download error: *" in the log
|
||||
And I run :download-retry
|
||||
Then the error "Retrying downloads is unsupported with QtWebEngine" should be shown
|
||||
Then the error "Retrying downloads is unsupported *" should be shown
|
||||
|
||||
@qtwebkit_skip @qt>=5.10
|
||||
Scenario: Retrying a failed download with QtWebEngine (Qt >= 5.10)
|
||||
When I open data/downloads/issue2298.html
|
||||
And I run :click-element id download
|
||||
And I wait for "Download error: *" in the log
|
||||
And I run :download-retry
|
||||
# For some reason it doesn't actually try again here, but let's hope it
|
||||
# works e.g. on a connection loss, which we can't test automatically.
|
||||
Then "Retrying downloads is unsupported *" should not be logged
|
||||
|
||||
Scenario: Retrying with count
|
||||
When I run :download http://localhost:(port)/data/downloads/download.bin
|
||||
|
Loading…
Reference in New Issue
Block a user