diff options
author | Samuel Gaist <samuel.gaist@edeltech.ch> | 2017-06-14 09:11:02 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@qt.io> | 2017-08-05 16:44:55 +0000 |
commit | 82fbf979033a319beb9d079c92cd9b64b724c00c (patch) | |
tree | 450baa97edc8837e0c18e5c864fd4f667526c7cd /src/corelib/global/qrandom.cpp | |
parent | 60bfd6a2142bc15996ecadf677cb96154fece6c9 (diff) |
Doc: add warning against bulk random data creation to QRandomGenerator
The full documentation explains it well but a more prominent warning
will help avoid the wrong use of that class and encourage user to read
further the documentation.
Change-Id: I3178749f2b1b0350040f81eef253fd85c7ba0a5f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qrandom.cpp')
-rw-r--r-- | src/corelib/global/qrandom.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp index 3ab91eee20..fb20f459b5 100644 --- a/src/corelib/global/qrandom.cpp +++ b/src/corelib/global/qrandom.cpp @@ -467,9 +467,12 @@ static Q_NEVER_INLINE void fill(void *buffer, void *bufferEnd) Additionally, it provides a floating-point function getReal() that returns a number in the range [0, 1) (that is, inclusive of zero and exclusive of - 1). There's also a set of convenience functions that facilitate obtaininga + 1). There's also a set of convenience functions that facilitate obtaining a random number in a bounded, integral range. + \warning This class is not suitable for bulk data creation. See below for the + technical reasons. + \section1 Frequency and entropy exhaustion QRandomGenerator does not need to be seeded and instead uses operating system |