From d8e49595ea37fa2bba62525886aed690a6da141f Mon Sep 17 00:00:00 2001 From: Nicolas Jager <nicolas.jager@savoirfairelinux.com> Date: Tue, 25 Oct 2016 08:00:11 -0400 Subject: [PATCH] fix : replace PropertyChanged for NotifyPropertyChanged - PropertyChanged can raise the exception : disconnected from his client Change-Id: I9a72ca4ddff4bdc91194c46d8bcd52c71ac35e1e Tuleap: #1245 --- Account.h | 2 +- AccountListItem.h | 2 +- Contact.cpp | 2 +- Contact.h | 6 +++--- SmartPanelItem.h | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Account.h b/Account.h index e8d2dec..61bd0e5 100644 --- a/Account.h +++ b/Account.h @@ -39,7 +39,7 @@ public: } void set(String^ value) { name__ = value; - PropertyChanged(this, ref new PropertyChangedEventArgs("name_")); + NotifyPropertyChanged("name_"); } } property String^ ringID_; diff --git a/AccountListItem.h b/AccountListItem.h index 4bbb2c0..022c953 100644 --- a/AccountListItem.h +++ b/AccountListItem.h @@ -37,7 +37,7 @@ public: property bool _isSelected { void set(bool value) { isSelected_ = value; - PropertyChanged(this, ref new PropertyChangedEventArgs("_isSelected")); + NotifyPropertyChanged("_isSelected"); } bool get() { return isSelected_; diff --git a/Contact.cpp b/Contact.cpp index 2d94ec1..5b06a12 100644 --- a/Contact.cpp +++ b/Contact.cpp @@ -63,7 +63,7 @@ Contact::Contact(String^ name, if(unreadMessages_) { notificationNewMessage = Windows::UI::Xaml::Visibility::Visible; - PropertyChanged(this, ref new PropertyChangedEventArgs("unreadMessages")); + NotifyPropertyChanged("unreadMessages"); } } diff --git a/Contact.h b/Contact.h index d2cdf28..524697c 100644 --- a/Contact.h +++ b/Contact.h @@ -61,7 +61,7 @@ public: void set(Visibility visibility) { notificationNewMessage_ = visibility; - PropertyChanged(this, ref new PropertyChangedEventArgs("notificationNewMessage")); + NotifyPropertyChanged("notificationNewMessage"); } } property uint32 _unreadMessages @@ -73,7 +73,7 @@ public: void set(uint32 value) { unreadMessages_ = value; - PropertyChanged(this, ref new PropertyChangedEventArgs("_unreadMessages")); + NotifyPropertyChanged("_unreadMessages"); } } property Windows::UI::Xaml::GridLength _contactBarHeight @@ -85,7 +85,7 @@ public: void set(Windows::UI::Xaml::GridLength value) { contactBarHeight_ = value; - PropertyChanged(this, ref new PropertyChangedEventArgs("_contactBarHeight")); + NotifyPropertyChanged("_contactBarHeight"); } } diff --git a/SmartPanelItem.h b/SmartPanelItem.h index 88cb486..ded98ea 100644 --- a/SmartPanelItem.h +++ b/SmartPanelItem.h @@ -53,7 +53,7 @@ public: void set(Visibility value) { hovered_ = value; - PropertyChanged(this, ref new PropertyChangedEventArgs("_hovered")); + NotifyPropertyChanged("_hovered"); } } @@ -71,7 +71,7 @@ public: } void set(CallStatus value) { callStatus_ = value; - PropertyChanged(this, ref new PropertyChangedEventArgs("_callStatus")); + NotifyPropertyChanged("_callStatus"); } } -- GitLab