summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/nativepainting/qxcbnativepainting.cpp
diff options
context:
space:
mode:
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);