mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
gio: Fix deprecation warnings for g_object_newv() API
This commit is contained in:
parent
e2c3b7f634
commit
c11908ab7d
@ -382,7 +382,9 @@ g_async_initable_newv_async (GType object_type,
|
||||
|
||||
g_return_if_fail (G_TYPE_IS_ASYNC_INITABLE (object_type));
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
obj = g_object_newv (object_type, n_parameters, parameters);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
g_async_initable_init_async (G_ASYNC_INITABLE (obj),
|
||||
io_priority, cancellable,
|
||||
|
@ -198,7 +198,9 @@ g_initable_newv (GType object_type,
|
||||
|
||||
g_return_val_if_fail (G_TYPE_IS_INITABLE (object_type), NULL);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
obj = g_object_newv (object_type, n_parameters, parameters);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
if (!g_initable_init (G_INITABLE (obj), cancellable, error))
|
||||
{
|
||||
|
@ -241,7 +241,8 @@ test_default (void)
|
||||
m = g_network_monitor_get_default ();
|
||||
g_assert (G_IS_NETWORK_MONITOR (m));
|
||||
|
||||
monitor = g_initable_newv (G_TYPE_NETWORK_MONITOR_BASE, 0, NULL, NULL, &error);
|
||||
monitor = g_object_new (G_TYPE_NETWORK_MONITOR_BASE, NULL);
|
||||
g_initable_init (G_INITABLE (monitor), NULL, &error);
|
||||
g_assert_no_error (error);
|
||||
|
||||
/* In the default configuration, all addresses are reachable */
|
||||
|
Loading…
Reference in New Issue
Block a user