Fix warnings about unused variables in sub-attaq-example (CLANG).

Change-Id: Icad46a03a8d5875c128bd1f1bc97127e0ee05622
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
This commit is contained in:
Friedemann Kleint 2013-03-06 15:48:43 +01:00 committed by The Qt Project
parent e1d39c6bfc
commit c2530a0f59
3 changed files with 4 additions and 10 deletions

View File

@ -68,7 +68,7 @@ class KeyStopTransition : public QKeyEventTransition
{ {
public: public:
KeyStopTransition(Boat *b, QEvent::Type t, int k) KeyStopTransition(Boat *b, QEvent::Type t, int k)
: QKeyEventTransition(b, t, k), boat(b), key(k) : QKeyEventTransition(b, t, k), boat(b)
{ {
} }
protected: protected:
@ -80,7 +80,6 @@ protected:
} }
private: private:
Boat * boat; Boat * boat;
int key;
}; };
//These transtion test if we have to move the boat (i.e current speed was 0 or another value) //These transtion test if we have to move the boat (i.e current speed was 0 or another value)

View File

@ -123,7 +123,7 @@ void PlayState::onEntry(QEvent *)
levelState->addTransition(winTransition); levelState->addTransition(winTransition);
//This state is an animation when the score changed //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 //This transition update the score when a submarine die
UpdateScoreTransition *scoreTransition = new UpdateScoreTransition(scene, this, levelState); UpdateScoreTransition *scoreTransition = new UpdateScoreTransition(scene, this, levelState);
@ -275,7 +275,7 @@ void WinState::onExit(QEvent *)
} }
/** UpdateScore State */ /** UpdateScore State */
UpdateScoreState::UpdateScoreState(PlayState *g, QState *parent) : QState(parent), game(g) UpdateScoreState::UpdateScoreState(QState *parent) : QState(parent)
{ {
} }

View File

@ -70,7 +70,6 @@ private :
QStateMachine *machine; QStateMachine *machine;
int currentLevel; int currentLevel;
int score; int score;
QState *parallelChild;
friend class UpdateScoreState; friend class UpdateScoreState;
friend class UpdateScoreTransition; friend class UpdateScoreTransition;
@ -103,7 +102,6 @@ protected:
void onExit(QEvent *); void onExit(QEvent *);
private : private :
GraphicsScene *scene; GraphicsScene *scene;
Boat *boat;
}; };
class LostState : public QState class LostState : public QState
@ -135,10 +133,8 @@ private :
class UpdateScoreState : public QState class UpdateScoreState : public QState
{ {
public: public:
UpdateScoreState(PlayState *game, QState *parent); UpdateScoreState(QState *parent);
private: private:
QPropertyAnimation *scoreAnimation;
PlayState *game;
}; };
//These transtion is used to update the score //These transtion is used to update the score
@ -174,7 +170,6 @@ protected:
virtual bool eventTest(QEvent *event); virtual bool eventTest(QEvent *event);
private: private:
PlayState *game; PlayState *game;
int key;
}; };
#endif // STATES_H #endif // STATES_H