summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-06-10 13:29:09 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-06-10 13:29:09 (GMT)
commit9683cf068c3f933f836dc2a5b4a19b1c2f86d38a (patch)
tree454bd63232cb2e67a17519a4df30d5db20a0f7a9 /examples
parent3bd53464371aed9c655f39d096665f9e4875ea20 (diff)
parent1a5e7171b9da383ca5f6be92b7cb6e502fd79fc4 (diff)
downloadQt-9683cf068c3f933f836dc2a5b4a19b1c2f86d38a.zip
Qt-9683cf068c3f933f836dc2a5b4a19b1c2f86d38a.tar.gz
Qt-9683cf068c3f933f836dc2a5b4a19b1c2f86d38a.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'examples')
-rw-r--r--examples/statemachine/tankgameplugins/random_ai/random_ai_plugin.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/statemachine/tankgameplugins/random_ai/random_ai_plugin.cpp b/examples/statemachine/tankgameplugins/random_ai/random_ai_plugin.cpp
index d360de9..2368608 100644
--- a/examples/statemachine/tankgameplugins/random_ai/random_ai_plugin.cpp
+++ b/examples/statemachine/tankgameplugins/random_ai/random_ai_plugin.cpp
@@ -42,13 +42,12 @@
#include "random_ai_plugin.h"
#include <QState>
+#include <QTime>
#include <QtPlugin>
-#include <time.h>
-
QState *RandomAiPlugin::create(QState *parentState, QObject *tank)
{
- qsrand(uint(time(NULL)));
+ qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
QState *topLevel = new QState(parentState);