From fdbe13928adf87ce22ffb431983ec01d2b8978bc Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Tue, 28 Jan 2025 14:47:53 +0100 Subject: [PATCH] Update account list when core is in state GlobalOn --- Linphone/core/account/AccountList.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Linphone/core/account/AccountList.cpp b/Linphone/core/account/AccountList.cpp index d1025632b..374cc5656 100644 --- a/Linphone/core/account/AccountList.cpp +++ b/Linphone/core/account/AccountList.cpp @@ -84,14 +84,15 @@ void AccountList::setSelf(QSharedPointer me) { }); mModelConnection->makeConnectToModel(&CoreModel::accountRemoved, [this] { emit lUpdate(); }); mModelConnection->makeConnectToModel(&CoreModel::accountAdded, [this] { emit lUpdate(); }); - QObject::connect(CoreModel::getInstance().get(), &CoreModel::configuringStatus, this, - [this](const std::shared_ptr &core, linphone::ConfiguringState status, - const std::string &message) { - mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); - if (status == linphone::ConfiguringState::Successful) { - emit lUpdate(); - } - }); + + mModelConnection->makeConnectToModel( + &CoreModel::globalStateChanged, + [this](const std::shared_ptr &core, linphone::GlobalState gstate, const std::string &message) { + mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); + if (gstate == linphone::GlobalState::On) { + emit lUpdate(); + } + }); lUpdate(true); }