Add FIXME
This commit is contained in:
parent
30902ca042
commit
cbd368d980
@ -72,11 +72,17 @@ class CompletionFilterModel(QSortFilterProxyModel):
|
|||||||
|
|
||||||
def first_item(self):
|
def first_item(self):
|
||||||
"""Return the first item in the model."""
|
"""Return the first item in the model."""
|
||||||
|
# FIXME if the tree looks like this:
|
||||||
|
# - cat1
|
||||||
|
# + cat2
|
||||||
|
# - item
|
||||||
|
# then this will yield an invalid index.
|
||||||
cat = self.index(0, 0)
|
cat = self.index(0, 0)
|
||||||
return self.index(0, 0, cat)
|
return self.index(0, 0, cat)
|
||||||
|
|
||||||
def last_item(self):
|
def last_item(self):
|
||||||
"""Return the last item in the model."""
|
"""Return the last item in the model."""
|
||||||
|
# FIXME this has about the same problem as above
|
||||||
cat = self.index(self.rowCount() - 1, 0)
|
cat = self.index(self.rowCount() - 1, 0)
|
||||||
return self.index(self.rowCount(cat) - 1, 0, cat)
|
return self.index(self.rowCount(cat) - 1, 0, cat)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user