Skip to content

Commit b3c0e9a

Browse files
committed
Deprecate qrand/qsrand
They have been marked as deprecated in the documentation for a while Change-Id: Ia2b0b6dbd4c525e3e9c4bc835eee2c9da5a938cb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
1 parent 3e9895f commit b3c0e9a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/corelib/global/qglobal.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,8 +1266,10 @@ inline int qIntCast(float f) { return int(f); }
12661266
/*
12671267
Reentrant versions of basic rand() functions for random number generation
12681268
*/
1269-
Q_CORE_EXPORT void qsrand(uint seed);
1270-
Q_CORE_EXPORT int qrand();
1269+
#if QT_DEPRECATED_SINCE(5, 15)
1270+
Q_CORE_EXPORT QT_DEPRECATED_VERSION_X_5_15("use QRandomGenerator instead") void qsrand(uint seed);
1271+
Q_CORE_EXPORT QT_DEPRECATED_VERSION_X_5_15("use QRandomGenerator instead") int qrand();
1272+
#endif
12711273

12721274
#define QT_MODULE(x)
12731275

0 commit comments

Comments
 (0)