I'm having an error while trying to serialize my custom class. I am using the QDataStream operator << and >> in order to write and read my object.
The error occurs when I try to write or read a boolean :
error: ambiguous overload for 'operator<<' (operand types are 'QDataStream' and 'const bool')
QDataStream & operator << (QDataStream & out, const sys_settings & Value)
{
out << Value.myBool
<< Value.someString;
return out;
}
QDataStream & operator >> (QDataStream & in, sys_settings & Value)
{
in >> Value.myBool;
in >> Value.someString
return in;
}