Commit 51441cd3 authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

Port away from deprecated qrand()

parent 7f34c8cb
......@@ -18,6 +18,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <QRandomGenerator>
#include <QTest>
#include <QSignalSpy>
#include <QTimer>
......@@ -450,9 +451,9 @@ void KFileItemModelTest::testModelConsistencyWhenInsertingItems()
itemsInsertedSpy.clear();
for (int j = 0; j < 10; ++j) {
int itemName = qrand();
int itemName = QRandomGenerator::global()->generate();
while (insertedItems.contains(itemName)) {
itemName = qrand();
itemName = QRandomGenerator::global()->generate();
}
insertedItems.insert(itemName);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment