mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #781135 (ParseException when pressing "Next" or "Previous" in plugin search)
This commit is contained in:
parent
1073c627d6
commit
31e2bc3818
@ -75,6 +75,8 @@ class PluginModel(QAbstractItemModel, SearchQueryParser): # {{{
|
|||||||
|
|
||||||
def find(self, query):
|
def find(self, query):
|
||||||
query = query.strip()
|
query = query.strip()
|
||||||
|
if not query:
|
||||||
|
return QModelIndex()
|
||||||
matches = self.parse(query)
|
matches = self.parse(query)
|
||||||
if not matches:
|
if not matches:
|
||||||
return QModelIndex()
|
return QModelIndex()
|
||||||
@ -87,6 +89,8 @@ class PluginModel(QAbstractItemModel, SearchQueryParser): # {{{
|
|||||||
|
|
||||||
def find_next(self, idx, query, backwards=False):
|
def find_next(self, idx, query, backwards=False):
|
||||||
query = query.strip()
|
query = query.strip()
|
||||||
|
if not query:
|
||||||
|
return idx
|
||||||
matches = self.parse(query)
|
matches = self.parse(query)
|
||||||
if not matches:
|
if not matches:
|
||||||
return idx
|
return idx
|
||||||
|
Loading…
x
Reference in New Issue
Block a user