From 40360f040d9aa110997b375a460de5e6e4203ad6 Mon Sep 17 00:00:00 2001 From: Aurindam Jana Date: Thu, 10 Nov 2011 16:12:45 +0100 Subject: [PATCH] QV8ProfileService: Code refactor Define sendProfilingData() to send data to client. Change-Id: I1f4778946af4552ef6323c78a538ab7149990b0a Reviewed-by: Christiaan Janssen --- src/declarative/debugger/qv8profilerservice.cpp | 10 ++++++++-- src/declarative/debugger/qv8profilerservice_p.h | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/declarative/debugger/qv8profilerservice.cpp b/src/declarative/debugger/qv8profilerservice.cpp index c611366..48d2d13 100644 --- a/src/declarative/debugger/qv8profilerservice.cpp +++ b/src/declarative/debugger/qv8profilerservice.cpp @@ -152,8 +152,7 @@ void QV8ProfilerService::messageReceived(const QByteArray &message) startProfiling(QString::fromUtf8(title)); } else if (option == "stop") { stopProfiling(QString::fromUtf8(title)); - // Send messages to client - d->sendMessages(); + sendProfilingData(); } d->initialized = true; } @@ -191,6 +190,13 @@ void QV8ProfilerService::stopProfiling(const QString &title) } } +void QV8ProfilerService::sendProfilingData() +{ + Q_D(QV8ProfilerService); + // Send messages to client + d->sendMessages(); +} + void QV8ProfilerServicePrivate::printProfileTree(const v8::CpuProfileNode *node, int level) { for (int index = 0 ; index < node->GetChildrenCount() ; index++) { diff --git a/src/declarative/debugger/qv8profilerservice_p.h b/src/declarative/debugger/qv8profilerservice_p.h index ea5119c..f2d517b 100644 --- a/src/declarative/debugger/qv8profilerservice_p.h +++ b/src/declarative/debugger/qv8profilerservice_p.h @@ -100,6 +100,8 @@ public: void startProfiling(const QString &title); void stopProfiling(const QString &title); + void sendProfilingData(); + protected: void messageReceived(const QByteArray &); -- 2.7.4