Remove QVariant(QDataStream) constructor

The constructor wasn't constructing a QVariant holding a
QDataStream, bug loading the variant from the datastream.

This is opposed to how QDataStream works in all other places,
and also not in line with all other constructors for QVariant.

[ChangeLog][QtCore][QVariant] Removed the QVariant(QDataStream)
constructor. Use QVariant().load(datastream) instead.

Change-Id: I6ac54e12166b9383c09c3940eef2516f896fd359
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Lars Knoll 2020-07-29 15:04:23 +02:00
parent 0161f00e50
commit 02dfec9209
2 changed files with 0 additions and 15 deletions

View File

@ -538,17 +538,6 @@ QVariant::QVariant(const QVariant &p)
t.construct(&d, p.constData());
}
#ifndef QT_NO_DATASTREAM
/*!
Reads the variant from the data stream, \a s.
*/
QVariant::QVariant(QDataStream &s)
{
d.is_null = true;
s >> *this;
}
#endif //QT_NO_DATASTREAM
/*!
\fn QVariant::QVariant(const QString &val)

View File

@ -177,10 +177,6 @@ class Q_CORE_EXPORT QVariant
explicit QVariant(QMetaType type, const void *copy = nullptr);
QVariant(const QVariant &other);
#ifndef QT_NO_DATASTREAM
explicit QVariant(QDataStream &s);
#endif
QVariant(int i);
QVariant(uint ui);
QVariant(qlonglong ll);