From 34fe5f75bcfd382b3928e221b5c9a002545fe3b9 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 23 Mar 2020 11:41:53 +0100 Subject: Deprecation warnings: replace qrand with QRandomGenerator Change-Id: I80fe6f611b367c6c8a1b77e82dc791493f88929b Reviewed-by: Timur Pocheptsov --- src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp') diff --git a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp index 82b6d60bcd..aa91d9266b 100644 --- a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp +++ b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp @@ -37,6 +37,8 @@ ** ****************************************************************************/ +#include + #include #include #include @@ -504,7 +506,7 @@ static Picture getPatternFill(int screen, const QBrush &b) return X11->pattern_fills[i].picture; } // none found, replace one - int i = qrand() % 16; + int i = QRandomGenerator::global()->generate() % 16; if (X11->pattern_fills[i].screen != screen && X11->pattern_fills[i].picture) { XRenderFreePicture (QXcbX11Info::display(), X11->pattern_fills[i].picture); -- cgit v1.2.3