Add a safe QDataStream wrapper and use it to pass data