qt5base-lts/tests/auto/corelib/kernel
Axel Waggershauser 3c2748afd5 Improve warning messages (and readability) of connectSlotsByName()
While adding a test case for the new behavior, two issues
with the connectSlotsByName implementation came up:

  1. for auto-connected slots that don't exactly match a signal,
     a 'compatible' one is searched. There might be more than
     one of those. The implementation randomly picks any.
  2. The "No matching signal for %s" warning gets printed even for
     slots that can never be connected via connectSlotsMyName
     anyway (e.g. "on_something"). This is inconsistent.

This fixed both: an explicit warning is printed if more than one
'compatible' signal is found and the "No matching signal for %s"
warning is only printed if the slot adheres to the full
"on_child_signal()" naming convention.

In the process I added comments and changed the code slightly to
make it more readable and explicitly hint at non-obvious behavior.

Change-Id: Icc8e3b9936188d2da8dfff9f0373c8e5c776eb14
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-13 18:40:26 +01:00
..
qcoreapplication Clear the current thread data for the main thread 2013-03-05 20:58:00 +01:00
qeventdispatcher Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qeventloop Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qmath Add qDegreesToRadians and qRadiansToDegrees math functions 2013-02-05 14:40:14 +01:00
qmetamethod Distinguish between 'mac' and 'macx' qmake scopes 2013-03-05 20:59:45 +01:00
qmetaobject Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qmetaobjectbuilder Distinguish between 'mac' and 'macx' qmake scopes 2013-03-05 20:59:45 +01:00
qmetaproperty Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qmetatype Android compile fix 2013-03-12 09:16:42 +01:00
qmimedata tests: Fix some more old references and links to Nokia 2013-02-01 15:27:37 +01:00
qobject Improve warning messages (and readability) of connectSlotsByName() 2013-03-13 18:40:26 +01:00
qpointer Make it possible to use QPointer<const T> 2013-02-13 15:15:56 +01:00
qsharedmemory Skip unstable autotest 2013-03-12 18:13:37 +01:00
qsignalmapper Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qsocketnotifier Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qsystemsemaphore Check existence of QProcess feature before using it on Qt autotests. 2013-01-28 16:06:15 +01:00
qtimer Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qtranslator Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qvariant tests: Fix some more old references and links to Nokia 2013-02-01 15:27:37 +01:00
qwineventnotifier Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
kernel.pro Android: disable unsupported autotests 2013-03-12 09:16:42 +01:00