aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2012-03-08 11:47:38 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-09 09:48:16 +0100
commiteefbdbfc2109b11b37a99b6b97acca122024278c (patch)
treeb92694fc0a94a6df0780a0d7c3176d966398ca11 /src
parent2cdf6cbb9c43d52f914e9e7d01cc43e055ebf226 (diff)
QmlProfiler: Avoid overhead if profiling is not enabled
Change-Id: I7ecf32fca53fdb2672760a5b0c5ae88d6bd8fe5a Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/qml/qml/qqmlbinding.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp
index a19644fb3e..bb6eb3b723 100644
--- a/src/qml/qml/qqmlbinding.cpp
+++ b/src/qml/qml/qqmlbinding.cpp
@@ -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);