QmlProfiler: moved v4 tracing to run method
authorChristiaan Janssen <christiaan.janssen@nokia.com>
Fri, 20 Jan 2012 15:34:49 +0000 (16:34 +0100)
committerQt by Nokia <qt-info@nokia.com>
Wed, 1 Feb 2012 06:02:33 +0000 (07:02 +0100)
We used to register the calls to update, but that happens
only when the binding is created.  Evaluation occurs at run.

Change-Id: I01927a1eb515a83b4e5c69c6fcf5f358a8e5878f
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
src/declarative/qml/v4/qv4bindings.cpp

index e646198..ec7699a 100644 (file)
@@ -242,11 +242,6 @@ void QV4Bindings::Binding::setEnabled(bool e, QDeclarativePropertyPrivate::Write
 
 void QV4Bindings::Binding::update(QDeclarativePropertyPrivate::WriteFlags flags)
 {
-    QString bindingUrl;
-    if (parent->context())
-        bindingUrl = parent->context()->url.toString();
-
-    QDeclarativeBindingProfiler prof(bindingUrl, line, column);
     parent->run(this, flags);
 }
 
@@ -312,6 +307,8 @@ void QV4Bindings::run(Binding *binding, QDeclarativePropertyPrivate::WriteFlags
         return;
     }
 
+    QDeclarativeBindingProfiler prof(context->url.toString(), binding->line, binding->column);
+
     binding->updating = true;
     if (binding->property & 0xFFFF0000) {
         QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(context->engine);