diff options
author | Chris Adams <chris.adams@jollamobile.com> | 2014-12-01 14:32:57 +1000 |
---|---|---|
committer | Christopher Adams <chris.adams@jollamobile.com> | 2014-12-04 04:04:20 +0100 |
commit | b60bedf42ce7714180ced5597e8849b66a4d942b (patch) | |
tree | b2c64e22e8d92594cad9044a98d8a37e6239231d /src/quick/util/qquickglobal.cpp | |
parent | 43c93a55e28a4655d8bc8d49a81b7802d7157244 (diff) |
Fix QtQuick2 module unload support
This commit ensures that the value type providers installed by the
QtQuick2 QML module during initialization are uninstalled when the
plugin is unloaded.
It also fixes a bug in the type compiler so that it now works with
types from plugins which get unloaded and then reloaded.
Task-number: QTBUG-43004
Change-Id: I4b3fb75aae65dfbc5de9c88701ed82514087ab7d
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Diffstat (limited to 'src/quick/util/qquickglobal.cpp')
-rw-r--r-- | src/quick/util/qquickglobal.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quick/util/qquickglobal.cpp b/src/quick/util/qquickglobal.cpp index 455e180dbe..139bae4038 100644 --- a/src/quick/util/qquickglobal.cpp +++ b/src/quick/util/qquickglobal.cpp @@ -982,4 +982,11 @@ void QQuick_initializeProviders() QQml_setGuiProvider(getGuiProvider()); } +void QQuick_deinitializeProviders() +{ + QQml_removeValueTypeProvider(getValueTypeProvider()); + QQml_setColorProvider(0); // technically, another plugin may have overridden our providers + QQml_setGuiProvider(0); // but we cannot handle that case in a sane way. +} + QT_END_NAMESPACE |