From 223313479bf8ec80158ba0f6cba4dd5e74d92718 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Thu, 28 Feb 2013 17:03:43 -0800 Subject: Add a URL interceptor to the QML engine Allows for custom file handling to a greater extent than the QNetworkAccessManager. Change-Id: Ifd3946bf33530c40ca2edeeb9f441f712e4941f6 Reviewed-by: Matthew Vogt --- src/qml/qml/qqmlengine_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/qml/qml/qqmlengine_p.h') diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h index b5af0bb7cd..b745d6a963 100644 --- a/src/qml/qml/qqmlengine_p.h +++ b/src/qml/qml/qqmlengine_p.h @@ -173,6 +173,8 @@ public: QHash > imageProviders; + QQmlAbstractUrlInterceptor* urlInterceptor; + // Scarce resources are "exceptionally high cost" QVariant types where allowing the // normal JavaScript GC to clean them up is likely to lead to out-of-memory or other // out-of-resource situations. When such a resource is passed into JavaScript we -- cgit v1.2.3 From 9b5a55101d7c519446c1cf3706a235dea81ad4de Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Thu, 24 Jan 2013 14:07:29 -0800 Subject: Add qmlClearRegisteredTypes Function Registered types are stored in a global static variable, not on an engine instance. For applications managing multiple engines over their lifetime, there needs to be a way to clear the existing types so they can register new ones and avoid memory leaks. Task-Number: QTBUG-28572 Change-Id: Ic70a4dd1e29d99399b21fb42eaf10d4a52bf2adf Reviewed-by: Christopher Adams --- src/qml/qml/qqmlengine_p.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/qml/qml/qqmlengine_p.h') diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h index b745d6a963..0d852c1c1b 100644 --- a/src/qml/qml/qqmlengine_p.h +++ b/src/qml/qml/qqmlengine_p.h @@ -125,6 +125,9 @@ public: ~QQmlEnginePrivate(); void init(); + // No mutex protecting baseModulesUninitialized, because use outside QQmlEngine + // is just qmlClearTypeRegistrations (which can't be called while an engine exists) + static bool baseModulesUninitialized; class PropertyCapture { public: -- cgit v1.2.3