From 4d4fdb801f4cda555dc12c5283d6da979e7e4e8e Mon Sep 17 00:00:00 2001 From: Ming Rui Zhang <mingrui.zhang@savoirfairelinux.com> Date: Mon, 26 Jul 2021 15:35:08 -0400 Subject: [PATCH] test: add accountDetailsChanged signal To differentiate from accountStatusChanged accountStatusChanged is emitted in onAccountDetailsChanged any client code that actually depends on accountDetails and connects to accountStatusChanged should switch the connection to listen for accountDetailsChanged Change-Id: I131493b831a2a6d32fae67c5c1af798a066e38a7 --- src/api/newaccountmodel.h | 5 +++++ src/newaccountmodel.cpp | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/api/newaccountmodel.h b/src/api/newaccountmodel.h index 0d1c23c6..f9a13dd9 100644 --- a/src/api/newaccountmodel.h +++ b/src/api/newaccountmodel.h @@ -271,6 +271,11 @@ Q_SIGNALS: * @param accountID */ void accountStatusChanged(const QString& accountID); + /** + * Connect this signal to know when the details of an account has changed. + * @param accountID + */ + void accountDetailsChanged(const QString& accountID); /** * Connect this signal to know when an account was added. * @param accountID diff --git a/src/newaccountmodel.cpp b/src/newaccountmodel.cpp index 40769214..abdf60a7 100644 --- a/src/newaccountmodel.cpp +++ b/src/newaccountmodel.cpp @@ -566,7 +566,9 @@ NewAccountModelPimpl::slotAccountDetailsChanged(const QString& accountId, accountInfo.registeredName = new_username; emit linked.profileUpdated(accountId); } + // TODO: Remove accountStatusChanged here. emit linked.accountStatusChanged(accountId); + emit linked.accountDetailsChanged(accountId); } void -- GitLab