diff options
author | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-10-02 06:40:17 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-10-02 06:40:17 (GMT) |
commit | 17dc26e3e7a65b6eb0c0980a76c8fbe7bd37c690 (patch) | |
tree | ee9a982c144fb636ec22cdf7dd27de37725ff320 /demos/sub-attaq | |
parent | b148b182b5b48d60c2b57d8b74ad0f30272bb578 (diff) | |
parent | 7ea326d796a6d2ecb13b961c576c82a797d84706 (diff) | |
download | Qt-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')
-rw-r--r-- | demos/sub-attaq/states.cpp | 6 | ||||
-rw-r--r-- | demos/sub-attaq/sub-attaq.pro | 4 | ||||
-rw-r--r-- | demos/sub-attaq/textinformationitem.cpp | 2 |
3 files changed, 8 insertions, 4 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); diff --git a/demos/sub-attaq/sub-attaq.pro b/demos/sub-attaq/sub-attaq.pro index ba2b54b..8677ff5 100644 --- a/demos/sub-attaq/sub-attaq.pro +++ b/demos/sub-attaq/sub-attaq.pro @@ -31,13 +31,13 @@ SOURCES += boat.cpp \ RESOURCES += subattaq.qrc # install -target.path = $$[QT_INSTALL_DEMOS]/animation/sub-attaq +target.path = $$[QT_INSTALL_DEMOS]/sub-attaq sources.files = $$SOURCES \ $$HEADERS \ $$RESOURCES \ $$FORMS \ sub-attaq.pro \ pics -sources.path = $$[QT_INSTALL_DEMOS]/animation/sub-attaq +sources.path = $$[QT_INSTALL_DEMOS]/sub-attaq INSTALLS += target \ sources diff --git a/demos/sub-attaq/textinformationitem.cpp b/demos/sub-attaq/textinformationitem.cpp index 453fd24..1b0c831 100644 --- a/demos/sub-attaq/textinformationitem.cpp +++ b/demos/sub-attaq/textinformationitem.cpp @@ -44,7 +44,7 @@ TextInformationItem::TextInformationItem (QGraphicsItem * parent) : QGraphicsTextItem(parent) { - setFont(QFont("Comic Sans MS", 25)); + setFont(QFont("Comic Sans MS", 15)); } #include <QDebug> void TextInformationItem::setMessage(const QString& text) |