qt5base-lts/tests/auto/corelib
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
..
animation Merge remote-tracking branch 'origin/stable' into dev 2013-01-22 18:40:13 +01:00
codecs Correctly detect HTML 5 charset attribute in QTextCodec::codecForHtml() 2013-02-12 01:31:26 +01:00
global Enable QGlobalStatic autotest. 2013-02-28 23:43:50 +01:00
io Compile fix when fileno does not return int 2013-03-12 09:16:42 +01:00
itemmodels Merge remote-tracking branch 'origin/stable' into dev 2013-03-05 13:42:11 +01:00
json Add toJson() formatting argument to QJsonDocument interface 2013-01-26 03:09:27 +01:00
kernel Improve warning messages (and readability) of connectSlotsByName() 2013-03-13 18:40:26 +01:00
mimetypes QMimeDatabase: pass MatchMode down, to fix MatchContent. 2013-03-01 13:05:11 +01:00
plugin Distinguish between 'mac' and 'macx' qmake scopes 2013-03-05 20:59:45 +01:00
statemachine Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
thread Remove QT_{BEGIN,END}_HEADER macro usage 2013-01-29 01:06:04 +01:00
tools Fixed bug in QTimeLine::setPaused(false) 2013-03-13 14:51:05 +01:00
xml Check for network module when building according auto tests 2013-02-19 19:20:53 +01:00
corelib.pro Import QMimeType / QMimeDatabase into QtCore. 2012-02-18 22:19:43 +01:00