diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-11-20 13:48:33 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-11-20 13:48:33 +0100 |
commit | bb3872d60975724a50ff910b6dd108d1944db597 (patch) | |
tree | ce1c96729a1a4691a322b36cfd5429c020403ccc /tests/auto/other/compiler/tst_compiler.cpp | |
parent | b72b5cd76004e54dc00c0f1133f4d59192ef154a (diff) | |
parent | 8e387e7fa758ded3f0d096dcf5fe13a22521dad7 (diff) |
Merge 5.10 into 5.10.0
Change-Id: Ibfbaa8ef89cf45b87a2c65f1da4a708e5464f259
Diffstat (limited to 'tests/auto/other/compiler/tst_compiler.cpp')
-rw-r--r-- | tests/auto/other/compiler/tst_compiler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/other/compiler/tst_compiler.cpp b/tests/auto/other/compiler/tst_compiler.cpp index 121d731757..8b59f2758f 100644 --- a/tests/auto/other/compiler/tst_compiler.cpp +++ b/tests/auto/other/compiler/tst_compiler.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. -** Copyright (C) 2016 Intel Corporation. +** Copyright (C) 2017 Intel Corporation. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -802,7 +802,7 @@ void tst_Compiler::cxx11_auto_type() QSKIP("Compiler does not support C++11 feature"); #else auto i = 1; - auto x = qrand(); + auto x = QRandomGenerator::global()->generate(); auto l = 1L; auto s = QStringLiteral("Hello World"); @@ -851,8 +851,8 @@ void tst_Compiler::cxx11_decltype() #ifndef Q_COMPILER_DECLTYPE QSKIP("Compiler does not support C++11 feature"); #else - decltype(qrand()) i = 0; - QCOMPARE(i, 0); + decltype(QRandomGenerator::global()->generate()) i = 0; + QCOMPARE(i, 0U); #endif } @@ -1549,7 +1549,7 @@ void tst_Compiler::runtimeArrays() #if __cpp_runtime_arrays-0 < 201304 QSKIP("Compiler does not support this C++14 feature"); #else - int i[qrand() & 0x1f]; + int i[QRandomGenerator::global()->generate() & 0x1f]; Q_UNUSED(i); #endif } |