gio: Fix deprecation warnings for g_object_newv() API

This commit is contained in:
Philip Withnall 2017-03-31 10:59:26 +01:00
parent e2c3b7f634
commit c11908ab7d
3 changed files with 6 additions and 1 deletions

View File

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

View File

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

View File

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