summaryrefslogtreecommitdiffstats
path: root/src/gvcore/slideshow.cpp
diff options
context:
space:
mode:
authorAlexander Golubev <[email protected]>2024-02-25 04:49:11 +0300
committerMichele Calgaro <[email protected]>2024-03-08 10:37:19 +0900
commitf9cd02afd1dd2fda167df0dbb3a7347b999e4517 (patch)
treea9be09925577f8f6bcbf5f70a4e8ecbde68e19d8 /src/gvcore/slideshow.cpp
parente00293c122b5f29d0790e6edcbdffc49e3449df9 (diff)
downloadgwenview-f9cd02afd1dd2fda167df0dbb3a7347b999e4517.tar.gz
gwenview-f9cd02afd1dd2fda167df0dbb3a7347b999e4517.zip
Suppress several warnings
Signed-off-by: Alexander Golubev <[email protected]> (cherry picked from commit 430301a436a5526961c95810cd1d9057956a6d08)
Diffstat (limited to 'src/gvcore/slideshow.cpp')
-rw-r--r--src/gvcore/slideshow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gvcore/slideshow.cpp b/src/gvcore/slideshow.cpp
index e8867ad..d6a4799 100644
--- a/src/gvcore/slideshow.cpp
+++ b/src/gvcore/slideshow.cpp
@@ -20,6 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// STL
#include <algorithm>
+#include <random>
// TQt
#include <tqtimer.h>
@@ -82,7 +83,8 @@ void SlideShow::start(const KURL::List& urls) {
mURLs.resize(urls.size());
tqCopy(urls.begin(), urls.end(), mURLs.begin());
if (SlideShowConfig::random()) {
- std::random_shuffle(mURLs.begin(), mURLs.end());
+ std::random_device rd;
+ std::shuffle(mURLs.begin(), mURLs.end(), std::mt19937(rd()));
}
mStartIt=tqFind(mURLs.begin(), mURLs.end(), mDocument->url());