mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
More stupid PyQt enums
This commit is contained in:
parent
650c7841b4
commit
d72a17d03b
@ -10,7 +10,7 @@ from PyQt5.Qt import (
|
||||
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 @@ class Main(MainWindow):
|
||||
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…
x
Reference in New Issue
Block a user