mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 07:38:54 +02:00
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:
@@ -4215,7 +4215,6 @@ GDBusObjectManagerServerPrivate
|
|||||||
GDebugController
|
GDebugController
|
||||||
GDebugControllerInterface
|
GDebugControllerInterface
|
||||||
G_DEBUG_CONTROLLER_EXTENSION_POINT_NAME
|
G_DEBUG_CONTROLLER_EXTENSION_POINT_NAME
|
||||||
g_debug_controller_dup_default
|
|
||||||
g_debug_controller_get_debug_enabled
|
g_debug_controller_get_debug_enabled
|
||||||
g_debug_controller_set_debug_enabled
|
g_debug_controller_set_debug_enabled
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
|
@@ -50,23 +50,6 @@
|
|||||||
G_DEFINE_INTERFACE_WITH_CODE (GDebugController, g_debug_controller, G_TYPE_OBJECT,
|
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_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
|
static void
|
||||||
g_debug_controller_default_init (GDebugControllerInterface *iface)
|
g_debug_controller_default_init (GDebugControllerInterface *iface)
|
||||||
{
|
{
|
||||||
|
@@ -68,9 +68,6 @@ struct _GDebugControllerInterface {
|
|||||||
GTypeInterface g_iface;
|
GTypeInterface g_iface;
|
||||||
};
|
};
|
||||||
|
|
||||||
GLIB_AVAILABLE_IN_2_72
|
|
||||||
GDebugController *g_debug_controller_dup_default (void);
|
|
||||||
|
|
||||||
GLIB_AVAILABLE_IN_2_72
|
GLIB_AVAILABLE_IN_2_72
|
||||||
gboolean g_debug_controller_get_debug_enabled (GDebugController *self);
|
gboolean g_debug_controller_get_debug_enabled (GDebugController *self);
|
||||||
GLIB_AVAILABLE_IN_2_72
|
GLIB_AVAILABLE_IN_2_72
|
||||||
|
Reference in New Issue
Block a user