diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-01-10 10:01:36 +0100 |
---|---|---|
committer | Pasi Petäjäjärvi <pasi.petajajarvi@qt.io> | 2020-01-14 12:36:32 +0200 |
commit | 7ff9e3c3959c2ef1d7c95c8d2a1d277ccb2752a9 (patch) | |
tree | 4a66c1dab694e1a095b9cb15b639ae731daaf30b /src/qml | |
parent | 11dd3dd1345d08e5f9d2ded4d0e5a3f6d3a8fdef (diff) |
On QQmlEngine destruction drop singletons before type loader
The singleton destruction can trigger additional types to be loaded.
Fixes: QTBUG-80840
Change-Id: Ifa406b2a1cfd3b9e9b36e8005dfc0808eebf15cf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 3c23f5371a19991771bd29c27d377c6672e46cd1)
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 7cd4bf8579..a32a13b5a4 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -1074,8 +1074,6 @@ QQmlEngine::~QQmlEngine() Q_D(QQmlEngine); QJSEnginePrivate::removeFromDebugServer(this); - d->typeLoader.invalidate(); - // Emit onDestruction signals for the root context before // we destroy the contexts, engine, Singleton Types etc. that // may be required to handle the destruction signal. @@ -1091,6 +1089,8 @@ QQmlEngine::~QQmlEngine() delete d->rootContext; d->rootContext = nullptr; + + d->typeLoader.invalidate(); } /*! \fn void QQmlEngine::quit() |