-QDataStream &operator>>(QDataStream &in, BufferInfo &bufferInfo) {
- QByteArray buffername;
- qint16 bufferType;
- in >> bufferInfo._bufferId >> bufferInfo._netid >> bufferType >> bufferInfo._groupId >> buffername;
- bufferInfo._type = (BufferInfo::Type)bufferType;
- bufferInfo._bufferName = QString::fromUtf8(buffername);
- return in;
+
+QDataStream &operator<<(QDataStream &out, const BufferInfo &bufferInfo)
+{
+ out << bufferInfo._bufferId << bufferInfo._netid << (qint16)bufferInfo._type << bufferInfo._groupId << bufferInfo._bufferName.toUtf8();
+ return out;