Cdbext: Discard old watches when syncing...

... to make sure everything is new evaluated.

Change-Id: I256e044e0095c0c4d2e4563474768ba2fdc3c85e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
David Schulz
2015-03-06 14:09:40 +01:00
parent bc124ff97f
commit 7db238c116

View File

@@ -507,18 +507,18 @@ static std::string commandLocals(ExtensionCommandContext &commandExtCtx,PCSTR ar
// Synchronize watches if desired.
WatchesSymbolGroup *watchesSymbolGroup = extCtx.watchesSymbolGroup();
if (watchSynchronization) {
if (watcherInameExpressionMap.empty()) { // No watches..kill group.
watchesSymbolGroup = 0;
extCtx.discardWatchesSymbolGroup();
if (SymbolGroupValue::verbose)
DebugPrint() << "Discarding watchers";
} else {
if (!watcherInameExpressionMap.empty()) {
// Force group into existence
watchesSymbolGroup = extCtx.watchesSymbolGroup(commandExtCtx.symbols(), errorMessage);
if (!watchesSymbolGroup || !watchesSymbolGroup->synchronize(commandExtCtx.symbols(), watcherInameExpressionMap, errorMessage))
if (!watchesSymbolGroup || !watchesSymbolGroup->synchronize(commandExtCtx.symbols(),
watcherInameExpressionMap,
errorMessage)) {
return std::string();
}
}
}
// Pre-expand.
if (!expandedInames.empty()) {