Fix voicemail url in settings.

Fix #LINQT-1479
This commit is contained in:
Julien Wadel 2025-01-07 15:53:19 +01:00
parent 001a4b1bc4
commit 6ed9f87963
2 changed files with 25 additions and 12 deletions

View file

@ -125,6 +125,7 @@ AccountCore::AccountCore(const AccountCore &accountCore) {
mDevices = accountCore.mDevices; mDevices = accountCore.mDevices;
mNotificationsAllowed = accountCore.mNotificationsAllowed; mNotificationsAllowed = accountCore.mNotificationsAllowed;
mMwiServerAddress = accountCore.mMwiServerAddress; mMwiServerAddress = accountCore.mMwiServerAddress;
mVoicemailAddress = accountCore.mVoicemailAddress;
mTransport = accountCore.mTransport; mTransport = accountCore.mTransport;
mTransports = accountCore.mTransports; mTransports = accountCore.mTransports;
mServerAddress = accountCore.mServerAddress; mServerAddress = accountCore.mServerAddress;
@ -180,6 +181,9 @@ void AccountCore::setSelf(QSharedPointer<AccountCore> me) {
mAccountModelConnection->makeConnectToModel(&AccountModel::mwiServerAddressChanged, [this](QString value) { mAccountModelConnection->makeConnectToModel(&AccountModel::mwiServerAddressChanged, [this](QString value) {
mAccountModelConnection->invokeToCore([this, value]() { onMwiServerAddressChanged(value); }); mAccountModelConnection->invokeToCore([this, value]() { onMwiServerAddressChanged(value); });
}); });
mAccountModelConnection->makeConnectToModel(&AccountModel::voicemailAddressChanged, [this](QString value) {
mAccountModelConnection->invokeToCore([this, value]() { onVoicemailAddressChanged(value); });
});
mAccountModelConnection->makeConnectToModel(&AccountModel::transportChanged, [this](linphone::TransportType value) { mAccountModelConnection->makeConnectToModel(&AccountModel::transportChanged, [this](linphone::TransportType value) {
mAccountModelConnection->invokeToCore( mAccountModelConnection->invokeToCore(
[this, value]() { onTransportChanged(LinphoneEnums::toString(LinphoneEnums::fromLinphone(value))); }); [this, value]() { onTransportChanged(LinphoneEnums::toString(LinphoneEnums::fromLinphone(value))); });
@ -274,6 +278,7 @@ void AccountCore::reset(const AccountCore &accountCore) {
setUnreadCallNotifications(accountCore.mUnreadCallNotifications); setUnreadCallNotifications(accountCore.mUnreadCallNotifications);
setUnreadMessageNotifications(accountCore.mUnreadMessageNotifications); setUnreadMessageNotifications(accountCore.mUnreadMessageNotifications);
setMwiServerAddress(accountCore.mMwiServerAddress); setMwiServerAddress(accountCore.mMwiServerAddress);
setVoicemailAddress(accountCore.mVoicemailAddress);
setTransport(accountCore.mTransport); setTransport(accountCore.mTransport);
setServerAddress(accountCore.mServerAddress); setServerAddress(accountCore.mServerAddress);
setOutboundProxyEnabled(accountCore.mOutboundProxyEnabled); setOutboundProxyEnabled(accountCore.mOutboundProxyEnabled);
@ -448,6 +453,10 @@ QString AccountCore::getMwiServerAddress() {
return mMwiServerAddress; return mMwiServerAddress;
} }
QString AccountCore::getVoicemailAddress() {
return mVoicemailAddress;
}
QStringList AccountCore::getTransports() { QStringList AccountCore::getTransports() {
return mTransports; return mTransports;
} }
@ -496,10 +505,6 @@ QString AccountCore::getLimeServerUrl() {
return mLimeServerUrl; return mLimeServerUrl;
} }
QString AccountCore::getVoicemailAddress() {
return mVoicemailAddress;
}
void AccountCore::setMwiServerAddress(QString value) { void AccountCore::setMwiServerAddress(QString value) {
if (mMwiServerAddress != value) { if (mMwiServerAddress != value) {
mMwiServerAddress = value; mMwiServerAddress = value;
@ -508,6 +513,14 @@ void AccountCore::setMwiServerAddress(QString value) {
} }
} }
void AccountCore::setVoicemailAddress(QString value) {
if (mVoicemailAddress != value) {
mVoicemailAddress = value;
emit voicemailAddressChanged();
setIsSaved(false);
}
}
void AccountCore::setTransport(QString value) { void AccountCore::setTransport(QString value) {
if (mTransport != value) { if (mTransport != value) {
mTransport = value; mTransport = value;
@ -596,14 +609,6 @@ void AccountCore::setLimeServerUrl(QString value) {
} }
} }
void AccountCore::setVoicemailAddress(QString value) {
if (mVoicemailAddress != value) {
mVoicemailAddress = value;
emit voicemailAddressChanged();
setIsSaved(false);
}
}
bool AccountCore::isSaved() const { bool AccountCore::isSaved() const {
return mIsSaved; return mIsSaved;
} }
@ -629,6 +634,13 @@ void AccountCore::onMwiServerAddressChanged(QString value) {
} }
} }
void AccountCore::onVoicemailAddressChanged(QString value) {
if (value != mVoicemailAddress) {
mVoicemailAddress = value;
emit voicemailAddressChanged();
}
}
void AccountCore::onTransportChanged(QString value) { void AccountCore::onTransportChanged(QString value) {
if (value != mTransport) { if (value != mTransport) {
mTransport = value; mTransport = value;

View file

@ -152,6 +152,7 @@ public:
void onNotificationsAllowedChanged(bool value); void onNotificationsAllowedChanged(bool value);
void onMwiServerAddressChanged(QString value); void onMwiServerAddressChanged(QString value);
void onVoicemailAddressChanged(QString value);
void onTransportChanged(QString value); void onTransportChanged(QString value);
void onServerAddressChanged(QString value); void onServerAddressChanged(QString value);
void onOutboundProxyEnabledChanged(bool value); void onOutboundProxyEnabledChanged(bool value);