[Development] qsrand(31415) int qt3d

Mülner, Helmut helmut.muelner at joanneum.at
Thu Aug 2 14:52:52 CEST 2012


 *   Done:  Qt<https://bugreports.qt-project.org/browse/QTBUG>/ QTBUG-26744<https://bugreports.qt-project.org/browse/QTBUG-26744>
Best regards
Helmut

Von: mitch.curtis at nokia.com [mailto:mitch.curtis at nokia.com]
Gesendet: Donnerstag, 02. August 2012 14:46
An: Mülner, Helmut
Betreff: RE: qsrand(31415) int qt3d

Hi Helmut.

You should create a bug report in Jira if you haven't already: https://bugreports.qt-project.org

Cheers.
________________________________
From: development-bounces+mitch.curtis=nokia.com at qt-project.org<mailto:development-bounces+mitch.curtis=nokia.com at qt-project.org> [development-bounces+mitch.curtis=nokia.com at qt-project.org] on behalf of ext Mülner, Helmut [helmut.muelner at joanneum.at]
Sent: 02 August 2012 14:33
To: development at qt-project.org<mailto:development at qt-project.org>
Subject: [Development] qsrand(31415) int qt3d
I already sent this to the qt3d mailing list, but nobody reacts on this list (maybe due to the Bisbane situation):

qglsection.cpp contains the following lines in the method QGLSectionPrivate::mapVertex:

        static bool seeded = false;
        if (!seeded)
            qsrand(31415);

This makes the random number generator not very random!
The tank example uses the usual qsrand(time(0)) which is superseded by qsrand(31415).
Therefore the colors are always the same, when one starts the programs.

I think these lines can and should be removed.

I have no(t yet) access to gerrit, so could someone push this change?
Thank you
--
Helmut Mülner
DIGITAL - Institute of Information and Communication Technologies

JOANNEUM RESEARCH Forschungsgesellschaft mbH
Steyrergasse 17, 8010 Graz, AUSTRIA

phone:  +43-316-876-2612
general fax: +43-316-876-1191
web:    http://www.joanneum.at/digital
e-mail: helmut.mülner at joanneum.at<mailto:helmut.mülner at joanneum.at>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120802/c50824ab/attachment.html>


More information about the Development mailing list