From 7188f8fbd1c5b08300c12c4b5f0a4d7fc3a4596b Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Fri, 11 Mar 2022 15:39:45 +0100 Subject: [PATCH] Port away from deprecated q[s]rand() methods --- src/effects/blur/blur.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/effects/blur/blur.cpp b/src/effects/blur/blur.cpp index 142aafa042..3762db4437 100644 --- a/src/effects/blur/blur.cpp +++ b/src/effects/blur/blur.cpp @@ -18,6 +18,7 @@ #include #include #include // for ceil() +#include #include #include @@ -665,7 +666,7 @@ void BlurEffect::generateNoiseTexture() } // Init randomness based on time - qsrand((uint)QTime::currentTime().msec()); + std::srand((uint)QTime::currentTime().msec()); QImage noiseImage(QSize(256, 256), QImage::Format_Grayscale8); @@ -673,7 +674,7 @@ void BlurEffect::generateNoiseTexture() uint8_t *noiseImageLine = (uint8_t *) noiseImage.scanLine(y); for (int x = 0; x < noiseImage.width(); x++) { - noiseImageLine[x] = qrand() % m_noiseStrength; + noiseImageLine[x] = std::rand() % m_noiseStrength; } }