summaryrefslogtreecommitdiffstats
path: root/demos/sub-attaq
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-08-03 11:40:56 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-08-03 11:41:27 (GMT)
commita7b422e7ea439f4ca4eb7159fa33f679311b4fe2 (patch)
tree762ae49c195bddeece22ac1af0782fe73f7e8fe6 /demos/sub-attaq
parentf52c936991e796292a48b957cb93239a9c478bb0 (diff)
downloadQt-a7b422e7ea439f4ca4eb7159fa33f679311b4fe2.zip
Qt-a7b422e7ea439f4ca4eb7159fa33f679311b4fe2.tar.gz
Qt-a7b422e7ea439f4ca4eb7159fa33f679311b4fe2.tar.bz2
Fix compilation and warning
Reviewed-by: TrustMe
Diffstat (limited to 'demos/sub-attaq')
-rw-r--r--demos/sub-attaq/custompropertyanimation.cpp2
-rw-r--r--demos/sub-attaq/states.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/demos/sub-attaq/custompropertyanimation.cpp b/demos/sub-attaq/custompropertyanimation.cpp
index 9282f42..27a4eba 100644
--- a/demos/sub-attaq/custompropertyanimation.cpp
+++ b/demos/sub-attaq/custompropertyanimation.cpp
@@ -96,7 +96,7 @@ void CustomPropertyAnimation::updateState(QAbstractAnimation::State oldState, QA
setKeyValues(values);
}
- if (animProp && !startValue().isValid() && currentTime() == 0
+ if ((animProp && !startValue().isValid() && currentTime() == 0)
|| (currentTime() == duration() && currentLoop() == (loopCount() - 1))) {
setStartValue(def);
}
diff --git a/demos/sub-attaq/states.cpp b/demos/sub-attaq/states.cpp
index d63737f..d6c0b5a 100644
--- a/demos/sub-attaq/states.cpp
+++ b/demos/sub-attaq/states.cpp
@@ -269,9 +269,10 @@ void UpdateScoreState::onEntry(QEvent *e)
/** Win transition */
UpdateScoreTransition::UpdateScoreTransition(GraphicsScene *scene, PlayState *game, QAbstractState *target)
- : QSignalTransition(scene,SIGNAL(subMarineDestroyed(int)), QList<QAbstractState*>() << target),
+ : QSignalTransition(scene,SIGNAL(subMarineDestroyed(int))),
game(game), scene(scene)
{
+ setTargetState(target);
}
bool UpdateScoreTransition::eventTest(QEvent *event)
@@ -288,9 +289,10 @@ bool UpdateScoreTransition::eventTest(QEvent *event)
/** Win transition */
WinTransition::WinTransition(GraphicsScene *scene, PlayState *game, QAbstractState *target)
- : QSignalTransition(scene,SIGNAL(allSubMarineDestroyed(int)), QList<QAbstractState*>() << target),
+ : QSignalTransition(scene,SIGNAL(allSubMarineDestroyed(int))),
game(game), scene(scene)
{
+ setTargetState(target);
}
bool WinTransition::eventTest(QEvent *event)