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 783082 - Port gdm to GTask
Port gdm to GTask
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-25 10:28 UTC by Jeremy Bicha
Modified: 2017-12-13 20:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Replace deprecated GSimpleAsyncResult with GTask (50.99 KB, patch)
2017-12-04 03:18 UTC, Robert Ancell
none Details | Review
Replace deprecated GSimpleAsyncResult with GTask (50.90 KB, patch)
2017-12-05 03:40 UTC, Robert Ancell
accepted-commit_now Details | Review

Description Jeremy Bicha 2017-05-25 10:28:24 UTC
GDM has 70+ deprecation warnings from using g_simple_async instead of GTask.

gdm-client.c: In function ‘on_got_manager’:
gdm-client.c:98:17: warning: ‘g_simple_async_result_take_error’ is deprecated [-Wdeprecated-declarations]
                 g_simple_async_result_take_error (operation_result, error);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 1 Robert Ancell 2017-12-04 03:18:54 UTC
Created attachment 364881 [details] [review]
Replace deprecated GSimpleAsyncResult with GTask

In progress patch. I have yet to test this. Taken from wip/rancell/gtask branch.
Comment 2 Robert Ancell 2017-12-05 03:40:57 UTC
Created attachment 364987 [details] [review]
Replace deprecated GSimpleAsyncResult with GTask

Patch fixed and tested. Please review.
Comment 3 Ray Strode [halfline] 2017-12-13 17:51:42 UTC
Review of attachment 364987 [details] [review]:

looks plausible to me. let's land this and shake out any bugs that crop up (if any do) in the run up to 3.28.  just one thing i noticed in my brief read through.

::: libgdm/gdm-client.c
@@ +574,3 @@
         g_return_val_if_fail (GDM_IS_CLIENT (client), FALSE);
 
+        client->priv->connection = g_task_propagate_pointer (G_TASK (result), error);

i think this part needs to be protected with 

if (client->priv->connection == NULL) {
…
}

idea being if the connection is getting requested multiple times, the first one to come back wins. Practically speaking, probably doesn't matter, but this is an unintended semantic change in your conversation, so better to add  the conditional...