fix slowdown due to new splitting

This commit is contained in:
Damien Elmes 2009-03-23 12:06:33 +09:00
parent f467a350b5
commit 3985d72670

View file

@ -106,11 +106,12 @@ class DeckModel(QAbstractTableModel):
d = {'str': [], d = {'str': [],
'tag': [], 'tag': [],
} }
for elem in search.split(" "): if search:
if len(elem) > 2 and elem.startswith("t:"): for elem in search.split():
d['tag'].append(elem[2:]) if len(elem) > 2 and elem.startswith("t:"):
else: d['tag'].append(elem[2:])
d['str'].append(elem) else:
d['str'].append(elem)
return d return d
def showMatching(self): def showMatching(self):