QV8ProfileService: Code refactor
authorAurindam Jana <aurindam.jana@nokia.com>
Thu, 10 Nov 2011 15:12:45 +0000 (16:12 +0100)
committerQt by Nokia <qt-info@nokia.com>
Fri, 11 Nov 2011 13:56:27 +0000 (14:56 +0100)
Define sendProfilingData() to send data to client.

Change-Id: I1f4778946af4552ef6323c78a538ab7149990b0a
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
src/declarative/debugger/qv8profilerservice.cpp
src/declarative/debugger/qv8profilerservice_p.h

index c611366..48d2d13 100644 (file)
@@ -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++) {
index ea5119c..f2d517b 100644 (file)
@@ -100,6 +100,8 @@ public:
     void startProfiling(const QString &title);
     void stopProfiling(const QString &title);
 
+    void sendProfilingData();
+
 protected:
     void messageReceived(const QByteArray &);