D26062: Port to QRandomGenerator
David Faure
noreply at phabricator.kde.org
Wed Dec 18 10:56:49 GMT 2019
dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> filemonitortest.cpp:197
> {
> - int index = qrand() % possibleCharacters.length();
> + int index = QRandomGenerator::global()->bounded(possibleCharacters.length());
> QChar nextChar = possibleCharacters.at(index);
I'd suggest extracting the call to global() outside the loop. It's very likely not inline.
REPOSITORY
R293 Baloo
REVISION DETAIL
https://phabricator.kde.org/D26062
To: mlaurent, dfaure
Cc: kde-frameworks-devel, #baloo, hurikhan77, lots0logs, LeGast00n, fbampaloukas, GB_2, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191218/360def50/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list