Commit 954feb48 authored by David Schulz's avatar David Schulz

Cdbext: Fix adding watchers.

Change-Id: I65a34460237308d76a202ac08d3b2180f532c934
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 302148e2
......@@ -785,8 +785,10 @@ bool WatchesSymbolGroup::addWatch(CIDebugSymbols *s, std::string iname, const st
if (isWatchIname(iname))
iname.erase(0, std::strlen(WatchesSymbolGroup::watchInamePrefix) + 1);
// Already in?
if (root()->childByIName(iname.c_str()))
return true;
if (AbstractSymbolGroupNode *watcherNode = root()->childByIName(iname.c_str())) {
if (!removeSymbol(watcherNode, errorMessage))
return false;
}
// Resolve the expressions, but still display the original name obtained to
// avoid cycles re-adding symbols
SymbolGroupNode *node = addSymbol(std::string(), fixWatchExpression(s, expression),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment