diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-06-09 10:32:05 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-06-09 10:32:05 (GMT) |
commit | 2de2018a33ea45b32963378bb4f7ef24cd181485 (patch) | |
tree | 995af09686cb0dc486355ada41015c017fc63050 | |
parent | d826a08add652314bb22bee44e0d43bbd672f272 (diff) | |
download | Qt-2de2018a33ea45b32963378bb4f7ef24cd181485.zip Qt-2de2018a33ea45b32963378bb4f7ef24cd181485.tar.gz Qt-2de2018a33ea45b32963378bb4f7ef24cd181485.tar.bz2 |
WinCE doesn't have time() function, use QTime
-rw-r--r-- | examples/statemachine/tankgameplugins/random_ai/random_ai_plugin.cpp | 5 |
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); |