mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-31 02:49:21 +00:00
enable native ringing if ringtone is empty
This commit is contained in:
parent
507bee2946
commit
d9b879fac7
2 changed files with 4 additions and 0 deletions
|
|
@ -56,9 +56,11 @@ SettingsCore::SettingsCore(QObject *parent) : QObject(parent) {
|
|||
if (ringtone.exists()) {
|
||||
mRingtoneFileName = ringtone.fileName();
|
||||
mRingtoneFolder = ringtone.absolutePath();
|
||||
CoreModel::getInstance()->getCore()->enableNativeRinging(false);
|
||||
} else {
|
||||
mRingtoneFileName = mRingtonePath.right(mRingtonePath.lastIndexOf(QDir::separator()));
|
||||
mRingtoneFolder = mRingtonePath.left(mRingtonePath.lastIndexOf(QDir::separator()));
|
||||
CoreModel::getInstance()->getCore()->enableNativeRinging(true);
|
||||
}
|
||||
|
||||
// Network
|
||||
|
|
|
|||
|
|
@ -472,7 +472,9 @@ void SettingsModel::setRingtone(QString ringtonePath) {
|
|||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||
QFileInfo ringtone(ringtonePath);
|
||||
if (ringtonePath.isEmpty() || !ringtone.exists()) {
|
||||
CoreModel::getInstance()->getCore()->enableNativeRinging(true);
|
||||
} else {
|
||||
CoreModel::getInstance()->getCore()->enableNativeRinging(false);
|
||||
CoreModel::getInstance()->getCore()->setRing(Utils::appStringToCoreString(ringtonePath));
|
||||
emit ringtoneChanged(ringtonePath);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue