diff options
author | Andy Shaw <andy.shaw@qt.io> | 2017-10-27 12:54:57 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2017-12-01 10:44:08 +0000 |
commit | 2cfe1bb09c11432ca5033f9589243e9e62fe9488 (patch) | |
tree | 84e8249bd024e476efef6ca63d9d443010d6070f /tests/auto/qml/qqmlmetatype/data | |
parent | 9e7dbbeec0be2ce07c58edf84ce6e03d60946bce (diff) |
Add a means to unregister custom qml types
In cases where Qt is used in a plugin it is possible that a plugin will
be unloaded while Qt itself is still loaded and as a result there is a
chance that there will be conflicting types registered.
Therefore, to ensure that plugins correctly clean up after themselves
cleanly, we need to add a means to unregister qml types. This is
intended to only be used when the user knows what they are doing.
Task-number: QTBUG-56521
Task-number: QTBUG-56532
Change-Id: Ie396e522385004e6e9f3841e04f8072ff29cb15b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlmetatype/data')
-rw-r--r-- | tests/auto/qml/qqmlmetatype/data/testUnregisterCustomSingletonType.qml | 8 | ||||
-rw-r--r-- | tests/auto/qml/qqmlmetatype/data/testUnregisterCustomType.qml | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlmetatype/data/testUnregisterCustomSingletonType.qml b/tests/auto/qml/qqmlmetatype/data/testUnregisterCustomSingletonType.qml new file mode 100644 index 0000000000..85b8f5ac8b --- /dev/null +++ b/tests/auto/qml/qqmlmetatype/data/testUnregisterCustomSingletonType.qml @@ -0,0 +1,8 @@ +import QtQuick 2.7 +import mytypes 1.0 + +Item { + id: root + property string text: StaticProvider.singletonGetString() +} + diff --git a/tests/auto/qml/qqmlmetatype/data/testUnregisterCustomType.qml b/tests/auto/qml/qqmlmetatype/data/testUnregisterCustomType.qml new file mode 100644 index 0000000000..f6ee4e9b77 --- /dev/null +++ b/tests/auto/qml/qqmlmetatype/data/testUnregisterCustomType.qml @@ -0,0 +1,8 @@ +import QtQuick 2.7 +import mytypes 1.0 + +Item { + id: root + Controller { id: controller; objectName: "controller" } +} + |