On Thu, April 28, 2016 00:18:05 Frederik Schwarzer wrote: > Am 27.04.2016 23:45 schrieb Albert Astals Cid: > > El dimecres, 27 d’abril de 2016, a les 11:42:46 CEST, Frederik Schwarzer va escriure: > >> Since I am neither a core developer (just maintaining a game which was > >> beaten by the consequences of this issue) nor a crypto guy, I cannot > >> really assess the severity of such a regression but my first thoughts > >> were: > >> - why is there no unit test cathing this? > > > > Because noone wrote one (obvious answer) > > Yes, of course that's the obvious answer. :) > I asked because the answer could have been something along the lines of > "because KRandom is old; do not use it; we have something new in > frameworks" or so.
It *is* old. In fact I seriously think we should declare KRandom's functions as deprecated now and remove it for KF6, in favor of C++'s own native support from random numbers after C++11. We could probably say the same for KRandomSequence but that one at least has a few extra features for things like games. But even that could be built on C++11 features and perhaps moved to libkdegames instead in the future, and then removed from KCoreAddons after KF5. Anyways, I have carried the 'patches welcome' spirit going by submitting a patch that adds a unit test for KRandom and KRandomSequence. I am not sure if autotests require review like code changes do but just in case it is on RR at https://git.reviewboard.kde.org/r/127778/ Regards, - Michael Pyne