From 45ed28a9d3790707b18798454d976f3a818a7740 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 3 Apr 2020 20:58:30 +0200 Subject: Remove QRegExp from QVariant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an operator QVariant() to QRegExp to keep things at source compatible as possible. Add a hack to QVariant::load/save() to recognize the old typeid for QRegExp and stream them correctly as long as the streaming operators for QRegExp are registered. Also move the datastream test for QRegExp to tst_qregexp, and adjust it to the qvariant changes. Change-Id: I120b38a7541b43ec07a21b17f7f35c55f071eb75 Reviewed-by: Fabian Kosmale Reviewed-by: MÃ¥rten Nordheim --- tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h | 10 ---------- tests/auto/corelib/kernel/qmetatype/typeFlags.bin | Bin 158 -> 106 bytes 2 files changed, 10 deletions(-) (limited to 'tests/auto/corelib/kernel/qmetatype') diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h index 22bcb69ac9..bf01fdcfcd 100644 --- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h +++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h @@ -223,16 +223,6 @@ template<> struct TestValueFactory { template<> struct TestValueFactory { static std::nullptr_t *create() { return new std::nullptr_t; } }; -template<> struct TestValueFactory { - static QRegExp *create() - { -#ifndef QT_NO_REGEXP - return new QRegExp("A*"); -#else - return 0; -#endif - } -}; template<> struct TestValueFactory { static QRegularExpression *create() { diff --git a/tests/auto/corelib/kernel/qmetatype/typeFlags.bin b/tests/auto/corelib/kernel/qmetatype/typeFlags.bin index 0aa282efc9..35d922a85c 100644 Binary files a/tests/auto/corelib/kernel/qmetatype/typeFlags.bin and b/tests/auto/corelib/kernel/qmetatype/typeFlags.bin differ -- cgit v1.2.3