summaryrefslogtreecommitdiffstats
path: root/examples/widgets/animation/sub-attaq
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-03-20 13:46:57 +0100
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-03-20 13:49:28 +0100
commit76c0be34cd4ff4564693162fa7528463e23ce9d8 (patch)
treef165b7bc319548fb0082365411a871028f92e89e /examples/widgets/animation/sub-attaq
parent27b4fe96b59e9e63d1e570e802c072e9afdfb2d4 (diff)
parent36cb3f3f655a9090c82de609010cbfb88651a0f3 (diff)
Merge branch 'dev' into stable
This starts Qt 5.1 release cycle Conflicts: src/gui/text/qfontdatabase.cpp src/gui/text/qharfbuzz_copy_p.h src/widgets/kernel/qapplication.cpp src/widgets/kernel/qcoreapplication.cpp Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
Diffstat (limited to 'examples/widgets/animation/sub-attaq')
-rw-r--r--examples/widgets/animation/sub-attaq/boat_p.h3
-rw-r--r--examples/widgets/animation/sub-attaq/qanimationstate.h4
-rw-r--r--examples/widgets/animation/sub-attaq/states.cpp4
-rw-r--r--examples/widgets/animation/sub-attaq/states.h7
4 files changed, 4 insertions, 14 deletions
diff --git a/examples/widgets/animation/sub-attaq/boat_p.h b/examples/widgets/animation/sub-attaq/boat_p.h
index 265e706d96..e12cbc74bd 100644
--- a/examples/widgets/animation/sub-attaq/boat_p.h
+++ b/examples/widgets/animation/sub-attaq/boat_p.h
@@ -68,7 +68,7 @@ class KeyStopTransition : public QKeyEventTransition
{
public:
KeyStopTransition(Boat *b, QEvent::Type t, int k)
- : QKeyEventTransition(b, t, k), boat(b), key(k)
+ : QKeyEventTransition(b, t, k), boat(b)
{
}
protected:
@@ -80,7 +80,6 @@ protected:
}
private:
Boat * boat;
- int key;
};
//These transtion test if we have to move the boat (i.e current speed was 0 or another value)
diff --git a/examples/widgets/animation/sub-attaq/qanimationstate.h b/examples/widgets/animation/sub-attaq/qanimationstate.h
index 9d733c10ee..68eac43e13 100644
--- a/examples/widgets/animation/sub-attaq/qanimationstate.h
+++ b/examples/widgets/animation/sub-attaq/qanimationstate.h
@@ -50,8 +50,6 @@
# include "qabstractanimation.h"
#endif
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -86,6 +84,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QANIMATIONSTATE_H
diff --git a/examples/widgets/animation/sub-attaq/states.cpp b/examples/widgets/animation/sub-attaq/states.cpp
index 8c78ccdd12..e36d13ad07 100644
--- a/examples/widgets/animation/sub-attaq/states.cpp
+++ b/examples/widgets/animation/sub-attaq/states.cpp
@@ -123,7 +123,7 @@ void PlayState::onEntry(QEvent *)
levelState->addTransition(winTransition);
//This state is an animation when the score changed
- UpdateScoreState *scoreState = new UpdateScoreState(this, levelState);
+ UpdateScoreState *scoreState = new UpdateScoreState(levelState);
//This transition update the score when a submarine die
UpdateScoreTransition *scoreTransition = new UpdateScoreTransition(scene, this, levelState);
@@ -275,7 +275,7 @@ void WinState::onExit(QEvent *)
}
/** UpdateScore State */
-UpdateScoreState::UpdateScoreState(PlayState *g, QState *parent) : QState(parent), game(g)
+UpdateScoreState::UpdateScoreState(QState *parent) : QState(parent)
{
}
diff --git a/examples/widgets/animation/sub-attaq/states.h b/examples/widgets/animation/sub-attaq/states.h
index b1730a230d..3cd27be9a4 100644
--- a/examples/widgets/animation/sub-attaq/states.h
+++ b/examples/widgets/animation/sub-attaq/states.h
@@ -70,7 +70,6 @@ private :
QStateMachine *machine;
int currentLevel;
int score;
- QState *parallelChild;
friend class UpdateScoreState;
friend class UpdateScoreTransition;
@@ -103,7 +102,6 @@ protected:
void onExit(QEvent *);
private :
GraphicsScene *scene;
- Boat *boat;
};
class LostState : public QState
@@ -135,10 +133,8 @@ private :
class UpdateScoreState : public QState
{
public:
- UpdateScoreState(PlayState *game, QState *parent);
+ UpdateScoreState(QState *parent);
private:
- QPropertyAnimation *scoreAnimation;
- PlayState *game;
};
//These transtion is used to update the score
@@ -174,7 +170,6 @@ protected:
virtual bool eventTest(QEvent *event);
private:
PlayState *game;
- int key;
};
#endif // STATES_H