QmlProfiler: Avoid overhead if profiling is not enabled
authorKai Koehne <kai.koehne@nokia.com>
Thu, 8 Mar 2012 10:47:38 +0000 (11:47 +0100)
committerQt by Nokia <qt-info@nokia.com>
Fri, 9 Mar 2012 08:48:16 +0000 (09:48 +0100)
Change-Id: I7ecf32fca53fdb2672760a5b0c5ae88d6bd8fe5a
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
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);