Don't pass the expression string to the signal handler profiler.
authorMichael Brasser <michael.brasser@nokia.com>
Mon, 14 May 2012 01:56:36 +0000 (11:56 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 14 May 2012 21:44:21 +0000 (23:44 +0200)
Working towards removing the need to store a copy of the expression
string in the expression.

Author: Christiaan Janssen <christiaan.janssen@nokia.com>
Change-Id: I2cedfcf455c9aa4f1fb2ed422533945371038c58
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
src/qml/debugger/qqmlprofilerservice_p.h
src/qml/qml/qqmlboundsignal.cpp

index 576f981..5d10021 100644 (file)
@@ -212,16 +212,13 @@ struct QQmlBindingProfiler {
 };
 
 struct QQmlHandlingSignalProfiler {
-    QQmlHandlingSignalProfiler(QObject *object, int index, QQmlBoundSignalExpression *expression)
+    QQmlHandlingSignalProfiler(QQmlBoundSignalExpression *expression)
     {
         enabled = QQmlProfilerService::instance
                 ? QQmlProfilerService::instance->profilingEnabled() : false;
         if (enabled) {
             QQmlProfilerService *service = QQmlProfilerService::instance;
             service->startRange(QQmlProfilerService::HandlingSignal);
-            service->rangeData(QQmlProfilerService::HandlingSignal,
-                               QLatin1String(object->metaObject()->method(index).methodSignature()) + QLatin1String(": ")
-                               + expression->expression());
             service->rangeLocation(QQmlProfilerService::HandlingSignal,
                                    expression->sourceFile(), expression->lineNumber(),
                                    expression->columnNumber());
index 17237d4..b3d07c3 100644 (file)
@@ -289,7 +289,7 @@ void QQmlBoundSignal::subscriptionCallback(QQmlNotifierEndpoint *e, void **a)
     if (QQmlDebugService::isDebuggingEnabled())
         QV8DebugService::instance()->signalEmitted(QString::fromLatin1(s->m_scope->metaObject()->method(s->m_index).methodSignature()));
 
-    QQmlHandlingSignalProfiler prof(*(s->m_scope), s->m_index, s->m_expression);
+    QQmlHandlingSignalProfiler prof(s->m_expression);
 
     s->setIsEvaluating(true);