summaryrefslogtreecommitdiffstats
path: root/src/testlib/removed_api.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2024-04-11 12:13:26 -0700
committerIvan Solovev <ivan.solovev@qt.io>2024-04-26 18:19:36 +0200
commitb7fb9d8150ac84cb3f02e808ed0a0b186a6a57d9 (patch)
tree80dbab6c64fff933c2939ad2a5b2c455eb520418 /src/testlib/removed_api.cpp
parenteccaf0abec8e1e9c055d409575e5a6c894879a06 (diff)
QTest: add removed_api.cpp and move deprecated functions to it
QtTest is not under the same Binary Compatibility guarantees as the other modules, but let's try and do it where it's easy. The toString() method can simply be removed from the header because it's not a member function. Its deprecation wasn't marked with a version number, so it starts now with 6.8. Change-Id: Ie28eadac333c4bcd8c08fffd17c54faca7057b9c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/testlib/removed_api.cpp')
-rw-r--r--src/testlib/removed_api.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/testlib/removed_api.cpp b/src/testlib/removed_api.cpp
new file mode 100644
index 00000000000..00a53735a08
--- /dev/null
+++ b/src/testlib/removed_api.cpp
@@ -0,0 +1,29 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// Copyright (C) 2024 Intel Corporation.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#define QT_TESTLIB_BUILD_REMOVED_API
+
+#include "qtest.h"
+
+#if QT_TESTLIB_REMOVED_SINCE(6, 8)
+
+QT_BEGIN_NAMESPACE
+
+namespace QTest {
+
+Q_TESTLIB_EXPORT char *toString(const void *p)
+{
+ const volatile void *ptr = p;
+ return toString(ptr);
+}
+
+} // namespace QTest
+
+QT_END_NAMESPACE
+
+// #include "qotherheader.h"
+// implement removed functions from qotherheader.h
+// order sections alphabetically to reduce chances of merge conflicts
+
+#endif // QT_TESTLIB_REMOVED_SINCE(6, 8)