From e112ae970b0719de8158fdc1deb281e2ee098390 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Fri, 18 Feb 2022 00:35:47 +0100 Subject: Fix build warnings --- tests/integration/test-indicator.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/integration') diff --git a/tests/integration/test-indicator.cpp b/tests/integration/test-indicator.cpp index cbf1c6d..624176a 100644 --- a/tests/integration/test-indicator.cpp +++ b/tests/integration/test-indicator.cpp @@ -1,6 +1,6 @@ /* * Copyright 2015 Canonical Ltd. - * Copyright 2021 Robert Tari + * Copyright 2021-2022 Robert Tari * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -276,8 +276,8 @@ TEST_F(TestIndicator, DISABLED_PhoneChangeRoleVolume) // Generate a random volume in the range [0...0.33] QTime now = QTime::currentTime(); - qsrand(now.msec()); - int randInt = qrand() % 33; + QRandomGenerator::global()->bounded(now.msec()); + int randInt = QRandomGenerator::global()->generate() % 33; const double randomVolume = randInt / 100.0; QSignalSpy &userAccountsSpy = *signal_spy_volume_changed_; @@ -1412,8 +1412,8 @@ TEST_F(TestIndicator, DISABLED_DesktopChangeRoleVolume) // Generate a random volume in the range [0...0.33] QTime now = QTime::currentTime(); - qsrand(now.msec()); - int randInt = qrand() % 33; + QRandomGenerator::global()->bounded(now.msec()); + int randInt = QRandomGenerator::global()->generate() % 33; const double randomVolume = randInt / 100.0; // play a test sound, it should NOT change the role in the indicator -- cgit v1.2.3