VariableChooser: Re-show current value in variable description

Lost in 3119d93b79

Change-Id: I180cdc281821dab6da1c0729da12872cd7789555
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-07-06 17:04:12 +03:00
committed by Orgad Shaneh
parent 1b6cc02725
commit b500205e71

View File

@@ -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('}'));