aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/debugger/qdeclarativeprofilerservice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/debugger/qdeclarativeprofilerservice.cpp')
-rw-r--r--src/declarative/debugger/qdeclarativeprofilerservice.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/declarative/debugger/qdeclarativeprofilerservice.cpp b/src/declarative/debugger/qdeclarativeprofilerservice.cpp
index c5b6b65031..17ee3e5836 100644
--- a/src/declarative/debugger/qdeclarativeprofilerservice.cpp
+++ b/src/declarative/debugger/qdeclarativeprofilerservice.cpp
@@ -124,6 +124,11 @@ bool QDeclarativeProfilerService::stopProfiling()
return profilerInstance()->stopProfilingImpl();
}
+void QDeclarativeProfilerService::sendStartedProfilingMessage()
+{
+ profilerInstance()->sendStartedProfilingMessageImpl();
+}
+
void QDeclarativeProfilerService::addEvent(EventType t)
{
profilerInstance()->addEventImpl(t);
@@ -174,7 +179,7 @@ bool QDeclarativeProfilerService::startProfilingImpl()
bool success = false;
if (!profilingEnabled()) {
setProfilingEnabled(true);
- addEventImpl(StartTrace);
+ sendStartedProfilingMessageImpl();
success = true;
}
return success;
@@ -191,6 +196,15 @@ bool QDeclarativeProfilerService::stopProfilingImpl()
return success;
}
+void QDeclarativeProfilerService::sendStartedProfilingMessageImpl()
+{
+ if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled)
+ return;
+
+ QDeclarativeProfilerData ed = {m_timer.nsecsElapsed(), (int)Event, (int)StartTrace, QString(), -1, -1, 0, 0};
+ QDeclarativeDebugService::sendMessage(ed.toByteArray());
+}
+
void QDeclarativeProfilerService::addEventImpl(EventType event)
{
if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled)