From fb45e26b8ba9b5495e723cded3b6420b20b39b37 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 10 Apr 2016 17:55:41 +0900 Subject: Supply more information with User::nameChanged signal --- user.cpp | 3 ++- user.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/user.cpp b/user.cpp index 2cc81fd9..f9529db3 100644 --- a/user.cpp +++ b/user.cpp @@ -114,8 +114,9 @@ void User::processEvent(Event* event) RoomMemberEvent* e = static_cast(event); if( d->name != e->displayName() ) { + const auto oldName = d->name; d->name = e->displayName(); - emit nameChanged(); + emit nameChanged(this, oldName); } if( d->avatarUrl != e->avatarUrl() ) { diff --git a/user.h b/user.h index d0965ef3..33a89e0b 100644 --- a/user.h +++ b/user.h @@ -56,7 +56,7 @@ namespace QMatrixClient void requestAvatar(); signals: - void nameChanged(); + void nameChanged(User*, QString); void avatarChanged(User* user); private: -- cgit v1.2.3