diff options
Diffstat (limited to 'src/corelib/global/qrandom.h')
-rw-r--r-- | src/corelib/global/qrandom.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/global/qrandom.h b/src/corelib/global/qrandom.h index e6fd4f02de..c25a0ad643 100644 --- a/src/corelib/global/qrandom.h +++ b/src/corelib/global/qrandom.h @@ -156,6 +156,7 @@ public: static inline QRandomGenerator *system(); static inline QRandomGenerator *global(); + static inline QRandomGenerator securelySeeded(); protected: enum System {}; @@ -222,6 +223,7 @@ public: static Q_DECL_CONSTEXPR result_type max() { return (std::numeric_limits<result_type>::max)(); } static Q_CORE_EXPORT QRandomGenerator64 *system(); static Q_CORE_EXPORT QRandomGenerator64 *global(); + static Q_CORE_EXPORT QRandomGenerator64 securelySeeded(); #endif // Q_QDOC }; @@ -235,6 +237,11 @@ inline QRandomGenerator *QRandomGenerator::global() return QRandomGenerator64::global(); } +QRandomGenerator QRandomGenerator::securelySeeded() +{ + return QRandomGenerator64::securelySeeded(); +} + QT_END_NAMESPACE #endif // QRANDOM_H |