qt5base-lts/examples/widgets
Thiago Macieira 19b0ce5daa Change almost all other uses of qrand() to QRandomGenerator
The vast majority is actually switched to QRandomGenerator::bounded(),
which gives a mostly uniform distribution over the [0, bound)
range. There are very few floating point cases left, as many of those
that did use floating point did not need to, after all. (I did leave
some that were too ugly for me to understand)

This commit also found a couple of calls to rand() instead of qrand().

This commit does not include changes to SSL code that continues to use
qrand() (job for someone else):
  src/network/ssl/qsslkey_qt.cpp
  src/network/ssl/qsslsocket_mac.cpp
  tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp

Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-08 09:14:03 +00:00
..
animation Change almost all other uses of qrand() to QRandomGenerator 2017-11-08 09:14:03 +00:00
desktop Merge remote-tracking branch 'origin/5.8' into dev 2017-01-25 20:06:06 +01:00
dialogs examples: remove wince leftovers 2017-09-22 19:22:07 +00:00
doc Change almost all other uses of qrand() to QRandomGenerator 2017-11-08 09:14:03 +00:00
draganddrop Change almost all other uses of qrand() to QRandomGenerator 2017-11-08 09:14:03 +00:00
effects Use qRadiansToDegrees() and qDegreesToRadians() more widely 2017-07-05 10:15:34 +00:00
gestures Examples: Replace 'Q_DECL_OVERRIDE' by 'override' 2016-06-15 09:32:30 +00:00
graphicsview Change almost all other uses of qrand() to QRandomGenerator 2017-11-08 09:14:03 +00:00
itemviews Change almost all other uses of qrand() to QRandomGenerator 2017-11-08 09:14:03 +00:00
layouts Examples: Replace 'Q_DECL_OVERRIDE' by 'override' 2016-06-15 09:32:30 +00:00
mac macOS: Make QMacNativeWidget example more usable 2017-02-12 12:29:55 +00:00
mainwindows Change almost all other uses of qrand() to QRandomGenerator 2017-11-08 09:14:03 +00:00
painting Merge remote-tracking branch 'origin/5.9' into dev 2017-07-13 16:36:10 -07:00
richtext Convert features.printdialog to QT_[REQUIRE_]CONFIG 2017-05-30 17:21:26 +00:00
scroller Examples: Replace 'Q_DECL_OVERRIDE' by 'override' 2016-06-15 09:32:30 +00:00
statemachine Change almost all other uses of qrand() to QRandomGenerator 2017-11-08 09:14:03 +00:00
tools Change almost all other uses of qrand() to QRandomGenerator 2017-11-08 09:14:03 +00:00
tutorials Tutorial: migrate addressbook tutorial to use QRegularExpression 2017-01-24 07:24:13 +00:00
widgets Change almost all other uses of qrand() to QRandomGenerator 2017-11-08 09:14:03 +00:00
windowcontainer Examples: Replace 'Q_DECL_OVERRIDE' by 'override' 2016-06-15 09:32:30 +00:00
widgets.pro examples: fix compile without gui module 2017-05-05 06:54:15 +00:00