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