mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 08:55:07 +02:00
Add note about multiple inheritance issues in PyQt5
This commit is contained in:
parent
0f3138bbdb
commit
9ed39c3d6a
2 changed files with 12 additions and 3 deletions
|
|
@ -22,10 +22,19 @@
|
|||
|
||||
# QT5XX: Test touchscreen support on windows 8 in the viewer
|
||||
|
||||
# Look for obsolete classes and functions from the list here:
|
||||
# QT5XX: Look for obsolete classes and functions from the list here:
|
||||
# http://qt-project.org/doc/qt-5/obsoleteclasses.html as these will not be
|
||||
# present in PyQt5
|
||||
|
||||
# QT5XX: For classes that inherit both a QObject based class and
|
||||
# SearchQueryParser, PyQt5 class the SearchQueryParser __init__ method when
|
||||
# calling the QObject based classes __init__ method. The simplest fix is to
|
||||
# make SearchQueryParser the first base class instead of the second. An
|
||||
# alternative fix is to create a derived class from SearchQueryParser whose
|
||||
# __init__ method accepts any args and does nothing and inherit from that. Do
|
||||
# this porting and test the results when possible. Porting already done and
|
||||
# tested for keyboard.py
|
||||
|
||||
# QT5XX: Delete this file after migration is completed
|
||||
|
||||
import os, re
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ def __iter__(self):
|
|||
for child in self.children:
|
||||
yield child
|
||||
|
||||
class ConfigModel(QAbstractItemModel, SearchQueryParser):
|
||||
class ConfigModel(SearchQueryParser, QAbstractItemModel):
|
||||
|
||||
def __init__(self, keyboard, parent=None):
|
||||
QAbstractItemModel.__init__(self, parent)
|
||||
|
|
@ -556,7 +556,7 @@ def setEditorData(self, editor, index):
|
|||
def setModelData(self, editor, model, index):
|
||||
self.closeEditor.emit(editor, self.NoHint)
|
||||
custom_keys = editor.custom_keys
|
||||
sc = index.data(Qt.UserRole).toPyObject().data
|
||||
sc = index.data(Qt.UserRole).data
|
||||
if custom_keys is None:
|
||||
candidates = []
|
||||
for ckey in sc['default_keys']:
|
||||
|
|
|
|||
Loading…
Reference in a new issue