parent
1581db2d59
commit
3e2ba32240
@ -34,6 +34,7 @@ Fixed
|
||||
|
||||
- Added a workaround for a black screen with QtWebEngine with some setups
|
||||
(requires PyOpenGL to be installed)
|
||||
- Fixed crash when trying to retry downloads with QtWebEngine
|
||||
|
||||
v0.10.1
|
||||
-------
|
||||
|
@ -507,6 +507,14 @@ class AbstractDownloadItem(QObject):
|
||||
"""Retry a failed download."""
|
||||
raise NotImplementedError
|
||||
|
||||
@pyqtSlot()
|
||||
def try_retry(self):
|
||||
"""Try to retry a download and show an error if it's unsupported."""
|
||||
try:
|
||||
self.retry()
|
||||
except UnsupportedOperationError as e:
|
||||
message.error(str(e))
|
||||
|
||||
def _get_open_filename(self):
|
||||
"""Get the filename to open a download.
|
||||
|
||||
@ -968,7 +976,7 @@ class DownloadModel(QAbstractListModel):
|
||||
raise cmdexc.CommandError("No failed downloads!")
|
||||
else:
|
||||
download = to_retry[0]
|
||||
download.retry()
|
||||
download.try_retry()
|
||||
|
||||
def can_clear(self):
|
||||
"""Check if there are finished downloads to clear."""
|
||||
|
@ -134,7 +134,7 @@ class DownloadView(QListView):
|
||||
if item.successful:
|
||||
actions.append(("Open", item.open_file))
|
||||
else:
|
||||
actions.append(("Retry", item.retry))
|
||||
actions.append(("Retry", item.try_retry))
|
||||
actions.append(("Remove", item.remove))
|
||||
else:
|
||||
actions.append(("Cancel", item.cancel))
|
||||
|
@ -95,7 +95,8 @@ class DownloadItem(downloads.AbstractDownloadItem):
|
||||
|
||||
def retry(self):
|
||||
# https://bugreports.qt.io/browse/QTBUG-56840
|
||||
raise downloads.UnsupportedOperationError
|
||||
raise downloads.UnsupportedOperationError(
|
||||
"Retrying downloads is unsupported with QtWebEngine")
|
||||
|
||||
def _get_open_filename(self):
|
||||
return self._filename
|
||||
|
@ -137,6 +137,14 @@ Feature: Downloading things from a website.
|
||||
does-not-exist
|
||||
does-not-exist
|
||||
|
||||
@qtwebkit_skip
|
||||
Scenario: Retrying a failed download with QtWebEngine
|
||||
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
|
||||
|
||||
Scenario: Retrying with count
|
||||
When I run :download http://localhost:(port)/data/downloads/download.bin
|
||||
And I run :download http://localhost:(port)/does-not-exist
|
||||
|
Loading…
Reference in New Issue
Block a user