summaryrefslogtreecommitdiffstats
path: root/examples/wayland/minimal-cpp/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/wayland/minimal-cpp/window.cpp')
-rw-r--r--examples/wayland/minimal-cpp/window.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/wayland/minimal-cpp/window.cpp b/examples/wayland/minimal-cpp/window.cpp
index 893371832..a23bba3ae 100644
--- a/examples/wayland/minimal-cpp/window.cpp
+++ b/examples/wayland/minimal-cpp/window.cpp
@@ -55,6 +55,7 @@
#include <QMatrix4x4>
#include <QOpenGLFunctions>
#include <QOpenGLTexture>
+#include <QRandomGenerator>
Window::Window()
: m_compositor(0)
@@ -74,7 +75,7 @@ static int sillyrandom(int range)
{
if (range <= 0)
range = 200;
- return qrand() % range;
+ return QRandomGenerator::bounded(range);
}
void Window::paintGL()
@@ -90,8 +91,6 @@ void Window::paintGL()
functions->glEnable(GL_BLEND);
functions->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- qsrand(31337);
-
Q_FOREACH (View *view, m_compositor->views()) {
if (view->isCursor())
continue;