diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2015-06-16 10:45:17 +0300 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2015-06-16 10:23:03 +0000 |
commit | ba82f9a518db9790be8e918069421de211f66186 (patch) | |
tree | 2b6aa067068f7bb07755f1e20ae388044be30d98 | |
parent | b0e1dbb9b9b20ee7bc98bf1d0ba673fa75a18fd7 (diff) | |
download | qt-creator-ba82f9a518db9790be8e918069421de211f66186.tar.gz |
VariableChooser: Update variable description on keyboard navigation
Change-Id: I716e4bd6325f0d00b1fa73ea4a76f185660c89a0
Reviewed-by: hjk <hjk@theqtcompany.com>
-rw-r--r-- | src/plugins/coreplugin/variablechooser.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/variablechooser.cpp b/src/plugins/coreplugin/variablechooser.cpp index c7337de83f..4b71bde5ad 100644 --- a/src/plugins/coreplugin/variablechooser.cpp +++ b/src/plugins/coreplugin/variablechooser.cpp @@ -77,6 +77,8 @@ public: void contextMenuEvent(QContextMenuEvent *ev); + void currentChanged(const QModelIndex ¤t, const QModelIndex &previous); + private: VariableChooserPrivate *m_target; }; @@ -225,6 +227,12 @@ void VariableTreeView::contextMenuEvent(QContextMenuEvent *ev) m_target->insertText(expandedText); } +void VariableTreeView::currentChanged(const QModelIndex ¤t, const QModelIndex &previous) +{ + Q_UNUSED(previous); + m_target->updateDescription(current); +} + VariableChooserPrivate::VariableChooserPrivate(VariableChooser *parent) : q(parent), m_lineEdit(0), @@ -248,8 +256,6 @@ VariableChooserPrivate::VariableChooserPrivate(VariableChooser *parent) verticalLayout->addWidget(m_variableTree); verticalLayout->addWidget(m_variableDescription); - connect(m_variableTree, &QTreeView::clicked, - this, &VariableChooserPrivate::updateDescription); connect(m_variableTree, &QTreeView::activated, this, &VariableChooserPrivate::handleItemActivated); connect(qobject_cast<QApplication *>(qApp), &QApplication::focusChanged, |