From eefbdbfc2109b11b37a99b6b97acca122024278c Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 8 Mar 2012 11:47:38 +0100 Subject: [PATCH 1/1] QmlProfiler: Avoid overhead if profiling is not enabled Change-Id: I7ecf32fca53fdb2672760a5b0c5ae88d6bd8fe5a Reviewed-by: Aaron Kennedy --- src/qml/qml/qqmlbinding.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp index a19644f..bb6eb3b 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); -- 2.7.4