From d2e4bab5f8d004ccbd99f0c4eef0f3631d3331d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20A=2E=20Fern=C3=A1ndez?= Date: Sun, 27 May 2012 17:32:49 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20a=20compilaci=C3=B3n=20win32?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/aqods/odf-gen/color.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/aqods/odf-gen/color.h b/tools/aqods/odf-gen/color.h index 0a355006..e0290257 100644 --- a/tools/aqods/odf-gen/color.h +++ b/tools/aqods/odf-gen/color.h @@ -99,7 +99,11 @@ class ColorGenerator ColorGenerator() : _idx( 0 ) { +#if defined(Q_OS_WIN) + srand( time( NULL ) ); +#else srandom( time( NULL ) ); +#endif } Color next() @@ -109,8 +113,11 @@ class ColorGenerator if( _idx < sizeof(palette) / sizeof(palette[0]) ) return Color( palette[_idx++] ); - +#if defined(Q_OS_WIN) + return Color( rand() ); +#else return Color( random() ); +#endif } private: