diff options
author | Bea Lam <bea.lam@nokia.com> | 2009-11-26 04:10:13 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2009-11-26 04:10:13 (GMT) |
commit | 33a6e1e08b0a542fc631f28ddc269cec2fec97ce (patch) | |
tree | 9049506f565c296d26fcc8baa88d13351eb29e83 | |
parent | dbc13c80c8d06af0aa2187946d3fb2bab1654f2e (diff) | |
parent | 0204bc0a7031d017f8999bc73005fab46cc59d5e (diff) | |
download | Qt-33a6e1e08b0a542fc631f28ddc269cec2fec97ce.zip Qt-33a6e1e08b0a542fc631f28ddc269cec2fec97ce.tar.gz Qt-33a6e1e08b0a542fc631f28ddc269cec2fec97ce.tar.bz2 |
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
-rw-r--r-- | doc/src/declarative/qtdeclarative.qdoc | 17 | ||||
-rw-r--r-- | src/declarative/util/qmltimer.cpp | 2 | ||||
-rw-r--r-- | tests/auto/declarative/qmltimer/tst_qmltimer.cpp | 9 |
3 files changed, 28 insertions, 0 deletions
diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc index 5947429..6a94b6e 100644 --- a/doc/src/declarative/qtdeclarative.qdoc +++ b/doc/src/declarative/qtdeclarative.qdoc @@ -47,4 +47,21 @@ \brief The Qt Declarative module provides a declarative framework for building highly dynamic, custom user interfaces. +To include the definitions of the module's classes, use the +following directive: + +\code +#include <QtDeclarative> +\endcode + +To link against the module, add this line to your \l qmake \c +.pro file: + +\code +QT += declarative +\endcode + +For more information on the Qt Declarative module, see the +\l{declarativeui.html}{Declarative UI} documentation. + */ diff --git a/src/declarative/util/qmltimer.cpp b/src/declarative/util/qmltimer.cpp index da60193..9b54337 100644 --- a/src/declarative/util/qmltimer.cpp +++ b/src/declarative/util/qmltimer.cpp @@ -303,7 +303,9 @@ void QmlTimer::finished() if (d->repeating || !d->running) return; emit triggered(); + d->running = false; d->firstTick = false; + emit runningChanged(); } QT_END_NAMESPACE diff --git a/tests/auto/declarative/qmltimer/tst_qmltimer.cpp b/tests/auto/declarative/qmltimer/tst_qmltimer.cpp index 63a9a09..d681fbb 100644 --- a/tests/auto/declarative/qmltimer/tst_qmltimer.cpp +++ b/tests/auto/declarative/qmltimer/tst_qmltimer.cpp @@ -105,6 +105,7 @@ void tst_qmltimer::notRepeating() QCOMPARE(helper.count, 1); QTest::qWait(TIMEOUT_TIMEOUT); QCOMPARE(helper.count, 1); + QVERIFY(timer->isRunning() == false); } void tst_qmltimer::notRepeatingStart() @@ -126,6 +127,7 @@ void tst_qmltimer::notRepeatingStart() QCOMPARE(helper.count, 1); QTest::qWait(TIMEOUT_TIMEOUT); QCOMPARE(helper.count, 1); + QVERIFY(timer->isRunning() == false); delete timer; } @@ -147,11 +149,14 @@ void tst_qmltimer::repeat() QTest::qWait(TIMEOUT_TIMEOUT); QVERIFY(helper.count > oldCount); + QVERIFY(timer->isRunning()); oldCount = helper.count; timer->stop(); + QTest::qWait(TIMEOUT_TIMEOUT); QVERIFY(helper.count == oldCount); + QVERIFY(timer->isRunning() == false); delete timer; } @@ -173,6 +178,7 @@ void tst_qmltimer::triggeredOnStart() QCOMPARE(helper.count, 2); QTest::qWait(TIMEOUT_TIMEOUT); QCOMPARE(helper.count, 2); + QVERIFY(timer->isRunning() == false); delete timer; } @@ -194,6 +200,7 @@ void tst_qmltimer::triggeredOnStartRepeat() int oldCount = helper.count; QTest::qWait(TIMEOUT_TIMEOUT); QVERIFY(helper.count > oldCount); + QVERIFY(timer->isRunning()); delete timer; } @@ -234,6 +241,7 @@ void tst_qmltimer::changeDuration() QTest::qWait(600); QCOMPARE(helper.count, 3); + QVERIFY(timer->isRunning()); delete timer; } @@ -259,6 +267,7 @@ void tst_qmltimer::restart() QTest::qWait(700); QCOMPARE(helper.count, 2); + QVERIFY(timer->isRunning()); delete timer; } |