summaryrefslogtreecommitdiffstats
path: root/tests/auto/core/qentity
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/core/qentity')
-rw-r--r--tests/auto/core/qentity/CMakeLists.txt6
-rw-r--r--tests/auto/core/qentity/qentity.pro7
-rw-r--r--tests/auto/core/qentity/tst_qentity.cpp4
3 files changed, 8 insertions, 9 deletions
diff --git a/tests/auto/core/qentity/CMakeLists.txt b/tests/auto/core/qentity/CMakeLists.txt
index 7f308aa67..73cc81b7a 100644
--- a/tests/auto/core/qentity/CMakeLists.txt
+++ b/tests/auto/core/qentity/CMakeLists.txt
@@ -7,6 +7,12 @@
## tst_qentity Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qentity LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qentity
SOURCES
tst_qentity.cpp
diff --git a/tests/auto/core/qentity/qentity.pro b/tests/auto/core/qentity/qentity.pro
deleted file mode 100644
index 175c6d3c8..000000000
--- a/tests/auto/core/qentity/qentity.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TARGET = tst_qentity
-CONFIG += testcase
-TEMPLATE = app
-
-SOURCES += tst_qentity.cpp
-
-QT += testlib 3dcore 3dcore-private core-private
diff --git a/tests/auto/core/qentity/tst_qentity.cpp b/tests/auto/core/qentity/tst_qentity.cpp
index 7f5bddea2..eb1b03f43 100644
--- a/tests/auto/core/qentity/tst_qentity.cpp
+++ b/tests/auto/core/qentity/tst_qentity.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
-// 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 <QtTest/QTest>
#include <Qt3DCore/qentity.h>
@@ -586,7 +586,7 @@ void tst_Entity::checkComponentBookkeeping()
// WHEN
int sigCount = 0;
QObject *sigSender = comp.data();
- connect(comp.data(), &QComponent::removedFromEntity, [&sigCount, sigSender](QEntity *) {
+ connect(comp.data(), &QComponent::removedFromEntity, this, [&sigCount, sigSender](QEntity *) {
QComponent *c = qobject_cast<QComponent *>(sigSender);
if (sigSender && c)
sigCount++; // test the sender is still a QComponent when signal is emitted