mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
Remove from GUI a bad account created from Assistant.
This commit is contained in:
parent
ac41881e11
commit
6d1463af06
7 changed files with 27 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Volumes settings based on hardware volumes. Remove software gains.
|
||||
- Display call duration instead of conference duration.
|
||||
- Publish presence indicator synchronized on default account.
|
||||
- Remove from GUI a bad account created from Assistant.
|
||||
|
||||
### Added
|
||||
- Screen Sharing in conference calls
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ public:
|
|||
case linphone::RegistrationState::Failed:
|
||||
emit mAssistant->loginStatusChanged(QObject::tr("loginWithUsernameFailed"));
|
||||
mAssistant->setIsProcessing(false);
|
||||
CoreManager::getInstance()->getCore()->removeAccount(account);
|
||||
CoreManager::getInstance()->getAccountSettingsModel()->removeAccount(account);
|
||||
account->removeListener(mSelf);
|
||||
mSelf = nullptr;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -100,6 +100,14 @@ void CoreHandlers::onAccountRegistrationStateChanged (
|
|||
emit registrationStateChanged(account, state);
|
||||
}
|
||||
|
||||
void CoreHandlers::onAccountAdded(const std::shared_ptr<linphone::Core> &, const std::shared_ptr<linphone::Account> & account){
|
||||
emit accountAdded(account);
|
||||
}
|
||||
|
||||
void CoreHandlers::onAccountRemoved(const std::shared_ptr<linphone::Core> &, const std::shared_ptr<linphone::Account> & account) {
|
||||
emit accountRemoved(account);
|
||||
}
|
||||
|
||||
void CoreHandlers::onAuthenticationRequested (
|
||||
const shared_ptr<linphone::Core> & core,
|
||||
const shared_ptr<linphone::AuthInfo> &authInfo,
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ public:
|
|||
|
||||
signals:
|
||||
void authenticationRequested (const std::shared_ptr<linphone::AuthInfo> &authInfo);
|
||||
void accountAdded (const std::shared_ptr<linphone::Account> &account);
|
||||
void accountRemoved (const std::shared_ptr<linphone::Account> &account);
|
||||
void callEncryptionChanged (const std::shared_ptr<linphone::Call> &call);
|
||||
void callLogUpdated(const std::shared_ptr<linphone::CallLog> &call);
|
||||
void callStateChanged (const std::shared_ptr<linphone::Call> &call, linphone::Call::State state);
|
||||
|
|
@ -69,6 +71,8 @@ signals:
|
|||
public slots:
|
||||
|
||||
void onAccountRegistrationStateChanged(const std::shared_ptr<linphone::Core> & core,const std::shared_ptr<linphone::Account> & account,linphone::RegistrationState state,const std::string & message);
|
||||
void onAccountAdded(const std::shared_ptr<linphone::Core> & core, const std::shared_ptr<linphone::Account> & account);
|
||||
void onAccountRemoved(const std::shared_ptr<linphone::Core> & core, const std::shared_ptr<linphone::Account> & account);
|
||||
void onAuthenticationRequested (const std::shared_ptr<linphone::Core> &core,const std::shared_ptr<linphone::AuthInfo> &authInfo,linphone::AuthMethod method);
|
||||
void onCallEncryptionChanged (const std::shared_ptr<linphone::Core> &core,const std::shared_ptr<linphone::Call> &call,bool on,const std::string &authenticationToken);
|
||||
void onCallLogUpdated(const std::shared_ptr<linphone::Core> & core, const std::shared_ptr<linphone::CallLog> & callLog);
|
||||
|
|
|
|||
|
|
@ -33,6 +33,12 @@ CoreListener::~CoreListener(){
|
|||
void CoreListener::onAccountRegistrationStateChanged(const std::shared_ptr<linphone::Core> & core,const std::shared_ptr<linphone::Account> & account,linphone::RegistrationState state,const std::string & message){
|
||||
emit accountRegistrationStateChanged(core,account,state,message);
|
||||
}
|
||||
void CoreListener::onAccountAdded(const std::shared_ptr<linphone::Core> & core, const std::shared_ptr<linphone::Account> & account) {
|
||||
emit accountAdded(core, account);
|
||||
}
|
||||
void CoreListener::onAccountRemoved(const std::shared_ptr<linphone::Core> & core, const std::shared_ptr<linphone::Account> & account) {
|
||||
emit accountRemoved(core, account);
|
||||
}
|
||||
void CoreListener::onAuthenticationRequested (const std::shared_ptr<linphone::Core> &core,const std::shared_ptr<linphone::AuthInfo> &authInfo,linphone::AuthMethod method){
|
||||
emit authenticationRequested (core,authInfo,method);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ public:
|
|||
virtual ~CoreListener ();
|
||||
|
||||
virtual void onAccountRegistrationStateChanged(const std::shared_ptr<linphone::Core> & core,const std::shared_ptr<linphone::Account> & account,linphone::RegistrationState state,const std::string & message) override;
|
||||
virtual void onAccountAdded(const std::shared_ptr<linphone::Core> & core, const std::shared_ptr<linphone::Account> & account) override;
|
||||
virtual void onAccountRemoved(const std::shared_ptr<linphone::Core> & core, const std::shared_ptr<linphone::Account> & account) override;
|
||||
virtual void onAuthenticationRequested (const std::shared_ptr<linphone::Core> &core,const std::shared_ptr<linphone::AuthInfo> &authInfo,linphone::AuthMethod method) override;
|
||||
virtual void onCallEncryptionChanged (const std::shared_ptr<linphone::Core> &core,const std::shared_ptr<linphone::Call> &call,bool on,const std::string &authenticationToken) override;
|
||||
virtual void onCallLogUpdated(const std::shared_ptr<linphone::Core> & core, const std::shared_ptr<linphone::CallLog> & callLog) override;
|
||||
|
|
@ -64,6 +66,8 @@ public:
|
|||
|
||||
signals:
|
||||
void accountRegistrationStateChanged(const std::shared_ptr<linphone::Core> & core,const std::shared_ptr<linphone::Account> & account,linphone::RegistrationState state,const std::string & message);
|
||||
void accountAdded(const std::shared_ptr<linphone::Core> & core, const std::shared_ptr<linphone::Account> & account);
|
||||
void accountRemoved(const std::shared_ptr<linphone::Core> & core, const std::shared_ptr<linphone::Account> & account);
|
||||
void authenticationRequested (const std::shared_ptr<linphone::Core> &core,const std::shared_ptr<linphone::AuthInfo> &authInfo,linphone::AuthMethod method);
|
||||
void callEncryptionChanged (const std::shared_ptr<linphone::Core> &core,const std::shared_ptr<linphone::Call> &call,bool on,const std::string &authenticationToken);
|
||||
void callLogUpdated(const std::shared_ptr<linphone::Core> & core, const std::shared_ptr<linphone::CallLog> & callLog);
|
||||
|
|
|
|||
|
|
@ -59,6 +59,9 @@ static inline AccountSettingsModel::RegistrationState mapLinphoneRegistrationSta
|
|||
AccountSettingsModel::AccountSettingsModel (QObject *parent) : QObject(parent) {
|
||||
CoreManager *coreManager = CoreManager::getInstance();
|
||||
QObject::connect(coreManager->getHandlers().get(), &CoreHandlers::registrationStateChanged, this, &AccountSettingsModel::handleRegistrationStateChanged);
|
||||
QObject::connect(coreManager->getHandlers().get(), &CoreHandlers::accountAdded, this, &AccountSettingsModel::accountSettingsUpdated);
|
||||
QObject::connect(coreManager->getHandlers().get(), &CoreHandlers::accountRemoved, this, &AccountSettingsModel::accountSettingsUpdated);
|
||||
|
||||
QObject::connect(coreManager, &CoreManager::callLogsCountChanged, this, &AccountSettingsModel::missedCallsCountChanged);
|
||||
|
||||
//QObject::connect(coreManager, &CoreManager::eventCountChanged, this, [this]() { emit accountSettingsUpdated(); });
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue