[gnome-builder/wip/gtk4-port: 1716/1774] libide/foundry: delete ide_runtime_create_launcher() and vfunc




commit 3d287c38af7e71a55725acba53a7eda86c16674b
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jun 28 13:38:48 2022 -0700

    libide/foundry: delete ide_runtime_create_launcher() and vfunc
    
    Finally, it is gone.

 src/libide/foundry/ide-runtime.c | 50 ----------------------------------------
 src/libide/foundry/ide-runtime.h |  5 ----
 2 files changed, 55 deletions(-)
---
diff --git a/src/libide/foundry/ide-runtime.c b/src/libide/foundry/ide-runtime.c
index 72769fa17..c187cabc0 100644
--- a/src/libide/foundry/ide-runtime.c
+++ b/src/libide/foundry/ide-runtime.c
@@ -65,34 +65,6 @@ enum {
 
 static GParamSpec *properties [N_PROPS];
 
-static IdeSubprocessLauncher *
-ide_runtime_real_create_launcher (IdeRuntime  *self,
-                                  GError     **error)
-{
-  IdeSubprocessLauncher *ret;
-
-  IDE_ENTRY;
-
-  g_assert (IDE_IS_RUNTIME (self));
-
-  ret = ide_subprocess_launcher_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE | G_SUBPROCESS_FLAGS_STDERR_PIPE);
-
-  if (ret != NULL)
-    {
-      ide_subprocess_launcher_set_run_on_host (ret, TRUE);
-      ide_subprocess_launcher_set_clear_env (ret, FALSE);
-    }
-  else
-    {
-      g_set_error_literal (error,
-                           G_IO_ERROR,
-                           G_IO_ERROR_FAILED,
-                           "An unknown error ocurred");
-    }
-
-  IDE_RETURN (ret);
-}
-
 static gboolean
 ide_runtime_real_contains_program_in_path (IdeRuntime   *self,
                                            const char   *program,
@@ -303,7 +275,6 @@ ide_runtime_class_init (IdeRuntimeClass *klass)
 
   i_object_class->repr = ide_runtime_repr;
 
-  klass->create_launcher = ide_runtime_real_create_launcher;
   klass->contains_program_in_path = ide_runtime_real_contains_program_in_path;
   klass->prepare_configuration = ide_runtime_real_prepare_configuration;
 
@@ -511,27 +482,6 @@ ide_runtime_new (const gchar *id,
                        NULL);
 }
 
-/**
- * ide_runtime_create_launcher:
- *
- * Creates a launcher for the runtime.
- *
- * This can be used to execute a command within a runtime.
- *
- * It is important that this function can be run from a thread without
- * side effects.
- *
- * Returns: (transfer full): An #IdeSubprocessLauncher or %NULL upon failure.
- */
-IdeSubprocessLauncher *
-ide_runtime_create_launcher (IdeRuntime  *self,
-                             GError     **error)
-{
-  g_return_val_if_fail (IDE_IS_RUNTIME (self), NULL);
-
-  return IDE_RUNTIME_GET_CLASS (self)->create_launcher (self, error);
-}
-
 void
 ide_runtime_prepare_configuration (IdeRuntime       *self,
                                    IdeConfig *configuration)
diff --git a/src/libide/foundry/ide-runtime.h b/src/libide/foundry/ide-runtime.h
index 8c1b274a8..c353bef6e 100644
--- a/src/libide/foundry/ide-runtime.h
+++ b/src/libide/foundry/ide-runtime.h
@@ -52,8 +52,6 @@ struct _IdeRuntimeClass
   gboolean                (*contains_program_in_path) (IdeRuntime           *self,
                                                        const gchar          *program,
                                                        GCancellable         *cancellable);
-  IdeSubprocessLauncher  *(*create_launcher)          (IdeRuntime           *self,
-                                                       GError              **error);
   void                    (*prepare_configuration)    (IdeRuntime           *self,
                                                        IdeConfig            *config);
   void                    (*prepare_to_run)           (IdeRuntime           *self,
@@ -80,9 +78,6 @@ gboolean                ide_runtime_contains_program_in_path (IdeRuntime      *s
                                                               const gchar     *program,
                                                               GCancellable    *cancellable);
 IDE_AVAILABLE_IN_ALL
-IdeSubprocessLauncher  *ide_runtime_create_launcher          (IdeRuntime      *self,
-                                                              GError         **error);
-IDE_AVAILABLE_IN_ALL
 void                    ide_runtime_prepare_to_run           (IdeRuntime      *self,
                                                               IdePipeline     *pipeline,
                                                               IdeRunContext   *run_context);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]