summaryrefslogtreecommitdiffstats
path: root/demos/sub-attaq/states.cpp
diff options
context:
space:
mode:
authorAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-10-02 06:40:17 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-10-02 06:40:17 (GMT)
commit17dc26e3e7a65b6eb0c0980a76c8fbe7bd37c690 (patch)
treeee9a982c144fb636ec22cdf7dd27de37725ff320 /demos/sub-attaq/states.cpp
parentb148b182b5b48d60c2b57d8b74ad0f30272bb578 (diff)
parent7ea326d796a6d2ecb13b961c576c82a797d84706 (diff)
downloadQt-17dc26e3e7a65b6eb0c0980a76c8fbe7bd37c690.zip
Qt-17dc26e3e7a65b6eb0c0980a76c8fbe7bd37c690.tar.gz
Qt-17dc26e3e7a65b6eb0c0980a76c8fbe7bd37c690.tar.bz2
Merge commit 'qt-mainline/4.6' into kinetic-declarativeui
Conflicts: configure.exe
Diffstat (limited to 'demos/sub-attaq/states.cpp')
-rw-r--r--demos/sub-attaq/states.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/demos/sub-attaq/states.cpp b/demos/sub-attaq/states.cpp
index 10c173e..7443ae7 100644
--- a/demos/sub-attaq/states.cpp
+++ b/demos/sub-attaq/states.cpp
@@ -67,6 +67,8 @@ PlayState::PlayState(GraphicsScene *scene, QState *parent)
PlayState::~PlayState()
{
+ if (machine)
+ delete machine;
}
void PlayState::onEntry(QEvent *)
@@ -74,13 +76,15 @@ void PlayState::onEntry(QEvent *)
//We are now playing?
if (machine) {
machine->stop();
+ //we hide the information
+ scene->textInformationItem->hide();
scene->clearScene();
currentLevel = 0;
score = 0;
delete machine;
}
- machine = new QStateMachine(this);
+ machine = new QStateMachine;
//This state is when player is playing
LevelState *levelState = new LevelState(scene, this, machine);