[vala] Deprecate use of += and -= for signals
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Deprecate use of += and -= for signals
- Date: Mon, 7 Jun 2010 19:23:44 +0000 (UTC)
commit c353329b280f945d6d8188af5817ae44723d6e1d
Author: Luca Bruno <lethalman88 gmail com>
Date: Tue Jun 1 22:06:17 2010 +0200
Deprecate use of += and -= for signals
The connect/disconnect methods should be used instead.
Fixes bug 617571.
vala/valaassignment.vala | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/vala/valaassignment.vala b/vala/valaassignment.vala
index 7772566..5833e6b 100644
--- a/vala/valaassignment.vala
+++ b/vala/valaassignment.vala
@@ -164,7 +164,13 @@ public class Vala.Assignment : Expression {
if (ma.symbol_reference is DynamicSignal) {
// target_type not available for dynamic signals
+ if (!analyzer.context.deprecated) {
+ Report.warning (source_reference, "deprecated syntax, use `connect' method instead");
+ }
} else if (ma.symbol_reference is Signal) {
+ if (!analyzer.context.deprecated) {
+ Report.warning (source_reference, "deprecated syntax, use `connect' method instead");
+ }
var sig = (Signal) ma.symbol_reference;
right.target_type = new DelegateType (sig.get_delegate (ma.inner.value_type, this));
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]