]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Do not install GObject properties for D-Bus interfaces
authorJürg Billeter <j@bitron.ch>
Sat, 8 Jan 2011 15:49:46 +0000 (16:49 +0100)
committerJürg Billeter <j@bitron.ch>
Sat, 22 Jan 2011 10:00:48 +0000 (11:00 +0100)
They were never properly implemented in the proxy classes. Latest GLib
release prints critical warnings due to the missing implementation.

codegen/valagobjectmodule.vala

index 2d36329a155d9a3623cfe8142c29fefec4e1162b..8bdb74e0ad11725a976c6722428d65b225c3e966 100644 (file)
@@ -1,6 +1,6 @@
 /* valagobjectmodule.vala
  *
- * Copyright (C) 2006-2010  Jürg Billeter
+ * Copyright (C) 2006-2011  Jürg Billeter
  * Copyright (C) 2006-2008  Raffaele Sandrini
  *
  * This library is free software; you can redistribute it and/or
@@ -763,12 +763,9 @@ public class Vala.GObjectModule : GTypeModule {
                        return false;
                }
 
-               if (prop.base_interface_property != null) {
-                       var iface = (Interface) prop.base_interface_property.parent_symbol;
-                       if (!iface.is_subtype_of (gobject_type)) {
-                               // implementing non-GObject property
-                               return false;
-                       }
+               if (type_sym is Class && prop.base_interface_property != null &&
+                   !is_gobject_property (prop.base_interface_property)) {
+                       return false;
                }
 
                if (!prop.name[0].isalpha ()) {
@@ -776,6 +773,11 @@ public class Vala.GObjectModule : GTypeModule {
                        return false;
                }
 
+               if (type_sym is Interface && type_sym.get_attribute ("DBus") != null) {
+                       // GObject properties not currently supported in D-Bus interfaces
+                       return false;
+               }
+
                return true;
        }