summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2011-11-03 09:47:08 +0100
committerQt by Nokia <qt-info@nokia.com>2011-11-03 10:08:56 +0100
commitaf4e1ffbc02d897fc4268771632ea400c6a6ae45 (patch)
treeef4a004489b54a735a6ad4cd077b5bc104528a86
parenta6eb40e66a546d75754d0e69fdddbe883379a636 (diff)
Profiler: Fix profiling when disabled on startup
Don't try to call addEvent(EndTrace) if we've just received the inital message telling us whether to profiler or not. Change-Id: I78e7437fce46bc1eabfa0c3095ffe11f396c403e Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
-rw-r--r--src/declarative/debugger/qdeclarativedebugtrace.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/debugger/qdeclarativedebugtrace.cpp b/src/declarative/debugger/qdeclarativedebugtrace.cpp
index bb092c19f3..6ccfbb3f1b 100644
--- a/src/declarative/debugger/qdeclarativedebugtrace.cpp
+++ b/src/declarative/debugger/qdeclarativedebugtrace.cpp
@@ -267,11 +267,12 @@ void QDeclarativeDebugTrace::messageReceived(const QByteArray &message)
QByteArray rwData = message;
QDataStream stream(&rwData, QIODevice::ReadOnly);
+ bool wasEnabled = m_enabled;
stream >> m_enabled;
m_messageReceived = true;
- if (!m_enabled) {
+ if (!m_enabled && wasEnabled) {
m_enabled = true;
addEvent(EndTrace);
m_enabled = false;