From b3c0e9afa0041d4d45e47880732deda1dd1013b9 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Mon, 9 Dec 2019 23:51:46 +0100 Subject: Deprecate qrand/qsrand They have been marked as deprecated in the documentation for a while Change-Id: Ia2b0b6dbd4c525e3e9c4bc835eee2c9da5a938cb Reviewed-by: Thiago Macieira --- src/corelib/global/qglobal.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index e335916eac..861f087c60 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1266,8 +1266,10 @@ inline int qIntCast(float f) { return int(f); } /* Reentrant versions of basic rand() functions for random number generation */ -Q_CORE_EXPORT void qsrand(uint seed); -Q_CORE_EXPORT int qrand(); +#if QT_DEPRECATED_SINCE(5, 15) +Q_CORE_EXPORT QT_DEPRECATED_VERSION_X_5_15("use QRandomGenerator instead") void qsrand(uint seed); +Q_CORE_EXPORT QT_DEPRECATED_VERSION_X_5_15("use QRandomGenerator instead") int qrand(); +#endif #define QT_MODULE(x) -- cgit v1.2.3