summaryrefslogtreecommitdiffstats
path: root/tests/auto/concurrent/qtconcurrenttask
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/concurrent/qtconcurrenttask')
-rw-r--r--tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt11
-rw-r--r--tests/auto/concurrent/qtconcurrenttask/tst_qtconcurrenttask.cpp4
2 files changed, 11 insertions, 4 deletions
diff --git a/tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt b/tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt
index 60f5cb47e3..89226eaacc 100644
--- a/tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt
+++ b/tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt
@@ -1,12 +1,19 @@
-# Generated from qtconcurrenttask.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## tst_qtconcurrenttask Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qtconcurrenttask LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qtconcurrenttask
SOURCES
tst_qtconcurrenttask.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Concurrent
)
diff --git a/tests/auto/concurrent/qtconcurrenttask/tst_qtconcurrenttask.cpp b/tests/auto/concurrent/qtconcurrenttask/tst_qtconcurrenttask.cpp
index 114d899e1d..d570b0f974 100644
--- a/tests/auto/concurrent/qtconcurrenttask/tst_qtconcurrenttask.cpp
+++ b/tests/auto/concurrent/qtconcurrenttask/tst_qtconcurrenttask.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2020 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <qtconcurrenttask.h>
@@ -32,7 +32,7 @@ void tst_QtConcurrentTask::taskWithFreeFunction()
{
QVariant value(42);
- auto result = task(&qvariant_cast<int>)
+ auto result = task([](const QVariant &var){ return qvariant_cast<int>(var); })
.withArguments(value)
.spawn()
.result();