[glib: 1/7] gdebugcontroller: Drop dup_default() method as it’s broken




commit 29edfc1169d3c00aedbd2bf830fda9823908b964
Author: Philip Withnall <pwithnall endlessos org>
Date:   Thu Feb 10 19:21:24 2022 +0000

    gdebugcontroller: Drop dup_default() method as it’s broken
    
    If `GDebugControllerDBus` remains as the only, or default,
    implementation of `GDebugController`, `dup_default()` cannot work.
    `GDebugControllerDBus` requires a `GDBusConnection` at construction
    time, which the `GIOModule` construction code can’t provide it.
    
    Either we use a default D-Bus connection (but which one? and how would
    it be changed by the user later if it was the wrong one?), or delegate
    singleton handling of the `GDebugController` to the user.
    
    The latter approach seems more flexible.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1190

 docs/reference/gio/gio-sections-common.txt |  1 -
 gio/gdebugcontroller.c                     | 17 -----------------
 gio/gdebugcontroller.h                     |  3 ---
 3 files changed, 21 deletions(-)
---
diff --git a/docs/reference/gio/gio-sections-common.txt b/docs/reference/gio/gio-sections-common.txt
index 4842deaf7..0c73afa6f 100644
--- a/docs/reference/gio/gio-sections-common.txt
+++ b/docs/reference/gio/gio-sections-common.txt
@@ -4215,7 +4215,6 @@ GDBusObjectManagerServerPrivate
 GDebugController
 GDebugControllerInterface
 G_DEBUG_CONTROLLER_EXTENSION_POINT_NAME
-g_debug_controller_dup_default
 g_debug_controller_get_debug_enabled
 g_debug_controller_set_debug_enabled
 <SUBSECTION Standard>
diff --git a/gio/gdebugcontroller.c b/gio/gdebugcontroller.c
index 155c30445..13808d500 100644
--- a/gio/gdebugcontroller.c
+++ b/gio/gdebugcontroller.c
@@ -50,23 +50,6 @@
 G_DEFINE_INTERFACE_WITH_CODE (GDebugController, g_debug_controller, G_TYPE_OBJECT,
                               g_type_interface_add_prerequisite (g_define_type_id, G_TYPE_INITABLE))
 
-/**
- * g_debug_controller_dup_default:
- *
- * Gets a reference to the default #GDebugController for the system.
- *
- * Returns: (not nullable) (transfer full): a new reference to the default #GDebugController
- *
- * Since: 2.72
- */
-GDebugController *
-g_debug_controller_dup_default (void)
-{
-  return g_object_ref (_g_io_module_get_default (G_DEBUG_CONTROLLER_EXTENSION_POINT_NAME,
-                                                 "GIO_USE_DEBUG_CONTROLLER",
-                                                 NULL));
-}
-
 static void
 g_debug_controller_default_init (GDebugControllerInterface *iface)
 {
diff --git a/gio/gdebugcontroller.h b/gio/gdebugcontroller.h
index 59b1ede2b..ca3a2d29d 100644
--- a/gio/gdebugcontroller.h
+++ b/gio/gdebugcontroller.h
@@ -68,9 +68,6 @@ struct _GDebugControllerInterface {
   GTypeInterface g_iface;
 };
 
-GLIB_AVAILABLE_IN_2_72
-GDebugController      *g_debug_controller_dup_default           (void);
-
 GLIB_AVAILABLE_IN_2_72
 gboolean               g_debug_controller_get_debug_enabled     (GDebugController *self);
 GLIB_AVAILABLE_IN_2_72


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