From 91eec59b875b5b5f86f330a81cd5728ab84a8898 Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Tue, 16 Aug 2022 17:42:54 +0200 Subject: tst_qmetatype: port away from deprecated calls The most common changes are: * Replace QMetaType::type("name") with QMetaType::fromName("name").id() or QMetaType::fromType().id() * QMetaType::typeName(int) -> QMetaType(int).name() * QMetaType::typeFlags(int) -> QMetaType(int).flags() * QMetaType::metaObjectForType(int) -> QMetaType(int).metaObject() * The static QMetaType::{load,save} methods are replaced with non-static versions * The static QMetaType::{create,destroy,construct, destruct} methods are guarded by QT_DEPRECATED_SINCE calls. The tests are also extended with non-static calls where they were missing. Fixed potential memory-leaks in these tests. Add separate unit-tests for deprecated APIs and guard them with QT_DEPRECATED_SINCE As a drive-by: use nullptr instead of 0 in some places Task-number: QTBUG-104858 Change-Id: I4b0cdd29bc197c186b835002372240aae3098c33 Reviewed-by: Thiago Macieira --- tests/auto/corelib/kernel/qmetatype/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) (limited to 'tests/auto/corelib/kernel/qmetatype/CMakeLists.txt') diff --git a/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt b/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt index d3b565cf89..5ae87eb3a3 100644 --- a/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt +++ b/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt @@ -43,8 +43,6 @@ qt_internal_add_test(tst_qmetatype SOURCES tst_qmetatype.h tst_qmetatype.cpp tst_qmetatype2.cpp tst_qmetatype3.cpp - DEFINES - QT_DISABLE_DEPRECATED_UP_TO=0 INCLUDE_DIRECTORIES ../../../other/qvariant_common LIBRARIES -- cgit v1.2.3