In Qt 4/5 it is possible connect classes methods in such way:
connect(ObjectPointer1, SIGNAL(methodOfObject1()), ObjectPointer2, SLOT(methodOfObject2());
and when you call this method -> ObjectPointer1->methodOfObject1() method of ObjectPointer2->methodOfObject2() will be called automatically.
The only problem that you can check of correctness of method name and its argument only
at runtime (more details can be found here http://doc.qt.io/qt-4.8/signalsandslots.html).
So I implement this checker to help re factoring large Qt based projects.
Note: Qt 4 have only such method to connect signals and slots.
Qt 5 uses two methods, described above and based on function pointers, but because of SIGNAL/SLOT syntax with disadvantages
have also advantages (see http://doc.qt.io/qt-5/signalsandslots-syntaxes.html) sometime Qt5 also
have not compile time checked signal/slot connection.
What this checker do exactly:
1)It checks that such methods with such signatures exists in both classes
2)It checks that slot subset of parameters match the first parameters of signal
3)It checks that signature of method written in proper way (normalized), this improve performance,
see https://marcmutz.wordpress.com/effective-qt/prefer-to-use-normalised-signalslot-signatures/ and http://doc.qt.io/qt-5/qmetaobject.html#normalizedSignature
Why are you throwing away all the work that the parser did to build up the type signature as a QualType, pretty-printing it, and the re-parsing it by hand? ISTM it would be much better if qtNormalizeSignature had this type signature: QualType qtNormalizeSignature(QualType).