summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-03-23 11:41:53 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-03-23 20:24:58 +0100
commit34fe5f75bcfd382b3928e221b5c9a002545fe3b9 (patch)
treea72357b627c2f3025a937963b67bb9074ab116cb /src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.cpp
parent3f744be923d209d9507962952df5e0e0c3744b02 (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/qxcbnativepainting.cpp')
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.cpp b/src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.cpp
index 57b1882e4b..6a483fc7e5 100644
--- a/src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.cpp
+++ b/src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.cpp
@@ -37,6 +37,8 @@
**
****************************************************************************/
+#include <QtCore/qrandom.h>
+
#include "qxcbconnection.h"
#include "qcolormap_x11_p.h"
#include "qxcbnativepainting.h"
@@ -279,7 +281,7 @@ Picture QXcbX11Data::getSolidFill(int screen, const QColor &c)
return X11->solid_fills[i].picture;
}
// none found, replace one
- int i = qrand() % 16;
+ int i = QRandomGenerator::global()->generate() % 16;
if (X11->solid_fills[i].screen != screen && X11->solid_fills[i].picture) {
XRenderFreePicture (X11->display, X11->solid_fills[i].picture);