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 781451 - Use documented named constants instead of magic literals
Use documented named constants instead of magic literals
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-04-18 14:04 UTC by Debarshi Ray
Modified: 2017-04-18 17:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
application: Use GIO's named constant instead of 'standard::type' (1.11 KB, patch)
2017-04-18 14:06 UTC, Debarshi Ray
committed Details | Review
application, documents: Use GLib.PRIORITY_DEFAULT instead of 0 (1.83 KB, patch)
2017-04-18 14:07 UTC, Debarshi Ray
committed Details | Review
Use G_FILE_QUERY_INFO_NONE instead of 0 (2.63 KB, patch)
2017-04-18 14:07 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2017-04-18 14:04:19 UTC
There are some places where we should use:
  * G_FILE_QUERY_INFO_NONE, not 0
  * Use GLib.PRIORITY_DEFAULT, not 0
  * Gio.FILE_ATTRIBUTE_STANDARD_TYPE, not 'standard::type'

The named constants are documented in the API and easier to read.
Comment 1 Debarshi Ray 2017-04-18 14:06:51 UTC
Created attachment 349998 [details] [review]
application: Use GIO's named constant instead of 'standard::type'
Comment 2 Debarshi Ray 2017-04-18 14:07:05 UTC
Created attachment 349999 [details] [review]
application, documents: Use GLib.PRIORITY_DEFAULT instead of 0
Comment 3 Debarshi Ray 2017-04-18 14:07:17 UTC
Created attachment 350000 [details] [review]
Use G_FILE_QUERY_INFO_NONE instead of 0
Comment 4 Cosimo Cecchi 2017-04-18 16:38:04 UTC
Review of attachment 349998 [details] [review]:

++
Comment 5 Cosimo Cecchi 2017-04-18 16:38:29 UTC
Review of attachment 349999 [details] [review]:

++
Comment 6 Cosimo Cecchi 2017-04-18 16:39:12 UTC
Review of attachment 350000 [details] [review]:

++
Comment 7 Debarshi Ray 2017-04-18 17:17:32 UTC
Thanks for the quick review!