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:
parent
0161f00e50
commit
02dfec9209
@ -538,17 +538,6 @@ QVariant::QVariant(const QVariant &p)
|
|||||||
t.construct(&d, p.constData());
|
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)
|
\fn QVariant::QVariant(const QString &val)
|
||||||
|
|
||||||
|
@ -177,10 +177,6 @@ class Q_CORE_EXPORT QVariant
|
|||||||
explicit QVariant(QMetaType type, const void *copy = nullptr);
|
explicit QVariant(QMetaType type, const void *copy = nullptr);
|
||||||
QVariant(const QVariant &other);
|
QVariant(const QVariant &other);
|
||||||
|
|
||||||
#ifndef QT_NO_DATASTREAM
|
|
||||||
explicit QVariant(QDataStream &s);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QVariant(int i);
|
QVariant(int i);
|
||||||
QVariant(uint ui);
|
QVariant(uint ui);
|
||||||
QVariant(qlonglong ll);
|
QVariant(qlonglong ll);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user