Debugger: Fix lock when profiling
authorKai Koehne <kai.koehne@nokia.com>
Thu, 6 Oct 2011 14:33:47 +0000 (16:33 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 7 Oct 2011 16:42:13 +0000 (18:42 +0200)
commit5eed6fbe38266767a7080d0f16abc16de97afaf8
tree85f0f9123b321be847c24f0ff99b7750e7f57c33
parent854520c921298389693623f220177ec84eac693c
Debugger: Fix lock when profiling

Parts of the loading of data is now in a separate thread, which was already
trying to log trace data while the QDeclarativeDebugTrace constructor
was still blocking. Avoid this by calling QDeclarativeDebugTrace constructor
before the actual execution begins (addEngine()). Also make sure that the
logging methods are reentrant with a mutex.

Change-Id: I5c2c1d14763fd9c7cb6fc93c6dff22d00d8737f1
Reviewed-on: http://codereview.qt-project.org/6169
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
src/declarative/debugger/qdeclarativedebugtrace.cpp
src/declarative/debugger/qdeclarativedebugtrace_p.h
src/declarative/qml/qdeclarativeengine.cpp