D26060: Port to QRandomGenerator (qrand was deprecated in qt5.15)
David Faure
noreply at phabricator.kde.org
Wed Dec 18 09:37:35 GMT 2019
dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> kfiltertest.cpp:102
> for (int i = 0; i < 8170; ++i) {
> - data.append((char)(qrand() % 256));
> }
Better move the QRandomGenerator::global() out of the loop, to avoid calling it 8170 times.
> kfiltertest.cpp:117
>
> - data.append((char)(qrand() % 256));
> + data.append((char)(QRandomGenerator::global()->bounded(256)));
> }
(same)
REVISION DETAIL
https://phabricator.kde.org/D26060
To: mlaurent, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191218/812c34fd/attachment.html>
More information about the Kde-frameworks-devel
mailing list