diff options
author | Bea Lam <bea.lam@nokia.com> | 2009-11-11 00:30:14 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2009-11-11 00:30:14 (GMT) |
commit | 18a785eefdfbc5f83d7a0e78cbd8430f9d79c13f (patch) | |
tree | e00fe22b7ceea466d94a179704522b1785259fff /src/declarative/debugger | |
parent | 2b3f5433d5b522a169cf466d9f0bc820d796b828 (diff) | |
download | Qt-18a785eefdfbc5f83d7a0e78cbd8430f9d79c13f.zip Qt-18a785eefdfbc5f83d7a0e78cbd8430f9d79c13f.tar.gz Qt-18a785eefdfbc5f83d7a0e78cbd8430f9d79c13f.tar.bz2 |
Change watch state to Dead instead of Active on removal.
Diffstat (limited to 'src/declarative/debugger')
-rw-r--r-- | src/declarative/debugger/qmldebug.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/declarative/debugger/qmldebug.cpp b/src/declarative/debugger/qmldebug.cpp index f24b456..326c933 100644 --- a/src/declarative/debugger/qmldebug.cpp +++ b/src/declarative/debugger/qmldebug.cpp @@ -331,7 +331,7 @@ void QmlEngineDebugPrivate::message(const QByteArray &data) QVariant value; ds >> queryId >> debugId >> name >> value; - QmlDebugWatch *watch = watched.value(queryId); + QmlDebugWatch *watch = watched.value(queryId, 0); if (!watch) return; emit watch->valueChanged(name, value); @@ -428,10 +428,10 @@ void QmlEngineDebug::removeWatch(QmlDebugWatch *watch) { Q_D(QmlEngineDebug); - if (!watch || watch->state() == QmlDebugWatch::Inactive || watch->state() == QmlDebugWatch::Dead) + if (!watch || watch->state() == QmlDebugWatch::Dead) return; - watch->setState(QmlDebugWatch::Inactive); + watch->setState(QmlDebugWatch::Dead); d->watched.remove(watch->queryId()); if (d->client->isConnected()) { @@ -562,8 +562,7 @@ QmlDebugWatch::QmlDebugWatch(QObject *parent) QmlDebugWatch::~QmlDebugWatch() { - if (m_client) - m_client->removeWatch(this); + m_client->removeWatch(this); } int QmlDebugWatch::queryId() const |