mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -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,
|
QApplication, QHBoxLayout, QIcon, QLabel, QProgressBar, QPushButton, QSize, QUrl,
|
||||||
QVBoxLayout, QWidget, pyqtSignal
|
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 import random_user_agent, url_slash_cleaner
|
||||||
from calibre.constants import STORE_DIALOG_APP_UID, cache_dir, islinux, iswindows
|
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)
|
download_item = self.download_data.pop(download_id)
|
||||||
path = download_item.path()
|
path = download_item.path()
|
||||||
fname = os.path.basename(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'), _(
|
error_dialog(self, _('Download failed'), _(
|
||||||
'Download of {0} failed with error: {1}').format(fname, download_item.interruptReasonString()), show=True)
|
'Download of {0} failed with error: {1}').format(fname, download_item.interruptReasonString()), show=True)
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user