summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qtreeview_p.h
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-12-23 17:59:18 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-12-25 10:15:29 +0000
commitf568bfce641f52b4641b5d8281c99742f1ae6f40 (patch)
treebe2c6fc34e9d51499898ce39a80dea3c62211113 /src/widgets/itemviews/qtreeview_p.h
parentc8720d62102f4e53f12117835735259d20e99433 (diff)
QTreeView: fix keyboard navigation when first or last item is disabled
The keyboard navigation did not consider the disabled state when trying to find the new index under all circumstances. This lead to a non-working PageUp/Down/Home/End navigation when the first or last item was disabled or hidden. Fix it by explicitly checking if the calculated item is hidden/enabled and skip it in this case. Fixes: QTBUG-44746 Fixes: QTBUG-34832 Change-Id: Ifa3b64a405e67b792db5db9d186d426fcfe183fb Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/widgets/itemviews/qtreeview_p.h')
-rw-r--r--src/widgets/itemviews/qtreeview_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/itemviews/qtreeview_p.h b/src/widgets/itemviews/qtreeview_p.h
index 0a0e7aae87..9666a9f8c2 100644
--- a/src/widgets/itemviews/qtreeview_p.h
+++ b/src/widgets/itemviews/qtreeview_p.h
@@ -140,6 +140,8 @@ public:
int pageUp(int item) const;
int pageDown(int item) const;
+ int itemForKeyHome() const;
+ int itemForKeyEnd() const;
int itemHeight(int item) const;
int indentationForItem(int item) const;