Details
-
Sub-task
-
Resolution: Done
-
P1: Critical
-
None
-
f544d7189ec8fc5096015a1a649ee2e317efd893 243ea09e4cc0908e28be44e3e6786ff8b73f74be
Description
With the new QMetaObject data format introduced in Qt5, full method signatures are no longer stored in the meta-data. (Re)constructing a signature string is costly, and often wasteful (since connect/disconnectNotify() is rarely reimplemented).
Rather than a const char * as argument, connect/disconnectNotify() should take a QMetaMethod as argument. A QMetaMethod is very cheap to provide (just an index into a method table), and with the QMetaMethod the reimplementing code can query every aspect of the connected signal (including the signature – QMetaMethod::methodSignature()). With the introduction of QMetaMethod::fromSignal(MemberFunction) in Qt5, reimplementers also have a fast and typesafe way of checking which particular signal was (dis)connected (without resorting to raw string comparisons).