summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/debuggerengine.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2016-04-20 14:58:48 +0200
committerEike Ziller <eike.ziller@qt.io>2016-04-20 14:58:48 +0200
commitee8bf341c6f64096c6ccfeefd3b6b8a85fe91c0b (patch)
tree4dd8b097d0d2acc17f1a13e0e99debfc92b36466 /src/plugins/debugger/debuggerengine.cpp
parent0eeee15a887a8180c1c28dc9f4929b066e096136 (diff)
parent5dc690f234ec7bb5dcdb11a610a4ecbee6dc4d64 (diff)
downloadqt-creator-ee8bf341c6f64096c6ccfeefd3b6b8a85fe91c0b.tar.gz
Merge remote-tracking branch 'origin/4.0'
Conflicts: src/plugins/projectexplorer/session.cpp src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp Change-Id: I6946139f5e5fa3a9cdbb322fd50be248e2c0133f
Diffstat (limited to 'src/plugins/debugger/debuggerengine.cpp')
-rw-r--r--src/plugins/debugger/debuggerengine.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp
index 11f8528918..1c9f374182 100644
--- a/src/plugins/debugger/debuggerengine.cpp
+++ b/src/plugins/debugger/debuggerengine.cpp
@@ -282,6 +282,7 @@ public slots:
void resetLocation()
{
+ m_lookupRequests.clear();
m_locationTimer.stop();
m_locationMark.reset();
m_stackHandler.resetLocation();
@@ -337,6 +338,9 @@ public:
Utils::FileInProjectFinder m_fileFinder;
QByteArray m_qtNamespace;
+
+ // Safety net to avoid infinite lookups.
+ QSet<QByteArray> m_lookupRequests; // FIXME: Integrate properly.
};
@@ -2022,6 +2026,23 @@ bool DebuggerEngine::canHandleToolTip(const DebuggerToolTipContext &context) con
void DebuggerEngine::updateItem(const QByteArray &iname)
{
+ if (d->m_lookupRequests.contains(iname)) {
+ showMessage(QString::fromLatin1("IGNORING REPEATED REQUEST TO EXPAND " + iname));
+ WatchHandler *handler = watchHandler();
+ WatchItem *item = handler->findItem(iname);
+ if (!item->hasChildren()) {
+ handler->notifyUpdateStarted({iname});
+ item->setValue(decodeData({}, "notaccessible"));
+ item->setHasChildren(false);
+ item->outdated = false;
+ item->update();
+ handler->notifyUpdateFinished();
+ return;
+ }
+ // We could legitimately end up here after expanding + closing + re-expaning an item.
+ }
+ d->m_lookupRequests.insert(iname);
+
UpdateParameters params;
params.partialVariable = iname;
doUpdateLocals(params);