From 82fbf979033a319beb9d079c92cd9b64b724c00c Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Wed, 14 Jun 2017 09:11:02 +0200 Subject: [PATCH] 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 --- src/corelib/global/qrandom.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp index 3ab91eee201..fb20f459b5d 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