From ed8acbeb7c6fd137486b5c8a6eec58a3b9db862c Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 30 Jul 2020 22:42:31 +0200 Subject: Automatically register data/debug stream operations in QMetaType And remove the old manual registration code for those operators. Add some special handling for long/ulong, as these types could be streamed as a QVariant so far, but are not directly streamable through QDataStream. [ChangeLog][QtCore][QMetaType] The QMetaType::registerStreamOperators() and QMetaType::registerDebugStreamOperator() methods have been removed. The streaming operators for a type are now automatically registered together with the type registration. This implies that the operators should be visible wherever the type is visible and being used. [ChangeLog][Behavior Incompatible Changes] Because the QDataStream and QDebug serialization operators are automatically registered with QMetaType, the declarations of those functions must be present at any point where the type is used with QMetaType and QVariant. Change-Id: I4a0732651b20319af4a8397ff90b848ca4580d99 Reviewed-by: Fabian Kosmale --- qmake/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'qmake') diff --git a/qmake/CMakeLists.txt b/qmake/CMakeLists.txt index 2a7549f862..2201baa06f 100644 --- a/qmake/CMakeLists.txt +++ b/qmake/CMakeLists.txt @@ -71,6 +71,7 @@ qt_add_tool(${target_name} ../src/corelib/plugin/quuid.cpp ../src/corelib/plugin/quuid.h ../src/corelib/serialization/qcborstreamwriter.cpp ../src/corelib/serialization/qcborstreamwriter.h ../src/corelib/serialization/qcborvalue.cpp ../src/corelib/serialization/qcborvalue.h ../src/corelib/serialization/qcborvalue_p.h + ../src/corelib/serialization/qdatastream.cpp ../src/corelib/serialization/qdatastream.h ../src/corelib/serialization/qjson_p.h ../src/corelib/serialization/qjsonarray.cpp ../src/corelib/serialization/qjsonarray.h ../src/corelib/serialization/qjsoncbor.cpp -- cgit v1.2.3