More class enums

This commit is contained in:
Kovid Goyal 2021-11-22 10:46:11 +05:30
parent fcfd64728c
commit abe8410fb4
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -8,8 +8,8 @@
from qt.core import (
QAbstractItemView, QAction, QComboBox, QDialog, QDialogButtonBox, QDrag,
QEventLoop, QFrame, QLineEdit, QMenu, QMessageBox, QModelIndex,
QSinglePointEvent, Qt, QThread, QToolButton
QEventLoop, QFrame, QImage, QIODevice, QLineEdit, QMenu, QMessageBox,
QModelIndex, QSinglePointEvent, Qt, QThread, QToolButton
)
from calibre_extensions import progress_indicator
@ -54,7 +54,7 @@ def set_menu(self, menu):
# Restore enum values to various classes
for cls in (Qt, QDialog, QToolButton, QAbstractItemView, QDialogButtonBox, QFrame, QComboBox, QLineEdit, QAction):
for cls in (Qt, QDialog, QToolButton, QAbstractItemView, QDialogButtonBox, QFrame, QComboBox, QLineEdit, QAction, QImage, QIODevice):
for var in tuple(vars(cls).values()):
m = getattr(var, '__members__', {})
for k, v in m.items():