Allow constructing a null variant from a meta type
Add a default argument for the data pointer, so one can construct a null variant of a certain metatype. This is meant to help replace the QVariant(Type) constructor that will get deprecated. Change-Id: If75a1491ffcaa82d28eb5a7efb547da0ef1f2a87 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
ad80d57635
commit
5f552e7b96
@ -209,7 +209,7 @@ class Q_CORE_EXPORT QVariant
|
||||
~QVariant();
|
||||
QVariant(Type type);
|
||||
QVariant(int typeId, const void *copy, uint flags = 0); // ### Qt6 TODO deprecate
|
||||
explicit QVariant(QMetaType type, const void *copy);
|
||||
explicit QVariant(QMetaType type, const void *copy = nullptr);
|
||||
QVariant(const QVariant &other);
|
||||
|
||||
#ifndef QT_NO_DATASTREAM
|
||||
|
Loading…
Reference in New Issue
Block a user