aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlanybinding
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlanybinding')
-rw-r--r--tests/auto/qml/qqmlanybinding/CMakeLists.txt6
-rw-r--r--tests/auto/qml/qqmlanybinding/tst_qqmlanybinding.cpp4
-rw-r--r--tests/auto/qml/qqmlanybinding/withbindable.h2
3 files changed, 9 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmlanybinding/CMakeLists.txt b/tests/auto/qml/qqmlanybinding/CMakeLists.txt
index 8cdecae3a8..f80acd8187 100644
--- a/tests/auto/qml/qqmlanybinding/CMakeLists.txt
+++ b/tests/auto/qml/qqmlanybinding/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qqmlanybinding Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qqmlanybinding LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
# Collect test data
file(GLOB_RECURSE test_data_glob
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
diff --git a/tests/auto/qml/qqmlanybinding/tst_qqmlanybinding.cpp b/tests/auto/qml/qqmlanybinding/tst_qqmlanybinding.cpp
index 9e2ba24969..7e0a1c659a 100644
--- a/tests/auto/qml/qqmlanybinding/tst_qqmlanybinding.cpp
+++ b/tests/auto/qml/qqmlanybinding/tst_qqmlanybinding.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2021 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 <QtQml/QQmlEngine>
#include <QtQml/QQmlComponent>
#include <QtCore/QScopedPointer>
@@ -39,7 +39,7 @@ static int getRefCount(const QQmlAnyBinding &binding)
} else {
// this temporarily adds a refcount because we construc a new untypedpropertybinding
// thus -1
- return QPropertyBindingPrivate::get(binding.asUntypedPropertyBinding())->ref - 1;
+ return QPropertyBindingPrivate::get(binding.asUntypedPropertyBinding())->refCount() - 1;
}
}
diff --git a/tests/auto/qml/qqmlanybinding/withbindable.h b/tests/auto/qml/qqmlanybinding/withbindable.h
index 0672532344..322459f991 100644
--- a/tests/auto/qml/qqmlanybinding/withbindable.h
+++ b/tests/auto/qml/qqmlanybinding/withbindable.h
@@ -1,5 +1,5 @@
// Copyright (C) 2021 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
#ifndef WITH_BINDABLE_H
#define WITH_BINDABLE_H