diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-03-01 14:17:44 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-03-01 14:17:52 +0100 |
commit | 23712c568072422e49d41f039ad72c92fd117afe (patch) | |
tree | 423e84c8802074f9daa5422eb5c8c49b3074516a /tests/auto/qml/qqmllanguage/testtypes.cpp | |
parent | ab2c5be35dd8f339ec39f52364625a53fa6d0ded (diff) | |
parent | 2b55b531b095a991376a26599d503223a67ae946 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro
Change-Id: I3ca8f0422828191b7e19539c25f31f2d048e9f18
Diffstat (limited to 'tests/auto/qml/qqmllanguage/testtypes.cpp')
-rw-r--r-- | tests/auto/qml/qqmllanguage/testtypes.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/testtypes.cpp b/tests/auto/qml/qqmllanguage/testtypes.cpp index 4153aae1dc..9593bfc940 100644 --- a/tests/auto/qml/qqmllanguage/testtypes.cpp +++ b/tests/auto/qml/qqmllanguage/testtypes.cpp @@ -29,6 +29,14 @@ #include <private/qqmlcompiler_p.h> +static QObject *myTypeObjectSingleton(QQmlEngine *engine, QJSEngine *scriptEngine) +{ + Q_UNUSED(engine) + Q_UNUSED(scriptEngine) + + return new MyTypeObject(); +} + void registerTypes() { qmlRegisterInterface<MyInterface>("MyInterface"); @@ -88,6 +96,8 @@ void registerTypes() qmlRegisterType<RootObjectInCreationTester>("Test", 1, 0, "RootObjectInCreationTester"); qmlRegisterType<MyCompositeBaseType>("Test", 1, 0, "MyCompositeBaseType"); + + qmlRegisterSingletonType<MyTypeObjectSingleton>("Test", 1, 0, "MyTypeObjectSingleton", myTypeObjectSingleton); } QVariant myCustomVariantTypeConverter(const QString &data) |