QmlDebugger: user input on watches

Reviewed-by: hjk
This commit is contained in:
Christiaan Janssen
2011-02-28 10:58:21 +01:00
parent fd66f68671
commit 7100d29f66
11 changed files with 54 additions and 7 deletions

View File

@@ -811,7 +811,7 @@ Qt::ItemFlags WatchModel::flags(const QModelIndex &idx) const
// Disable editing if debuggee is positively running.
const bool isRunning = engine() && engine()->state() == InferiorRunOk;
if (isRunning)
if (isRunning && engine() && !engine()->acceptsWatchesWhileRunning())
return notEditable;
const WatchData &data = *watchItem(idx);
@@ -1186,6 +1186,10 @@ void WatchHandler::insertData(const WatchData &data)
if (data.isSomethingNeeded() && data.iname.contains('.')) {
MODEL_DEBUG("SOMETHING NEEDED: " << data.toString());
if (!m_engine->isSynchronous()) {
WatchModel *model = modelForIName(data.iname);
QTC_ASSERT(model, return);
model->insertData(data);
m_engine->updateWatchData(data);
} else {
m_engine->showMessage(QLatin1String("ENDLESS LOOP: SOMETHING NEEDED: ")