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 777961 - Documentation for g_app_info_equals() could be clearer
Documentation for g_app_info_equals() could be clearer
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal minor
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2017-01-31 01:01 UTC by Adrian Perez
Modified: 2017-04-08 05:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Better documentation for g_app_info_equal() (958 bytes, patch)
2017-01-31 01:14 UTC, Adrian Perez
committed Details | Review

Description Adrian Perez 2017-01-31 01:01:56 UTC
The documentation for “g_app_info_equals()” just reads:

  “Checks if two #GAppInfos are equal.                                           
  Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise.”

Which is correct, but makes the reader think that the comparison takes into
account the *contents* of the GAppInfo objects. What gets compared is just
the application identifier — in Win32 the logic is a bit more elaborate,
but essentially not all the bits of contained data are compared either.

This has bitten GNOME Shell (see bug #773636) and could end up easily causing
bugs in other applications which may need to take into account the contents
of the GAppInfo and not just its identifier. There are concerns about extending
the comparisons done by “g_app_info_equals()” (see bug #774302), so at least it
would be desirable to make a point in the documentation about the behaviour.
Comment 1 Adrian Perez 2017-01-31 01:14:08 UTC
Created attachment 344600 [details] [review]
Better documentation for g_app_info_equal()
Comment 2 Allison Karlitskaya (desrt) 2017-01-31 14:45:44 UTC
Review of attachment 344600 [details] [review]:

Thanks for doing this!
Comment 3 Matthias Clasen 2017-04-08 05:12:35 UTC
Attachment 344600 [details] pushed as 8588209 - Better documentation for g_app_info_equal()