A Message Factory in C++ / Qt5