Commit 19ca90f8 authored by Corentin Noël's avatar Corentin Noël

Fix several Vala warnings

[CCode (finish_function = "...")] is deprecated, use [CCode (finish_name = "...")] instead.
finish_function is deprecated since a long time now.

warning: DBus methods are recommended to throw at least `GLib.Error' or `GLib.DBusError, GLib.IOError'
This has always been an issue, the compiler warns since a few years now that this is required.
parent d320aae6
Pipeline #60277 passed with stage
in 9 minutes and 55 seconds
......@@ -30,7 +30,7 @@ extern const string BACKEND_NAME;
/* The following function is needed in order to use the async SourceRegistry
* constructor. FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=659886 */
[CCode (cname = "e_source_registry_new", cheader_filename = "libedataserver/libedataserver.h", finish_function = "e_source_registry_new_finish")]
[CCode (cname = "e_source_registry_new", cheader_filename = "libedataserver/libedataserver.h", finish_name = "e_source_registry_new_finish")]
internal extern static async E.SourceRegistry create_source_registry (GLib.Cancellable? cancellable = null) throws GLib.Error;
/**
......
......@@ -31,7 +31,7 @@ extern const string BACKEND_NAME;
/* The following function is needed in order to use the async SourceRegistry
* constructor. FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=659886 */
[CCode (cname = "e_source_registry_new", cheader_filename = "libedataserver/libedataserver.h", finish_function = "e_source_registry_new_finish")]
[CCode (cname = "e_source_registry_new", cheader_filename = "libedataserver/libedataserver.h", finish_name = "e_source_registry_new_finish")]
internal extern static async E.SourceRegistry create_source_registry (GLib.Cancellable? cancellable = null) throws GLib.Error;
/**
......
......@@ -46,7 +46,7 @@ public class DevicePropertiesTests : BluezTest.TestCase
this.bluez_backend.mock_bluez.add_device ("hci0",
this.bluez_backend.primary_device_address, "My Phone");
}
catch (IOError e1)
catch (GLib.Error e1)
{
error ("Error setting up mock BlueZ device: %s", e1.message);
}
......@@ -103,7 +103,7 @@ public class DevicePropertiesTests : BluezTest.TestCase
this.bluez_backend.mock_bluez.pair_device ("hci0",
this.bluez_backend.primary_device_address);
}
catch (IOError e4)
catch (GLib.Error e4)
{
error ("Error pairing mock BlueZ device: %s", e4.message);
}
......@@ -132,7 +132,7 @@ public class DevicePropertiesTests : BluezTest.TestCase
this.bluez_backend.mock_bluez.block_device ("hci0",
this.bluez_backend.primary_device_address);
}
catch (IOError e1)
catch (GLib.Error e1)
{
error ("Error blocking device: %s", e1.message);
}
......@@ -180,7 +180,7 @@ public class DevicePropertiesTests : BluezTest.TestCase
this.bluez_backend.mock_bluez.pair_device ("hci0",
this.bluez_backend.primary_device_address);
}
catch (IOError e4)
catch (GLib.Error e4)
{
error ("Error blocking device: %s", e4.message);
}
......@@ -201,7 +201,7 @@ public class DevicePropertiesTests : BluezTest.TestCase
this.bluez_backend.mock_bluez.block_device ("hci0",
this.bluez_backend.primary_device_address);
}
catch (IOError e5)
catch (GLib.Error e5)
{
error ("Error blocking device again: %s", e5.message);
}
......@@ -275,7 +275,7 @@ public class DevicePropertiesTests : BluezTest.TestCase
new Variant.array (VariantType.STRING, {})
});
}
catch (IOError e1)
catch (GLib.Error e1)
{
error ("Error setting device alias: %s", e1.message);
}
......
......@@ -31,19 +31,19 @@ namespace org
{
[DBus (name = "AddAdapter")]
public abstract string add_adapter (string device_name,
string system_name) throws IOError;
string system_name) throws GLib.Error;
[DBus (name = "AddDevice")]
public abstract string add_device (string adapter_device_name,
string device_address, string alias) throws IOError;
string device_address, string alias) throws GLib.Error;
[DBus (name = "PairDevice")]
public abstract void pair_device (string adapter_device_name,
string device_address) throws IOError;
string device_address) throws GLib.Error;
[DBus (name = "BlockDevice")]
public abstract void block_device (string adapter_device_name,
string device_address) throws IOError;
string device_address) throws GLib.Error;
}
namespace obex
......@@ -65,7 +65,7 @@ namespace org
{
[DBus (name = "UpdateStatus")]
public abstract void update_status (bool is_complete)
throws IOError;
throws GLib.Error;
}
}
}
......@@ -201,7 +201,7 @@ public class BluezTest.Backend
this._mock_obex_base.reset ();
this._mock_bluez_base.reset ();
}
catch (IOError e1)
catch (GLib.Error e1)
{
error ("Error resetting python-dbusmock state: %s", e1.message);
}
......@@ -252,7 +252,7 @@ public class BluezTest.Backend
/* Set the vCard to be returned for all transfers. */
return this.set_simple_device_vcard (vcard);
}
catch (IOError e1)
catch (GLib.Error e1)
{
error ("Error setting up mock BlueZ device: %s", e1.message);
}
......
......@@ -24,7 +24,7 @@ using Random;
/* The following function is needed in order to use the async SourceRegistry
* constructor. FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=659886 */
[CCode (cname = "e_source_registry_new", cheader_filename = "libedataserver/libedataserver.h", finish_function = "e_source_registry_new_finish")]
[CCode (cname = "e_source_registry_new", cheader_filename = "libedataserver/libedataserver.h", finish_name = "e_source_registry_new_finish")]
internal extern static async E.SourceRegistry create_source_registry (GLib.Cancellable? cancellable = null) throws GLib.Error;
errordomain EdsTest.BackendSetupError
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment