aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickview.cpp
diff options
context:
space:
mode:
authorGlenn Watson <glenn.watson@nokia.com>2012-05-15 11:57:51 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-15 05:30:26 +0200
commite0eec47cac3f9f06613011dd70db74b7cd7d61ef (patch)
treea7def7294cf3d32493ba79f25b182889ea51bfd8 /src/quick/items/qquickview.cpp
parentfec5068733373750d3a913fe3e6b3464a3f7275b (diff)
Add hooks for declarative memory profiler.
These macros effectively do nothing if the profiling library has not been preloaded. However, if the library is loaded they provide some additional context for each heap allocation, by tagging each subsequent allocation with the QML file that caused the allocation to occur. Change-Id: Ib1f56d0df0664e118e04e53e22a6942317b1baed Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/quick/items/qquickview.cpp')
-rw-r--r--src/quick/items/qquickview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/items/qquickview.cpp b/src/quick/items/qquickview.cpp
index 7ffafeb6b9..03a8e6ee89 100644
--- a/src/quick/items/qquickview.cpp
+++ b/src/quick/items/qquickview.cpp
@@ -48,6 +48,7 @@
#include <private/qqmlprofilerservice_p.h>
#include <private/qqmlinspectorservice_p.h>
+#include <private/qqmlmemoryprofiler_p.h>
#include <QtQml/qqmlengine.h>
#include <private/qqmlengine_p.h>
@@ -91,6 +92,7 @@ void QQuickViewPrivate::execute()
component = 0;
}
if (!source.isEmpty()) {
+ QML_MEMORY_SCOPE_URL(engine.baseUrl().resolved(source));
component = new QQmlComponent(&engine, source, q);
if (!component->isLoading()) {
q->continueExecute();