MantisBT - Doomseeker
View Issue Details
0004083Doomseeker[All Projects] Cleanuppublic2023-01-04 20:462023-02-21 09:27
Zalewa 
 
lowminorN/A
newopen 
1.3.3 
1.5.0 
0004083: qrand() is deprecated
Doomseeker uses qrand() in its refresher code and in the fake plugin. The compiler complains that it's deprecated.
The equivalent replacement seems to be QRandomGenerator::global()->generate(), but QRandomGenerator was added in Qt 5.10. I still need to build against Qt 5.7. We could also use our own Random class which is also a part of the Plugin API.
No tags attached.
Issue History
2023-01-04 20:46ZalewaNew Issue
2023-01-05 13:09Pol MNote Added: 0022669
2023-01-05 13:17Pol MNote Edited: 0022669bug_revision_view_page.php?bugnote_id=22669#r13883
2023-01-06 00:08ZalewaNote Added: 0022676
2023-01-25 22:00ZalewaTarget Version => 1.5.0
2023-02-21 09:27Blzut3Note Added: 0022779

Notes
(0022669)
Pol M   
2023-01-05 13:09   
(edited on: 2023-01-05 13:17)
I'd use a xoshiro generator:
'https://prng.di.unimi.it/ [^]'
They are trivial to implement, statistically good enough for our use case, and are performant.

(0022676)
Zalewa   
2023-01-06 00:08   
That's good to know, but I think we'll be fine with the C++ random generator as already used in our Random class.
(0022779)
Blzut3   
2023-02-21 09:27   
Noticed Qt 6 compile was broken, so did a quick work around for that specific scenario (does not resolve this ticket):'https://bitbucket.org/Doomseeker/doomseeker/commits/437631fda5d2e719c5fe2949d91af26441d94d9b [^]'