From cbd368d98008509a9a4ccd560418cf0e18b07589 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 21 Mar 2014 20:25:11 +0100 Subject: [PATCH] Add FIXME --- qutebrowser/models/completionfilter.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qutebrowser/models/completionfilter.py b/qutebrowser/models/completionfilter.py index ba2e1e057..a294e4800 100644 --- a/qutebrowser/models/completionfilter.py +++ b/qutebrowser/models/completionfilter.py @@ -72,11 +72,17 @@ class CompletionFilterModel(QSortFilterProxyModel): def first_item(self): """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) return self.index(0, 0, cat) def last_item(self): """Return the last item in the model.""" + # FIXME this has about the same problem as above cat = self.index(self.rowCount() - 1, 0) return self.index(self.rowCount(cat) - 1, 0, cat)