summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp')
-rw-r--r--tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp45
1 files changed, 10 insertions, 35 deletions
diff --git a/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp b/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp
index 876c18c721..b4e6b45dbd 100644
--- a/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp
+++ b/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp
@@ -1,32 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtTest/QtTest>
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include <QTest>
#include <QCoreApplication>
#include <QWriteLocker>
@@ -73,7 +48,7 @@ void tst_QWriteLocker::scopeTest()
class ScopeTestThread : public tst_QWriteLockerThread
{
public:
- void run()
+ void run() override
{
waitForTest();
@@ -109,7 +84,7 @@ void tst_QWriteLocker::scopeTest()
QVERIFY(thread->wait());
delete thread;
- thread = 0;
+ thread = nullptr;
}
@@ -118,7 +93,7 @@ void tst_QWriteLocker::unlockAndRelockTest()
class UnlockAndRelockThread : public tst_QWriteLockerThread
{
public:
- void run()
+ void run() override
{
QWriteLocker locker(&lock);
@@ -156,7 +131,7 @@ void tst_QWriteLocker::unlockAndRelockTest()
QVERIFY(thread->wait());
delete thread;
- thread = 0;
+ thread = nullptr;
}
void tst_QWriteLocker::lockerStateTest()
@@ -164,7 +139,7 @@ void tst_QWriteLocker::lockerStateTest()
class LockerStateThread : public tst_QWriteLockerThread
{
public:
- void run()
+ void run() override
{
{
QWriteLocker locker(&lock);
@@ -196,7 +171,7 @@ void tst_QWriteLocker::lockerStateTest()
QVERIFY(thread->wait());
delete thread;
- thread = 0;
+ thread = nullptr;
}
QTEST_MAIN(tst_QWriteLocker)