I also noticed that you write quint32, QString, quint32 and then shot.toImage().

Qt Code:
  1. streamOut << quint32(Data::PluginData) << pluginName << quint32(ProgramViewerMenu::NewImage) << shot.toImage();
To copy to clipboard, switch view to plain text mode 

But when you read, you read quint32, QString, quint32 and quint32.

Does shot.toImage() returns quint32?