diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-03-23 11:41:53 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-03-23 20:24:58 +0100 |
commit | 34fe5f75bcfd382b3928e221b5c9a002545fe3b9 (patch) | |
tree | a72357b627c2f3025a937963b67bb9074ab116cb /src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp | |
parent | 3f744be923d209d9507962952df5e0e0c3744b02 (diff) |
Deprecation warnings: replace qrand with QRandomGenerator
Change-Id: I80fe6f611b367c6c8a1b77e82dc791493f88929b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/nativepainting/qpaintengine_x11.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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 <QtCore/qrandom.h> + #include <private/qpixmapcache_p.h> #include <private/qpaintengine_p.h> #include <private/qpolygonclipper_p.h> @@ -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); |