QmlProfiler: Avoid overhead if profiling is not enabled
[profile/ivi/qtdeclarative.git] / src / qml / qml / qqmlbinding.cpp
index a19644f..bb6eb3b 100644 (file)
@@ -339,7 +339,8 @@ void QQmlBinding::update(QQmlPropertyPrivate::WriteFlags flags)
 
     if (!d->updating) {
         QQmlBindingProfiler prof(d->url, d->line, d->column);
-        prof.addDetail(expression());
+        if (prof.enabled)
+            prof.addDetail(expression());
         d->updating = true;
 
         QQmlAbstractExpression::DeleteWatcher watcher(d);