diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2015-07-06 17:04:12 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2015-07-07 09:23:38 +0000 |
commit | b500205e71aeb3c989ba40e9eed0ec5417988255 (patch) | |
tree | cf0c33692deffbdad6aa49deee8ca1cafc4943ff | |
parent | 1b6cc02725fc8953e314902b23e09eb63d2d67d4 (diff) |
VariableChooser: Re-show current value in variable description
Lost in 3119d93b7981c3b245f584e9663839312c9f1675
Change-Id: I180cdc281821dab6da1c0729da12872cd7789555
Reviewed-by: hjk <hjk@theqtcompany.com>
-rw-r--r-- | src/plugins/coreplugin/variablechooser.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/variablechooser.cpp b/src/plugins/coreplugin/variablechooser.cpp index 123c832471..85ce634eb5 100644 --- a/src/plugins/coreplugin/variablechooser.cpp +++ b/src/plugins/coreplugin/variablechooser.cpp @@ -176,8 +176,13 @@ public: return m_variable; } - if (role == Qt::ToolTipRole) - return m_expander->variableDescription(m_variable.toUtf8()); + if (role == Qt::ToolTipRole) { + QString description = m_expander->variableDescription(m_variable.toUtf8()); + const QString value = m_expander->value(m_variable.toUtf8()).toHtmlEscaped(); + if (!value.isEmpty()) + description += QLatin1String("<p>") + VariableChooser::tr("Current Value: %1").arg(value); + return description; + } if (role == UnexpandedTextRole) return QString(QLatin1String("%{") + m_variable + QLatin1Char('}')); |