summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/qml/networkaccessmanagerfactory/main.cpp3
-rw-r--r--src/qml/qml/qqmlengine.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/examples/qml/networkaccessmanagerfactory/main.cpp b/examples/qml/networkaccessmanagerfactory/main.cpp
index 95dfb5990d..a0fddf50c6 100644
--- a/examples/qml/networkaccessmanagerfactory/main.cpp
+++ b/examples/qml/networkaccessmanagerfactory/main.cpp
@@ -133,7 +133,8 @@ int main(int argc, char ** argv)
source = QUrl::fromLocalFile(parser.positionalArguments().first());
QQuickView view;
- view.engine()->setNetworkAccessManagerFactory(new MyNetworkAccessManagerFactory);
+ MyNetworkAccessManagerFactory networkManagerFactory;
+ view.engine()->setNetworkAccessManagerFactory(&networkManagerFactory);
view.setSource(source);
view.show();
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 7e11177caa..b27bf3779a 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -1196,6 +1196,8 @@ void QQmlEnginePrivate::registerFinalizeCallback(QObject *obj, int index)
support.
The factory must be set before executing the engine.
+
+ \note QQmlEngine does not take ownership of the factory.
*/
void QQmlEngine::setNetworkAccessManagerFactory(QQmlNetworkAccessManagerFactory *factory)
{