forked from qt-creator/qt-creator
Fix QML watch expressions for v8
Fix syncing of watch expressions with Qt Quick 2. For v8/v4 we're utilizing the 'evaluate' command, which we have to re-send on every change to get updates. We therefore now call synchronizeWatchers() whenever the stack changes. Task-number: QTCREATORBUG-13473 Change-Id: I7356e9518a719839c5cbb6e518be18e665078e85 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com> Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
This commit is contained in:
@@ -135,7 +135,6 @@ public:
|
||||
QList<int> debuggerCommands;
|
||||
|
||||
//Cache
|
||||
QStringList watchedExpressions;
|
||||
QList<int> currentFrameScopes;
|
||||
QHash<int, int> stackIndexLookup;
|
||||
|
||||
@@ -722,9 +721,7 @@ QmlV8ObjectData extractData(const QVariant &data, const QVariant &refsVal)
|
||||
|
||||
void QmlV8DebuggerClientPrivate::clearCache()
|
||||
{
|
||||
watchedExpressions.clear();
|
||||
currentFrameScopes.clear();
|
||||
evaluatingExpression.clear();
|
||||
updateLocalsAndWatchers.clear();
|
||||
}
|
||||
|
||||
@@ -958,15 +955,12 @@ void QmlV8DebuggerClient::synchronizeWatchers(const QStringList &watchers)
|
||||
{
|
||||
SDEBUG(watchers);
|
||||
foreach (const QString &exp, watchers) {
|
||||
if (!d->watchedExpressions.contains(exp)) {
|
||||
StackHandler *stackHandler = d->engine->stackHandler();
|
||||
if (stackHandler->isContentsValid() && stackHandler->currentFrame().isUsable()) {
|
||||
d->evaluate(exp, false, false, stackHandler->currentIndex());
|
||||
d->evaluatingExpression.insert(d->sequence, exp);
|
||||
}
|
||||
StackHandler *stackHandler = d->engine->stackHandler();
|
||||
if (stackHandler->isContentsValid() && stackHandler->currentFrame().isUsable()) {
|
||||
d->evaluate(exp, false, false, stackHandler->currentIndex());
|
||||
d->evaluatingExpression.insert(d->sequence, exp);
|
||||
}
|
||||
}
|
||||
d->watchedExpressions = watchers;
|
||||
}
|
||||
|
||||
void QmlV8DebuggerClient::expandObject(const QByteArray &iname, quint64 objectId)
|
||||
|
||||
Reference in New Issue
Block a user