Commit 54d7d7a9 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Fix nested Command (de)serialization

parent b7370915
......@@ -155,13 +155,15 @@ QDebug operator<<(QDebug _dbg, Command::Type type)
template<typename T>
DataStream &operator<<(DataStream &stream, const QSharedPointer<T> &ptr)
{
return stream << *ptr;
Protocol::serialize(stream.device(), ptr);
return stream;
}
template<typename T>
DataStream &operator>>(DataStream &stream, QSharedPointer<T> &ptr)
{
return stream >> *ptr;
ptr = Protocol::deserialize(stream.device()).staticCast<T>();
return stream;
}
/******************************************************************************/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment