allow in-line editing of watcher expressions

This commit is contained in:
hjk
2009-03-19 15:24:18 +01:00
parent 6cb5ea76f0
commit 00be68701e
9 changed files with 93 additions and 41 deletions

View File

@@ -255,14 +255,10 @@ void DebuggerManager::init()
this, SLOT(expandChildren(QModelIndex)));
connect(localsView, SIGNAL(requestCollapseChildren(QModelIndex)),
this, SLOT(collapseChildren(QModelIndex)));
connect(localsView, SIGNAL(requestAssignValue(QString,QString)),
this, SLOT(assignValueInDebugger(QString,QString)));
// Watchers
QTreeView *watchersView = qobject_cast<QTreeView *>(m_watchersWindow);
watchersView->setModel(m_watchHandler->model());
connect(watchersView, SIGNAL(requestAssignValue(QString,QString)),
this, SLOT(assignValueInDebugger(QString,QString)));
connect(watchersView, SIGNAL(requestExpandChildren(QModelIndex)),
this, SLOT(expandChildren(QModelIndex)));
connect(watchersView, SIGNAL(requestCollapseChildren(QModelIndex)),
@@ -271,6 +267,8 @@ void DebuggerManager::init()
this, SIGNAL(sessionValueRequested(QString,QVariant*)));
connect(m_watchHandler, SIGNAL(setSessionValueRequested(QString,QVariant)),
this, SIGNAL(setSessionValueRequested(QString,QVariant)));
connect(theDebuggerSetting(AssignValue)->action(), SIGNAL(triggered()),
this, SLOT(assignValueInDebugger()));
// Tooltip
QTreeView *tooltipView = qobject_cast<QTreeView *>(m_tooltipWindow);
@@ -965,6 +963,12 @@ void DebuggerManager::exitDebugger()
emit debuggingFinished();
}
void DebuggerManager::assignValueInDebugger()
{
if (QAction *action = qobject_cast<QAction *>(sender())) {
qDebug() << "HANDLING " << action->data().toString();
}
}
void DebuggerManager::assignValueInDebugger(const QString &expr, const QString &value)
{
QTC_ASSERT(m_engine, return);