mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
ensure the type name is streamed as QByteArray in QVariant::save()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
7f04979b7e
commit
35f05e0d94
2 changed files with 5 additions and 1 deletions
|
@ -107,6 +107,10 @@ public:
|
|||
int skipRawData(int len);
|
||||
|
||||
private:
|
||||
// ASCII is ambiguous, write either QString or QByteArray
|
||||
QDataStream &operator<<(const char *str);
|
||||
QDataStream &operator>>(char *&str);
|
||||
|
||||
Q_DISABLE_COPY(QDataStream)
|
||||
|
||||
QIODevice *dev;
|
||||
|
|
|
@ -1687,7 +1687,7 @@ void QVariant::save(QDataStream &s) const
|
|||
s << tp;
|
||||
s << qint8(d_ptr ? d_ptr->is_null : true);
|
||||
if (tp == QVariant::UserType) {
|
||||
s << QMetaType::typeName(userType());
|
||||
s << QByteArray(QMetaType::typeName(userType()));
|
||||
}
|
||||
|
||||
if (!isValid()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue