diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-11-12 03:54:19 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-11-12 03:54:19 (GMT) |
commit | b3b4f84d9d09fb5b87ebcd896229dad5ef0be26b (patch) | |
tree | 74131a619a54b032868de12d9c658823967594a5 | |
parent | 2744c8f6c824b3eda4b31c1ab1d588ae90ede4e1 (diff) | |
parent | 8905d8445dfe8977441302003fa21dde140fa0fe (diff) | |
download | Qt-b3b4f84d9d09fb5b87ebcd896229dad5ef0be26b.zip Qt-b3b4f84d9d09fb5b87ebcd896229dad5ef0be26b.tar.gz Qt-b3b4f84d9d09fb5b87ebcd896229dad5ef0be26b.tar.bz2 |
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
-rw-r--r-- | src/corelib/animation/qabstractanimation.cpp | 11 | ||||
-rw-r--r-- | src/tools/moc/generator.cpp | 3 | ||||
-rw-r--r-- | tests/auto/declarative/qmllanguage/testtypes.cpp | 1 | ||||
-rw-r--r-- | tests/auto/declarative/qmllanguage/testtypes.h | 12 | ||||
-rw-r--r-- | tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp | 21 |
5 files changed, 33 insertions, 15 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 185d8e5..c1da692 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -205,7 +205,6 @@ void QUnifiedTimer::updateAnimationsTime() QAbstractAnimation *animation = animations.at(currentAnimationIdx); int elapsed = QAbstractAnimationPrivate::get(animation)->totalCurrentTime + (animation->direction() == QAbstractAnimation::Forward ? delta : -delta); - //qWarning() << "SCT" << elapsed; animation->setCurrentTime(elapsed); } currentAnimationIdx = 0; @@ -232,7 +231,6 @@ void QUnifiedTimer::timerEvent(QTimerEvent *event) { if ((consistentTiming && startStopAnimationTimer.isActive()) || (event->timerId() == startStopAnimationTimer.timerId())) { - //qWarning() << "A SSAT"; startStopAnimationTimer.stop(); //we transfer the waiting animations into the "really running" state @@ -254,7 +252,6 @@ void QUnifiedTimer::timerEvent(QTimerEvent *event) if (event->timerId() == animationTimer.timerId()) { // update current time on all top level animations - //qWarning() << "A AT"; updateAnimationsTime(); restartAnimationTimer(); } @@ -267,10 +264,8 @@ void QUnifiedTimer::registerAnimation(QAbstractAnimation *animation, bool isTopL Q_ASSERT(!QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer); QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer = true; animationsToStart << animation; - if (!startStopAnimationTimer.isActive()) { - //qWarning("Starting SSAT 1"); + if (!startStopAnimationTimer.isActive()) startStopAnimationTimer.start(STARTSTOP_TIMER_DELAY, this); - } } } @@ -288,10 +283,8 @@ void QUnifiedTimer::unregisterAnimation(QAbstractAnimation *animation) if (idx <= currentAnimationIdx) --currentAnimationIdx; - if (animations.isEmpty() && !startStopAnimationTimer.isActive()) { - //qWarning("Starting SSAT 2"); + if (animations.isEmpty() && !startStopAnimationTimer.isActive()) startStopAnimationTimer.start(STARTSTOP_TIMER_DELAY, this); - } } else { animationsToStart.removeOne(animation); } diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index 1ed6586..b67b4cf 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -292,7 +292,8 @@ void Generator::generateCode() QList<QByteArray> extraList; for (int i = 0; i < cdef->propertyList.count(); ++i) { const PropertyDef &p = cdef->propertyList.at(i); - if (!isVariantType(p.type) && !metaTypes.contains(p.type)) { + if (!isVariantType(p.type) && !metaTypes.contains(p.type) && !p.type.contains('*') && + !p.type.contains('<') && !p.type.contains('>')) { int s = p.type.lastIndexOf("::"); if (s > 0) { QByteArray scope = p.type.left(s); diff --git a/tests/auto/declarative/qmllanguage/testtypes.cpp b/tests/auto/declarative/qmllanguage/testtypes.cpp index c370c09..933431d 100644 --- a/tests/auto/declarative/qmllanguage/testtypes.cpp +++ b/tests/auto/declarative/qmllanguage/testtypes.cpp @@ -47,4 +47,5 @@ QML_DEFINE_TYPE(Test,1,0,MyContainer,MyContainer); QML_DEFINE_TYPE(Test,1,0,MyPropertyValueSource,MyPropertyValueSource); QML_DEFINE_TYPE(Test,1,0,MyDotPropertyObject,MyDotPropertyObject); QML_DEFINE_TYPE(Test,1,0,MyNamespacedType,MyNamespace::MyNamespacedType); +QML_DEFINE_TYPE(Test,1,0,MySecondNamespacedType,MyNamespace::MySecondNamespacedType); QML_DEFINE_NOCREATE_TYPE(MyGroupedObject); diff --git a/tests/auto/declarative/qmllanguage/testtypes.h b/tests/auto/declarative/qmllanguage/testtypes.h index b251f87..3598d68 100644 --- a/tests/auto/declarative/qmllanguage/testtypes.h +++ b/tests/auto/declarative/qmllanguage/testtypes.h @@ -535,7 +535,19 @@ namespace MyNamespace { { Q_OBJECT }; + + class MySecondNamespacedType : public QObject + { + Q_OBJECT + Q_PROPERTY(QmlList<MyNamespace::MyNamespacedType *> *list READ list); + public: + QmlList<MyNamespacedType *> *list() { return &m_list; } + + private: + QmlConcreteList<MyNamespacedType *> m_list; + }; } QML_DECLARE_TYPE(MyNamespace::MyNamespacedType); +QML_DECLARE_TYPE(MyNamespace::MySecondNamespacedType); #endif // TESTTYPES_H diff --git a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp index a05ee06..d5c5c4d 100644 --- a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp +++ b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp @@ -693,11 +693,22 @@ void tst_qmllanguage::valueTypes() void tst_qmllanguage::cppnamespace() { - QmlComponent component(&engine, TEST_FILE("cppnamespace.qml")); - VERIFY_ERRORS(0); - QObject *object = component.create(); - QVERIFY(object != 0); - delete object; + { + QmlComponent component(&engine, TEST_FILE("cppnamespace.qml")); + VERIFY_ERRORS(0); + QObject *object = component.create(); + QVERIFY(object != 0); + delete object; + } + + { + QmlComponent component(&engine, TEST_FILE("cppnamespace.2.qml")); + qWarning() << component.errors(); + VERIFY_ERRORS(0); + QObject *object = component.create(); + QVERIFY(object != 0); + delete object; + } } void tst_qmllanguage::aliasProperties() |