[gnome-software/wip/automatic-update-fixes: 84/92] plugin-loader: Remove obsolete gs_plugin_loader_hint_job_finished()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/automatic-update-fixes: 84/92] plugin-loader: Remove obsolete gs_plugin_loader_hint_job_finished()
- Date: Thu, 7 Jul 2022 08:19:24 +0000 (UTC)
commit 89a3767bd0ad94d3f3d83f8c4ecbb2b79072f536
Author: Milan Crha <mcrha redhat com>
Date: Wed Jun 15 17:51:13 2022 +0200
plugin-loader: Remove obsolete gs_plugin_loader_hint_job_finished()
The function is not needed, since the plugin loader tracks count
of active jobs automatically now.
lib/gs-plugin-job-refresh-metadata.c | 5 -----
lib/gs-plugin-loader.c | 28 ----------------------------
lib/gs-plugin-loader.h | 2 --
3 files changed, 35 deletions(-)
---
diff --git a/lib/gs-plugin-job-refresh-metadata.c b/lib/gs-plugin-job-refresh-metadata.c
index a57b194bc..8d0b95b5d 100644
--- a/lib/gs-plugin-job-refresh-metadata.c
+++ b/lib/gs-plugin-job-refresh-metadata.c
@@ -387,7 +387,6 @@ finish_op (GTask *task,
GError *error)
{
GsPluginJobRefreshMetadata *self = g_task_get_source_object (task);
- GsPluginLoader *plugin_loader = g_task_get_task_data (task);
g_autoptr(GError) error_owned = g_steal_pointer (&error);
g_autofree gchar *job_debug = NULL;
@@ -408,10 +407,6 @@ finish_op (GTask *task,
progress_cb (self);
g_source_destroy (self->progress_source);
- /* If any plugin emitted updates-changed, actually schedule it to be
- * emitted now (even if the overall operation failed). */
- gs_plugin_loader_hint_job_finished (plugin_loader);
-
/* Get the results of the parallel ops. */
if (self->saved_error != NULL) {
g_task_return_error (task, g_steal_pointer (&self->saved_error));
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index e5c2a2c23..fc374256d 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -3676,9 +3676,6 @@ gs_plugin_loader_process_thread_cb (GTask *task,
/* sort these again as the refine may have added useful metadata */
gs_plugin_loader_job_sorted_truncation_again (helper->plugin_job, list);
- /* Hint that the job has finished. */
- gs_plugin_loader_hint_job_finished (plugin_loader);
-
#ifdef HAVE_SYSPROF
if (plugin_loader->sysprof_writer != NULL) {
g_autofree gchar *sysprof_name = g_strconcat ("process-thread:", gs_plugin_action_to_string
(action), NULL);
@@ -3849,9 +3846,6 @@ run_job_cb (GObject *source_object,
}
#endif /* HAVE_SYSPROF */
- /* Hint that the job has finished. */
- gs_plugin_loader_hint_job_finished (plugin_loader);
-
/* FIXME: This will eventually go away when
* gs_plugin_loader_job_process_finish() is removed. */
job_class = GS_PLUGIN_JOB_GET_CLASS (plugin_job);
@@ -4459,25 +4453,3 @@ gs_plugin_loader_get_category_manager (GsPluginLoader *plugin_loader)
return plugin_loader->category_manager;
}
-
-/**
- * gs_plugin_loader_hint_job_finished:
- * @plugin_loader: a #GsPluginLoader
- *
- * Hint to the @plugin_loader that the set of changes caused by the current
- * #GsPluginJob is likely to be finished.
- *
- * The @plugin_loader may emit queued-up signals as a result.
- *
- * Since: 42
- */
-void
-gs_plugin_loader_hint_job_finished (GsPluginLoader *plugin_loader)
-{
- g_return_if_fail (GS_IS_PLUGIN_LOADER (plugin_loader));
-
- /* if the plugin used updates-changed during its job, actually schedule
- * the signal emission now */
- if (plugin_loader->updates_changed_cnt > 0)
- gs_plugin_loader_updates_changed (plugin_loader);
-}
diff --git a/lib/gs-plugin-loader.h b/lib/gs-plugin-loader.h
index 0d2035bfd..bb2c7d8e6 100644
--- a/lib/gs-plugin-loader.h
+++ b/lib/gs-plugin-loader.h
@@ -126,6 +126,4 @@ gboolean gs_plugin_loader_app_is_compatible (GsPluginLoader *plugin_loader,
void gs_plugin_loader_run_adopt (GsPluginLoader *plugin_loader,
GsAppList *list);
-void gs_plugin_loader_hint_job_finished (GsPluginLoader *plugin_loader);
-
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]