tst_QMutex: use constexpr variables instead of 'enum-trick'
C++20 doesn't like arithmetic with enums anymore. While this hasn't caused immediate pain, yet, fix it pro-actively for an imminent patch. As a drive-by, fix the missing space at start of comment. Change-Id: Id08bb227c587bc7b900c593a7b6d2655ca32eefd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit b8966021ffb2cfddc77aee6dbe145eb74ef22f9d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
5accb5ba49
commit
8714ae353a
@ -1038,8 +1038,8 @@ void tst_QMutex::lock_unlock_locked_tryLock()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum { one_minute = 6 * 1000, //not really one minute, but else it is too long.
|
constexpr int one_minute = 6 * 1000; // not really one minute, but else it is too long.
|
||||||
threadCount = 10 };
|
constexpr int threadCount = 10;
|
||||||
|
|
||||||
class StressTestThread : public QThread
|
class StressTestThread : public QThread
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user