summaryrefslogtreecommitdiffstats
path: root/tests/auto/core/qtransform
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/core/qtransform')
-rw-r--r--tests/auto/core/qtransform/CMakeLists.txt6
-rw-r--r--tests/auto/core/qtransform/qtransform.pro9
-rw-r--r--tests/auto/core/qtransform/tst_qtransform.cpp18
3 files changed, 15 insertions, 18 deletions
diff --git a/tests/auto/core/qtransform/CMakeLists.txt b/tests/auto/core/qtransform/CMakeLists.txt
index 1d453ef9b..daa93ac75 100644
--- a/tests/auto/core/qtransform/CMakeLists.txt
+++ b/tests/auto/core/qtransform/CMakeLists.txt
@@ -9,6 +9,12 @@
## tst_qtransform Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qt3d_qtransform LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qt3d_qtransform
SOURCES
tst_qtransform.cpp
diff --git a/tests/auto/core/qtransform/qtransform.pro b/tests/auto/core/qtransform/qtransform.pro
deleted file mode 100644
index 190eab5c5..000000000
--- a/tests/auto/core/qtransform/qtransform.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-TARGET = tst_qtransform
-CONFIG += testcase
-TEMPLATE = app
-
-SOURCES += tst_qtransform.cpp
-
-QT += testlib 3dcore
-
-include(../../core/common/common.pri)
diff --git a/tests/auto/core/qtransform/tst_qtransform.cpp b/tests/auto/core/qtransform/tst_qtransform.cpp
index c7a5aa594..3b6fe93e0 100644
--- a/tests/auto/core/qtransform/tst_qtransform.cpp
+++ b/tests/auto/core/qtransform/tst_qtransform.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 <QtTest/QSignalSpy>
@@ -113,14 +113,14 @@ private Q_SLOTS:
int scale3DChangedCount = 0;
int translationChangedCount = 0;
- QObject::connect(transform.data(), &Qt3DCore::QTransform::rotationChanged, [&] { ++rotationChangedCount; });
- QObject::connect(transform.data(), &Qt3DCore::QTransform::rotationXChanged, [&] { ++rotationXChangedCount; });
- QObject::connect(transform.data(), &Qt3DCore::QTransform::rotationYChanged, [&] { ++rotationYChangedCount; });
- QObject::connect(transform.data(), &Qt3DCore::QTransform::rotationZChanged, [&] { ++rotationZChangedCount; });
- QObject::connect(transform.data(), &Qt3DCore::QTransform::matrixChanged, [&] { ++matrixChangedCount; });
- QObject::connect(transform.data(), &Qt3DCore::QTransform::scale3DChanged, [&] { ++scale3DChangedCount; });
- QObject::connect(transform.data(), &Qt3DCore::QTransform::scaleChanged, [&] { ++scaleChangedCount; });
- QObject::connect(transform.data(), &Qt3DCore::QTransform::translationChanged, [&] { ++translationChangedCount; });
+ QObject::connect(transform.data(), &Qt3DCore::QTransform::rotationChanged, this, [&] { ++rotationChangedCount; });
+ QObject::connect(transform.data(), &Qt3DCore::QTransform::rotationXChanged, this, [&] { ++rotationXChangedCount; });
+ QObject::connect(transform.data(), &Qt3DCore::QTransform::rotationYChanged, this, [&] { ++rotationYChangedCount; });
+ QObject::connect(transform.data(), &Qt3DCore::QTransform::rotationZChanged, this, [&] { ++rotationZChangedCount; });
+ QObject::connect(transform.data(), &Qt3DCore::QTransform::matrixChanged, this, [&] { ++matrixChangedCount; });
+ QObject::connect(transform.data(), &Qt3DCore::QTransform::scale3DChanged, this, [&] { ++scale3DChangedCount; });
+ QObject::connect(transform.data(), &Qt3DCore::QTransform::scaleChanged, this, [&] { ++scaleChangedCount; });
+ QObject::connect(transform.data(), &Qt3DCore::QTransform::translationChanged, this, [&] { ++translationChangedCount; });
// WHEN
transform->setRotationX(180.0f);