mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-05 09:14:41 +01:00
More stupid PyQt enums
This commit is contained in:
parent
650c7841b4
commit
d72a17d03b
1 changed files with 2 additions and 2 deletions
|
|
@ -10,7 +10,7 @@
|
|||
QApplication, QHBoxLayout, QIcon, QLabel, QProgressBar, QPushButton, QSize, QUrl,
|
||||
QVBoxLayout, QWidget, pyqtSignal
|
||||
)
|
||||
from PyQt5.QtWebEngineWidgets import QWebEngineProfile, QWebEngineView
|
||||
from PyQt5.QtWebEngineWidgets import QWebEngineProfile, QWebEngineView, QWebEngineDownloadItem
|
||||
|
||||
from calibre import random_user_agent, url_slash_cleaner
|
||||
from calibre.constants import STORE_DIALOG_APP_UID, cache_dir, islinux, iswindows
|
||||
|
|
@ -181,7 +181,7 @@ def download_finished(self, download_id):
|
|||
download_item = self.download_data.pop(download_id)
|
||||
path = download_item.path()
|
||||
fname = os.path.basename(path)
|
||||
if download_item.state() == download_item.DownloadInterrupted:
|
||||
if download_item.state() == QWebEngineDownloadItem.DownloadState.DownloadInterrupted:
|
||||
error_dialog(self, _('Download failed'), _(
|
||||
'Download of {0} failed with error: {1}').format(fname, download_item.interruptReasonString()), show=True)
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue