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
This commit is contained in:
Philip Withnall 2022-02-10 19:21:24 +00:00
parent cfd245bc78
commit 29edfc1169
3 changed files with 0 additions and 21 deletions

View File

@ -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>

View File

@ -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)
{

View File

@ -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