QmlProfiler: reseting completion flags in traceclient

When the server sends more than one trace consecutively
(e.g. with the profiler JS API), the flags that control
the race condition between the v8 client and the qml
client need to be reset after the data is read.  Otherwise
the complete signal will be duplicated.

Change-Id: I63b808d6f0aae404814d5243c1729671b56ca52e
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
This commit is contained in:
Christiaan Janssen
2012-02-01 16:53:08 +01:00
parent 9bf15cabe0
commit a50e447a81

View File

@@ -460,15 +460,21 @@ void TraceWindow::qmlComplete()
{
m_qmlDataReady = true;
if (!m_v8plugin || m_v8plugin.data()->status() != QDeclarativeDebugClient::Enabled || m_v8DataReady)
if (!m_v8plugin || m_v8plugin.data()->status() != QDeclarativeDebugClient::Enabled || m_v8DataReady) {
emit viewUpdated();
// once complete is sent, reset the flag
m_qmlDataReady = false;
}
}
void TraceWindow::v8Complete()
{
m_v8DataReady = true;
if (!m_plugin || m_plugin.data()->status() != QDeclarativeDebugClient::Enabled || m_qmlDataReady)
if (!m_plugin || m_plugin.data()->status() != QDeclarativeDebugClient::Enabled || m_qmlDataReady) {
emit viewUpdated();
// once complete is sent, reset the flag
m_v8DataReady = false;
}
}
void TraceWindow::resizeEvent(QResizeEvent *event)