After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 694350 - Add type names to gsignal warnings
Add type names to gsignal warnings
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gobject
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-02-21 11:16 UTC by Allison Karlitskaya (desrt)
Modified: 2013-02-22 09:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsignal: improve warning output (4.52 KB, patch)
2013-02-21 11:33 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2013-02-21 11:16:52 UTC
We have some warnings like this:

    g_warning ("%s: signal `%s' is invalid for instance `%p'", G_STRLOC, detailed_signal, instance);



They'd be a lot more helpful if they added to the end: " of type `%s'".
Comment 1 Allison Karlitskaya (desrt) 2013-02-21 11:33:41 UTC
Created attachment 237031 [details] [review]
gsignal: improve warning output

When looking up signals by name (to connect, for example) and the named
signal cannot be found on the given instance, report the type of the
instance.

This is quite a lot more useful as a diagnostic message than only a
memory address.
Comment 2 Colin Walters 2013-02-21 18:04:18 UTC
Review of attachment 237031 [details] [review]:

Looks correct and useful to me.
Comment 3 Allison Karlitskaya (desrt) 2013-02-22 00:55:03 UTC
Attachment 237031 [details] pushed as f5d40bd - gsignal: improve warning output