aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2016-09-06 12:50:52 (GMT)
committerChristoph Cullmann <cullmann@kde.org>2016-09-06 12:50:52 (GMT)
commit0a483167b98715181c72a3cfc0ffd37a1fa41cd8 (patch)
treeddc6642c1c03c2a50f906f124faf81631c75674f
parente1d70b2f59f901b9576cd146df8545a314e1f583 (diff)
allow to activate elements via keypresses
-rw-r--r--addons/filetree/katefiletree.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/filetree/katefiletree.cpp b/addons/filetree/katefiletree.cpp
index 848bc4e..b4437c7 100644
--- a/addons/filetree/katefiletree.cpp
+++ b/addons/filetree/katefiletree.cpp
@@ -57,6 +57,8 @@ KateFileTree::KateFileTree(QWidget *parent): QTreeView(parent)
setAllColumnsShowFocus(true);
setFocusPolicy(Qt::NoFocus);
+ // handle activated (e.g. for pressing enter) + clicked (to avoid to need to do double-click e.g. on Windows)
+ connect(this, SIGNAL(activated(QModelIndex)), this, SLOT(mouseClicked(QModelIndex)));
connect(this, SIGNAL(clicked(QModelIndex)), this, SLOT(mouseClicked(QModelIndex)));
m_filelistReloadDocument = new QAction(QIcon::fromTheme(QLatin1String("view-refresh")), i18nc("@action:inmenu", "Reloa&d"), this);