diff options
author | hjk <hjk@theqtcompany.com> | 2015-03-04 14:00:00 +0100 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2015-03-04 14:40:14 +0000 |
commit | 02404afd9fa582814c9a261295de03dd831a78ba (patch) | |
tree | 227e92e856260fe8e3f3b704b562c48f1d42fd15 /src/plugins/debugger | |
parent | d5f9f78172a18d5858550f0ff352061a7ffb8290 (diff) | |
download | qt-creator-02404afd9fa582814c9a261295de03dd831a78ba.tar.gz |
Debugger: Allow evaluation of children of evaluated expressions
Task-number: QTCREATORBUG-5920
Change-Id: I00a42b93e3840f106ee9d4e94e1bc9f677e13e3f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r-- | src/plugins/debugger/watchwindow.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp index 2ea8632e58..33cc5be3af 100644 --- a/src/plugins/debugger/watchwindow.cpp +++ b/src/plugins/debugger/watchwindow.cpp @@ -744,9 +744,12 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev) actSelectWidgetToWatch.setEnabled(canHandleWatches && canInsertWatches && engine->hasCapability(WatchWidgetsCapability)); + bool canAddWatches = canHandleWatches && !exp.isEmpty(); + // Suppress for top-level watchers. + if (m_type == WatchersType && mi0.parent().isValid() && !mi0.parent().parent().isValid()) + canAddWatches = false; QAction actWatchExpression(addWatchActionText(exp), 0); - actWatchExpression.setEnabled( - canHandleWatches && !exp.isEmpty() && m_type == LocalsType); + actWatchExpression.setEnabled(canAddWatches); // Can remove watch if engine can handle it or session engine. QModelIndex p = mi0; |