VariableChooser: Rework

Allow multiple expanders to be registered for lineedits, e.g. a
local and the global ones, and actually show them.

Use a tree view in the chooser for somewhat more structured display.

Change-Id: I769f92144e5249f45e54381de52aa6973eb20118
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
hjk
2014-10-13 18:49:44 +02:00
parent e279c7e007
commit 3119d93b79
38 changed files with 285 additions and 140 deletions

View File

@@ -209,7 +209,6 @@ DebuggerSourcePathMappingWidget::DebuggerSourcePathMappingWidget(QWidget *parent
m_sourceLineEdit(new QLineEdit(this)),
m_targetChooser(new PathChooser(this))
{
(void)new Core::VariableChooser(this);
setTitle(tr("Source Paths Mapping"));
setToolTip(tr("<html><head/><body><p>Mappings of source file folders to "
"be used in the debugger can be entered here.</p>"
@@ -275,7 +274,9 @@ DebuggerSourcePathMappingWidget::DebuggerSourcePathMappingWidget(QWidget *parent
editTargetLabel->setBuddy(m_targetChooser);
m_targetChooser->setToolTip(targetToolTip);
editLayout->addRow(editTargetLabel, m_targetChooser);
Core::VariableChooser::addVariableSupport(m_targetChooser->lineEdit());
auto chooser = new Core::VariableChooser(this);
chooser->addSupportedWidget(m_targetChooser->lineEdit());
// Main layout
QVBoxLayout *mainLayout = new QVBoxLayout;