mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
More multiple inheritance fixes
This commit is contained in:
parent
6621bd7357
commit
d63f346d6e
@ -29,7 +29,13 @@ from calibre.gui2.threaded_jobs import ThreadedJobServer, ThreadedJob
|
|||||||
from calibre.utils.search_query_parser import SearchQueryParser, ParseException
|
from calibre.utils.search_query_parser import SearchQueryParser, ParseException
|
||||||
from calibre.utils.icu import lower
|
from calibre.utils.icu import lower
|
||||||
|
|
||||||
class JobManager(QAbstractTableModel, SearchQueryParser): # {{{
|
class AdaptSQP(SearchQueryParser):
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class JobManager(QAbstractTableModel, AdaptSQP): # {{{
|
||||||
|
|
||||||
job_added = pyqtSignal(int)
|
job_added = pyqtSignal(int)
|
||||||
job_done = pyqtSignal(int)
|
job_done = pyqtSignal(int)
|
||||||
|
@ -126,7 +126,12 @@ class NewsItem(NewsTreeItem):
|
|||||||
def __cmp__(self, other):
|
def __cmp__(self, other):
|
||||||
return cmp(self.title.lower(), getattr(other, 'title', '').lower())
|
return cmp(self.title.lower(), getattr(other, 'title', '').lower())
|
||||||
|
|
||||||
class RecipeModel(QAbstractItemModel, SearchQueryParser):
|
class AdaptSQP(SearchQueryParser):
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
pass
|
||||||
|
|
||||||
|
class RecipeModel(QAbstractItemModel, AdaptSQP):
|
||||||
|
|
||||||
LOCATIONS = ['all']
|
LOCATIONS = ['all']
|
||||||
searched = pyqtSignal(object)
|
searched = pyqtSignal(object)
|
||||||
@ -250,6 +255,9 @@ class RecipeModel(QAbstractItemModel, SearchQueryParser):
|
|||||||
self.root = new_root
|
self.root = new_root
|
||||||
self.reset()
|
self.reset()
|
||||||
|
|
||||||
|
def reset(self):
|
||||||
|
self.beginResetModel(), self.endResetModel()
|
||||||
|
|
||||||
def recipe_from_urn(self, urn):
|
def recipe_from_urn(self, urn):
|
||||||
coll = self.custom_recipe_collection if 'custom:' in urn else \
|
coll = self.custom_recipe_collection if 'custom:' in urn else \
|
||||||
self.builtin_recipe_collection
|
self.builtin_recipe_collection
|
||||||
|
Loading…
x
Reference in New Issue
Block a user