]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Deprecate use of += and -= for signals c353329b280f945d6d8188af5817ae44723d6e1d
authorLuca Bruno <lethalman88@gmail.com>
Tue, 1 Jun 2010 20:06:17 +0000 (22:06 +0200)
committerJürg Billeter <j@bitron.ch>
Mon, 7 Jun 2010 18:56:29 +0000 (20:56 +0200)
The connect/disconnect methods should be used instead.

Fixes bug 617571.

vala/valaassignment.vala

index 77725663a0651104e56e87c65063d547687c5963..5833e6be40c545745ada2f12e2cbce4a9bf0208b 100644 (file)
@@ -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 {