[vala/staging] Move validity check of property type for GLib.Object to Property.check()
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] Move validity check of property type for GLib.Object to Property.check()
- Date: Mon, 19 Apr 2021 08:06:28 +0000 (UTC)
commit 469c2992b0caec2346b39e2bb6fe4c8de677e684
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Apr 19 09:36:06 2021 +0200
Move validity check of property type for GLib.Object to Property.check()
This is still a warning only.
codegen/valagobjectmodule.vala | 3 ---
vala/valaproperty.vala | 3 +++
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/codegen/valagobjectmodule.vala b/codegen/valagobjectmodule.vala
index 238a67909..b0f631077 100644
--- a/codegen/valagobjectmodule.vala
+++ b/codegen/valagobjectmodule.vala
@@ -133,9 +133,6 @@ public class Vala.GObjectModule : GTypeModule {
var props = cl.get_properties ();
foreach (Property prop in props) {
if (!context.analyzer.is_gobject_property (prop)) {
- if (!context.analyzer.is_gobject_property_type (prop.property_type)) {
- Report.warning (prop.source_reference, "Type `%s' can not be used for
a GLib.Object property", prop.property_type.to_qualified_string ());
- }
continue;
}
diff --git a/vala/valaproperty.vala b/vala/valaproperty.vala
index 3d2cbf78a..291ff0258 100644
--- a/vala/valaproperty.vala
+++ b/vala/valaproperty.vala
@@ -419,6 +419,9 @@ public class Vala.Property : Symbol, Lockable {
error = true;
Report.error (source_reference, "Name `%s' is not valid for a GLib.Object
property", name);
}
+ if (!context.analyzer.is_gobject_property (this) &&
!context.analyzer.is_gobject_property_type (property_type)) {
+ Report.warning (source_reference, "Type `%s' can not be used for a
GLib.Object property", property_type.to_qualified_string ());
+ }
}
if (this_parameter != null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]