From 5314a20389ddf68a81160bb95b6ae8564aef0860 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 21 Apr 2020 14:08:38 +0100 Subject: [PATCH] gdesktopappinfo: Note that search results are not filtered Mention in the documentation that (presumably for performance reasons) the search results from `g_desktop_app_info_search()` are not filtered by executable presence or hidden attribute. Perhaps they should be in future, but for now we should at least document it. Spotted by Will Thompson. Signed-off-by: Philip Withnall --- gio/gdesktopappinfo.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c index ffd2ca317..ab3a2bb5e 100644 --- a/gio/gdesktopappinfo.c +++ b/gio/gdesktopappinfo.c @@ -4478,6 +4478,13 @@ g_desktop_app_info_get_implementations (const gchar *interface) * The algorithm for determining matches is undefined and may change at * any time. * + * None of the search results are subjected to the normal validation + * checks performed by g_desktop_app_info_new() (for example, checking that + * the executable referenced by a result exists), and so it is possible for + * g_desktop_app_info_new() to return %NULL when passed an app ID returned by + * this function. It is expected that calling code will do this when + * subsequently creating a #GDesktopAppInfo for each result. + * * Returns: (array zero-terminated=1) (element-type GStrv) (transfer full): a * list of strvs. Free each item with g_strfreev() and free the outer * list with g_free().