summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-10 12:06:56 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-10 12:06:56 (GMT)
commitef0a51654783f942499cfa9fca60d18c2fa6a702 (patch)
tree1fd8158f883562a3ef000b0a4d26df5b1f064dae /examples
parent53632d45ca64ad4c20d4302e0826c0234877dd69 (diff)
parent62725a02652cee576efe055d1371765945045026 (diff)
downloadQt-ef0a51654783f942499cfa9fca60d18c2fa6a702.zip
Qt-ef0a51654783f942499cfa9fca60d18c2fa6a702.tar.gz
Qt-ef0a51654783f942499cfa9fca60d18c2fa6a702.tar.bz2
Merge commit 'qt-mainline/master' into master-recursivepaint
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);