Also enumify QEvent

This commit is contained in:
Kovid Goyal 2021-11-25 13:58:44 +05:30
parent 9b33ba7a9b
commit 27b5c08d47
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -10,7 +10,7 @@ from qt.core import (
QAbstractItemView, QAction, QComboBox, QDialog, QDialogButtonBox, QDrag,
QEventLoop, QFontMetrics, QFormLayout, QFrame, QImage, QIODevice, QLineEdit,
QMenu, QMessageBox, QModelIndex, QPalette, QSinglePointEvent, Qt, QThread,
QToolButton
QToolButton, QEvent
)
from calibre_extensions import progress_indicator
@ -60,7 +60,7 @@ QFontMetrics.width = lambda self, text: self.horizontalAdvance(text)
# Restore enum values to various classes
for cls in (
Qt, QDialog, QToolButton, QAbstractItemView, QDialogButtonBox, QFrame, QComboBox,
QLineEdit, QAction, QImage, QIODevice, QPalette, QFormLayout
QLineEdit, QAction, QImage, QIODevice, QPalette, QFormLayout, QEvent
):
for var in tuple(vars(cls).values()):
m = getattr(var, '__members__', {})