diff --git a/bypy/init_env.py b/bypy/init_env.py index 34d7665759..4205c855f1 100644 --- a/bypy/init_env.py +++ b/bypy/init_env.py @@ -96,9 +96,6 @@ PYQT_MODULES = ( ) del dlls -if iswindows: - PYQT_MODULES += ('QtWinExtras',) - def read_cal_file(name): with open(os.path.join(CALIBRE_DIR, 'src', 'calibre', name), 'rb') as f: diff --git a/bypy/sources.json b/bypy/sources.json index d16da8ad9a..6103e60ed9 100644 --- a/bypy/sources.json +++ b/bypy/sources.json @@ -499,14 +499,6 @@ } }, - { - "name": "qt-winextras", - "os": "windows", - "hashes": { - "unix": "sha256:65b8272005dec00791ab7d81ab266d1e3313a3bbd8e54e546d984cf4c4ab550e" - } - }, - { "name": "qt-webengine", diff --git a/src/calibre/test_build.py b/src/calibre/test_build.py index 20a2262e1c..18b0c60a49 100644 --- a/src/calibre/test_build.py +++ b/src/calibre/test_build.py @@ -324,9 +324,6 @@ class BuildTest(unittest.TestCase): create_cover('xxx', ['yyy']) na = QNetworkAccessManager() self.assertTrue(hasattr(na, 'sslErrors'), 'Qt not compiled with openssl') - if iswindows: - from qt.core import QtWin - QtWin p = QWebEnginePage() def callback(result): diff --git a/src/calibre/utils/open_with/windows.py b/src/calibre/utils/open_with/windows.py index 01691c90d9..df3375c24e 100644 --- a/src/calibre/utils/open_with/windows.py +++ b/src/calibre/utils/open_with/windows.py @@ -6,7 +6,7 @@ __copyright__ = '2015, Kovid Goyal ' import re import sys -from qt.core import QBuffer, QByteArray, QPixmap, Qt, QtWin, QIODevice +from qt.core import QBuffer, QByteArray, QImage, QIODevice, QPixmap, Qt from calibre.gui2 import must_use_qt from calibre.utils.winreg.default_programs import split_commandline @@ -16,7 +16,7 @@ ICON_SIZE = 256 def hicon_to_pixmap(hicon): - return QtWin.fromHICON(int(hicon)) + QPixmap.fromImage(QImage.fromHICON(int(hicon))) def pixmap_to_data(pixmap): diff --git a/src/qt/__main__.py b/src/qt/__main__.py index b1f5f3ab38..feeb55061b 100644 --- a/src/qt/__main__.py +++ b/src/qt/__main__.py @@ -44,7 +44,6 @@ def scan(name): module_names += ('sip',) mod = importlib.import_module(f'{QT_WRAPPER}.sip') name_map['sip'] = mod.__name__ - name_map['QtWin'] = f'{QT_WRAPPER}.QtWinExtras' with open(f'{base}/{name}_name_map.py', 'w') as f: print('# autogenerated by __main__.py do not edit', file=f) print('name_map =', end=' ', file=f) diff --git a/src/qt/core_name_map.py b/src/qt/core_name_map.py index dd0bda36be..e67d941c75 100644 --- a/src/qt/core_name_map.py +++ b/src/qt/core_name_map.py @@ -579,7 +579,6 @@ name_map = {'PYQT_VERSION': 'PyQt6.QtCore', 'QtPrintSupport': 'PyQt6.QtPrintSupport', 'QtSvg': 'PyQt6.QtSvg', 'QtWidgets': 'PyQt6.QtWidgets', - 'QtWin': 'PyQt6.QtWinExtras', 'pyqtBoundSignal': 'PyQt6.QtCore', 'pyqtClassInfo': 'PyQt6.QtCore', 'pyqtEnum': 'PyQt6.QtCore',