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 742180 - command: Also debug-print the values of the query
command: Also debug-print the values of the query
Status: RESOLVED FIXED
Product: gom
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Gom Maintainers
Gom Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-01-01 14:40 UTC by Mathieu Bridon
Modified: 2015-01-25 09:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
command: Also debug-print the values of the query (2.04 KB, patch)
2015-01-01 14:40 UTC, Mathieu Bridon
needs-work Details | Review
command: Also debug-print the values of the query (2.08 KB, patch)
2015-01-18 08:06 UTC, Mathieu Bridon
committed Details | Review

Description Mathieu Bridon 2015-01-01 14:40:05 UTC
This is quite useful when debugging what is going on with a query.
Comment 1 Mathieu Bridon 2015-01-01 14:40:07 UTC
Created attachment 293559 [details] [review]
command: Also debug-print the values of the query

This is quite useful when debugging what is going on with a query.
Comment 2 Bastien Nocera 2015-01-05 12:41:53 UTC
Review of attachment 293559 [details] [review]:

::: gom/gom-command.c
@@ +352,3 @@
+         if (G_VALUE_HOLDS_BOOLEAN(v)) {
+            gboolean b = g_value_get_boolean(v);
+            g_print("%d", b);

g_print("%s", b ? "TRUE" : "FALSE");

@@ +358,3 @@
+         } else if (G_VALUE_HOLDS_INT64(v)) {
+            gint i = g_value_get_int64(v);
+            g_print("%d", i);

Use G_GINT64_FORMAT, not "d".

@@ +363,3 @@
+            g_print("'%s'", s);
+         } else if (G_VALUE_HOLDS_UCHAR(v)) {
+            guint8 i = g_value_get_uchar(v);

guchar i =...

@@ +364,3 @@
+         } else if (G_VALUE_HOLDS_UCHAR(v)) {
+            guint8 i = g_value_get_uchar(v);
+            g_print("%d", i);

"%c" for unsigned char.

@@ +367,3 @@
+         } else if (G_VALUE_HOLDS_UINT(v)) {
+            guint i = g_value_get_uint(v);
+            g_print("%d", i);

"%u"
Comment 3 Mathieu Bridon 2015-01-18 08:06:43 UTC
Created attachment 294773 [details] [review]
command: Also debug-print the values of the query

This is quite useful when debugging what is going on with a query.
Comment 4 Bastien Nocera 2015-01-19 09:48:42 UTC
Review of attachment 294773 [details] [review]:

Looks fine.
Comment 5 Mathieu Bridon 2015-01-25 09:07:32 UTC
Attachment 294773 [details] pushed as ca03725 - command: Also debug-print the values of the query