diff options
author | Axel Waggershauser <awagger@gmail.com> | 2013-03-06 17:44:15 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-13 18:40:26 +0100 |
commit | 3c2748afd58ef84d14b028fa43d193addb1add4c (patch) | |
tree | a0eb5d3dcbbc2bf5103ee38dbc04f2beb8fd6afa /src/corelib/kernel/qeventdispatcher_win.cpp | |
parent | 2f0756a63c699bb67232b535854c8fcbdf2f973c (diff) |
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>
Diffstat (limited to 'src/corelib/kernel/qeventdispatcher_win.cpp')
0 files changed, 0 insertions, 0 deletions