diff options
author | Alan Alpert <aalpert@rim.com> | 2013-01-24 12:13:57 -0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-18 19:46:02 +0100 |
commit | 99ad368cf810723643ae76bba6a1adba3321b18f (patch) | |
tree | e87c708650931c8863a1affed20befd1578aff35 /tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp | |
parent | d0491c87a9f0f2dadc9ef0e0a267b8c241c08b41 (diff) | |
download | qtdeclarative-99ad368cf810723643ae76bba6a1adba3321b18f.tar.gz |
Add qmlRegisterType for Composite Types
This is equivalent functionality to registering a composite type in a
qmldir file, a type name in a versioned module is associated with a
given file. This function now allows that to be done easily from C++.
Change-Id: I1cf44b92c3ad7fee593f4f84773c35b56253e628
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp')
-rw-r--r-- | tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp b/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp index 03d2f0beb0..90023222d3 100644 --- a/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp +++ b/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp @@ -129,11 +129,7 @@ void tst_qqmlmetatype::initTestCase() qmlRegisterType<ValueInterceptorTestType>("Test", 1, 0, "ValueInterceptorTestType"); QUrl testTypeUrl(testFileUrl("CompositeType.qml")); - //TODO: Replace this with public API version when added - QQmlPrivate::RegisterCompositeType regStruct = { - testTypeUrl,"Test", 1, 0, "TestTypeComposite" - }; - QQmlPrivate::qmlregister(QQmlPrivate::CompositeRegistration, ®Struct); + qmlRegisterType(testTypeUrl, "Test", 1, 0, "TestTypeComposite"); } void tst_qqmlmetatype::qmlParserStatusCast() |