diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2012-05-11 12:01:41 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-24 12:52:43 +0200 |
commit | d2e557c2c2d7fcf3bf7c1676df3902e115986dc2 (patch) | |
tree | 65f47e443efa9635a2634880c01dc439817f9566 /tests/auto/qml/qqmlcpputils | |
parent | 0a3ff88f851771e52d119fab90c0254de6950585 (diff) |
Lazily create QMetaObjects
For internal QML built types, creating a metaobject each time is
just wasteful. Additionally, as the property caches were always
created from the intermediate QMetaObject, it was difficult to pass
information directly from the compiler to the property cache.
Change-Id: I769526b0edaaf16a86883f3065b75618b94e4077
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'tests/auto/qml/qqmlcpputils')
-rw-r--r-- | tests/auto/qml/qqmlcpputils/qqmlcpputils.pro | 2 | ||||
-rw-r--r-- | tests/auto/qml/qqmlcpputils/tst_qqmlcpputils.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qml/qqmlcpputils/qqmlcpputils.pro b/tests/auto/qml/qqmlcpputils/qqmlcpputils.pro index 1c088860e5..847665b8f4 100644 --- a/tests/auto/qml/qqmlcpputils/qqmlcpputils.pro +++ b/tests/auto/qml/qqmlcpputils/qqmlcpputils.pro @@ -6,4 +6,4 @@ SOURCES += tst_qqmlcpputils.cpp CONFIG += parallel_test -QT += core-private gui-private qml-private testlib +QT += core-private gui-private qml-private testlib v8-private diff --git a/tests/auto/qml/qqmlcpputils/tst_qqmlcpputils.cpp b/tests/auto/qml/qqmlcpputils/tst_qqmlcpputils.cpp index 186b82a0a8..4189f441a2 100644 --- a/tests/auto/qml/qqmlcpputils/tst_qqmlcpputils.cpp +++ b/tests/auto/qml/qqmlcpputils/tst_qqmlcpputils.cpp @@ -73,7 +73,7 @@ void tst_qqmlcpputils::fastConnect() { { MyObject *obj = new MyObject; - FAST_CONNECT(obj, SIGNAL(signal1()), obj, SLOT(slot1())); + qmlobject_connect(obj, MyObject, SIGNAL(signal1()), obj, MyObject, SLOT(slot1())); obj->signal1(); QCOMPARE(obj->slotCount, 1); @@ -83,7 +83,7 @@ void tst_qqmlcpputils::fastConnect() { MyObject obj; - FAST_CONNECT(&obj, SIGNAL(signal1()), &obj, SLOT(slot1())) + qmlobject_connect(&obj, MyObject, SIGNAL(signal1()), &obj, MyObject, SLOT(slot1())) obj.signal1(); QCOMPARE(obj.slotCount, 1); @@ -92,7 +92,7 @@ void tst_qqmlcpputils::fastConnect() { MyObject *obj = new MyObject; QSignalSpy spy(obj, SIGNAL(signal2())); - FAST_CONNECT(obj, SIGNAL(signal1()), obj, SIGNAL(signal2())); + qmlobject_connect(obj, MyObject, SIGNAL(signal1()), obj, MyObject, SIGNAL(signal2())); obj->signal1(); QCOMPARE(spy.count(), 1); |