diff --git a/src/corelib/doc/snippets/code/src_corelib_global_qrandom.cpp b/src/corelib/doc/snippets/code/src_corelib_global_qrandom.cpp index 6e47a7a3d9..0dc47f2370 100644 --- a/src/corelib/doc/snippets/code/src_corelib_global_qrandom.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_global_qrandom.cpp @@ -97,12 +97,12 @@ //! [9] QVector vector; vector.resize(16); - QRandomGenerator::fillRange(vector.data(), vector.size()); + QRandomGenerator::global()->fillRange(vector.data(), vector.size()); //! [9] //! [10] quint32 array[2]; - QRandomGenerator::fillRange(array); + QRandomGenerator::global()->fillRange(array); //! [10] //! [11] @@ -115,11 +115,11 @@ //! [12] //! [13] - quint32 v = QRandomGenerator::bounded(256); + quint32 v = QRandomGenerator::global()->bounded(256); //! [13] //! [14] - quint32 v = QRandomGenerator::bounded(1000, 2000); + quint32 v = QRandomGenerator::global()->bounded(1000, 2000); //! [14] //! [15]