[vala/staging] method: Check with same rules for dbus compatibility as in GBusModule
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] method: Check with same rules for dbus compatibility as in GBusModule
- Date: Mon, 26 Feb 2018 20:30:20 +0000 (UTC)
commit 3c8c079de9b26b84464a0773c89eb44eded77029
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Feb 26 21:10:37 2018 +0100
method: Check with same rules for dbus compatibility as in GBusModule
Only issue warning if the method would actually be end up on DBus as
per generate_interface_method_call_function() or get_method_info().
Based on patch by Corentin Noël
https://bugzilla.gnome.org/show_bug.cgi?id=793859
vala/valamethod.vala | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/vala/valamethod.vala b/vala/valamethod.vala
index 133bca5..a2bd57c 100644
--- a/vala/valamethod.vala
+++ b/vala/valamethod.vala
@@ -857,7 +857,9 @@ public class Vala.Method : Subroutine, Callable {
}
// check that DBus methods at least throw "GLib.Error" or "GLib.DBusError, GLib.IOError"
- if (parent_symbol is ObjectTypeSymbol && parent_symbol.get_attribute ("DBus") != null) {
+ if (!(this is CreationMethod) && binding == MemberBinding.INSTANCE
+ && !overrides && access == SymbolAccessibility.PUBLIC
+ && parent_symbol is ObjectTypeSymbol && parent_symbol.get_attribute ("DBus") != null) {
Attribute? dbus_attr = get_attribute ("DBus");
if (dbus_attr == null || dbus_attr.get_bool ("visible", true)) {
bool throws_gerror = false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]