Removing formatted printing of accessible object path by at_spi2_tool 51/256751/2 accepted/tizen/unified/20210607.124341 submit/tizen/20210514.080747 submit/tizen/20210601.084003 submit/tizen/20210607.013021
authorLukasz Oleksak <l.oleksak@samsung.com>
Mon, 12 Apr 2021 08:37:07 +0000 (10:37 +0200)
committerLukasz Oleksak <l.oleksak@samsung.com>
Mon, 12 Apr 2021 08:51:12 +0000 (08:51 +0000)
Format of accessible object path (handle) may vary in different toolkits
so hardcoded formatting "%llu" cannot be used. Additionaly, the information
is redundant as unformatted (raw) object path is already printed as the
last section (after last ":") of object unique id.

Change-Id: Idedbea550e759335a10141adf4873a37737dde12

test/at_spi2_tool.c

index e1e9fc8..e70cd82 100644 (file)
@@ -309,10 +309,6 @@ static char *_get_info(AtspiAccessible *node, int length_limit, bool *attributes
        char *node_name = atspi_accessible_get_name(node, NULL);
        char *node_role_name = atspi_accessible_get_role_name(node, NULL);
        char *unique_id = atspi_accessible_get_unique_id(node, NULL);
-       char *path = atspi_accessible_get_path(node, NULL);
-       unsigned long long eo_ptr = 0;
-       sscanf(path, "%llu", &eo_ptr);
-
        char *toolkit = atspi_accessible_get_toolkit_name(node, NULL);
 
        char *attributes = _get_attributes(node, length_limit, attributes_are_too_long);
@@ -332,8 +328,8 @@ static char *_get_info(AtspiAccessible *node, int length_limit, bool *attributes
        }
 
        char result[SAFE_BUFFER_SIZE];
-       int ret = snprintf(result, SAFE_BUFFER_SIZE, "[[%s(%p)],[%s],[toolkit=%s],[%s],[%s,%s,%s,%s],[%s],[%s],[%s]]",
-                                               unique_id, (uintptr_t)eo_ptr,
+       int ret = snprintf(result, SAFE_BUFFER_SIZE, "[[%s],[%s],[toolkit=%s],[%s],[%s,%s,%s,%s],[%s],[%s],[%s]]",
+                                               unique_id,
                                                node_role_name,
                                                toolkit,
                                                attributes,
@@ -357,7 +353,6 @@ static char *_get_info(AtspiAccessible *node, int length_limit, bool *attributes
        free(node_name);
        free(node_role_name);
        free(unique_id);
-       free(path);
        free(toolkit);
        free(attributes);
        if (box_size) {