mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 03:18:07 +00:00
Move IPV6 under the save scope in settings
This commit is contained in:
parent
6d9b5efcc5
commit
0df7065b5e
2 changed files with 45 additions and 1 deletions
|
|
@ -61,6 +61,9 @@ SettingsCore::SettingsCore(QObject *parent) : QObject(parent) {
|
||||||
mRingtoneFolder = mRingtonePath.left(mRingtonePath.lastIndexOf(QDir::separator()));
|
mRingtoneFolder = mRingtonePath.left(mRingtonePath.lastIndexOf(QDir::separator()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Network
|
||||||
|
mIpv6Enabled = settingsModel->getIpv6Enabled();
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
mCaptureDevices = settingsModel->getCaptureDevices();
|
mCaptureDevices = settingsModel->getCaptureDevices();
|
||||||
mPlaybackDevices = settingsModel->getPlaybackDevices();
|
mPlaybackDevices = settingsModel->getPlaybackDevices();
|
||||||
|
|
@ -162,6 +165,9 @@ SettingsCore::SettingsCore(const SettingsCore &settingsCore) {
|
||||||
mAutoDownloadReceivedFiles = settingsCore.mAutoDownloadReceivedFiles;
|
mAutoDownloadReceivedFiles = settingsCore.mAutoDownloadReceivedFiles;
|
||||||
mAutomaticallyRecordCallsEnabled = settingsCore.mAutomaticallyRecordCallsEnabled;
|
mAutomaticallyRecordCallsEnabled = settingsCore.mAutomaticallyRecordCallsEnabled;
|
||||||
|
|
||||||
|
// Network
|
||||||
|
mIpv6Enabled = settingsCore.mIpv6Enabled;
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
mCaptureDevices = settingsCore.mCaptureDevices;
|
mCaptureDevices = settingsCore.mCaptureDevices;
|
||||||
mPlaybackDevices = settingsCore.mPlaybackDevices;
|
mPlaybackDevices = settingsCore.mPlaybackDevices;
|
||||||
|
|
@ -260,6 +266,11 @@ void SettingsCore::setSelf(QSharedPointer<SettingsCore> me) {
|
||||||
mSettingsModelConnection->invokeToCore([this, enabled]() { setEchoCancellationEnabled(enabled); });
|
mSettingsModelConnection->invokeToCore([this, enabled]() { setEchoCancellationEnabled(enabled); });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// IP V6
|
||||||
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::ipv6EnabledChanged, [this](const bool enabled) {
|
||||||
|
mSettingsModelConnection->invokeToCore([this, enabled]() { setIpv6Enabled(enabled); });
|
||||||
|
});
|
||||||
|
|
||||||
// Auto download incoming files
|
// Auto download incoming files
|
||||||
mSettingsModelConnection->makeConnectToModel(
|
mSettingsModelConnection->makeConnectToModel(
|
||||||
&SettingsModel::autoDownloadReceivedFilesChanged, [this](const bool enabled) {
|
&SettingsModel::autoDownloadReceivedFilesChanged, [this](const bool enabled) {
|
||||||
|
|
@ -508,6 +519,9 @@ void SettingsCore::reset(const SettingsCore &settingsCore) {
|
||||||
setEchoCancellationEnabled(settingsCore.mEchoCancellationEnabled);
|
setEchoCancellationEnabled(settingsCore.mEchoCancellationEnabled);
|
||||||
setAutomaticallyRecordCallsEnabled(settingsCore.mAutomaticallyRecordCallsEnabled);
|
setAutomaticallyRecordCallsEnabled(settingsCore.mAutomaticallyRecordCallsEnabled);
|
||||||
|
|
||||||
|
// Network
|
||||||
|
setIpv6Enabled(settingsCore.mIpv6Enabled);
|
||||||
|
|
||||||
setAutoDownloadReceivedFiles(settingsCore.mAutoDownloadReceivedFiles);
|
setAutoDownloadReceivedFiles(settingsCore.mAutoDownloadReceivedFiles);
|
||||||
// Audio
|
// Audio
|
||||||
setCaptureDevices(settingsCore.mCaptureDevices);
|
setCaptureDevices(settingsCore.mCaptureDevices);
|
||||||
|
|
@ -624,6 +638,14 @@ void SettingsCore::setEchoCancellationEnabled(bool enabled) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SettingsCore::setIpv6Enabled(bool enabled) {
|
||||||
|
if (mIpv6Enabled != enabled) {
|
||||||
|
mIpv6Enabled = enabled;
|
||||||
|
emit ipv6EnabledChanged();
|
||||||
|
setIsSaved(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SettingsCore::setAutoDownloadReceivedFiles(bool enabled) {
|
void SettingsCore::setAutoDownloadReceivedFiles(bool enabled) {
|
||||||
if (mAutoDownloadReceivedFiles != enabled) {
|
if (mAutoDownloadReceivedFiles != enabled) {
|
||||||
mAutoDownloadReceivedFiles = enabled;
|
mAutoDownloadReceivedFiles = enabled;
|
||||||
|
|
@ -1066,6 +1088,9 @@ void SettingsCore::writeIntoModel(std::shared_ptr<SettingsModel> model) const {
|
||||||
model->setEchoCancellationEnabled(mEchoCancellationEnabled);
|
model->setEchoCancellationEnabled(mEchoCancellationEnabled);
|
||||||
model->setAutomaticallyRecordCallsEnabled(mAutomaticallyRecordCallsEnabled);
|
model->setAutomaticallyRecordCallsEnabled(mAutomaticallyRecordCallsEnabled);
|
||||||
|
|
||||||
|
// Network
|
||||||
|
model->setIpv6Enabled(mIpv6Enabled);
|
||||||
|
|
||||||
// Chat
|
// Chat
|
||||||
model->setAutoDownloadReceivedFiles(mAutoDownloadReceivedFiles);
|
model->setAutoDownloadReceivedFiles(mAutoDownloadReceivedFiles);
|
||||||
|
|
||||||
|
|
@ -1137,6 +1162,9 @@ void SettingsCore::writeFromModel(const std::shared_ptr<SettingsModel> &model) {
|
||||||
mRingtoneFileName =
|
mRingtoneFileName =
|
||||||
ringtone.exists() ? ringtone.fileName() : mRingtonePath.right(mRingtonePath.lastIndexOf(QDir::separator()));
|
ringtone.exists() ? ringtone.fileName() : mRingtonePath.right(mRingtonePath.lastIndexOf(QDir::separator()));
|
||||||
|
|
||||||
|
// Network
|
||||||
|
mIpv6Enabled = model->getIpv6Enabled();
|
||||||
|
|
||||||
// Chat
|
// Chat
|
||||||
mAutoDownloadReceivedFiles = model->getAutoDownloadReceivedFiles();
|
mAutoDownloadReceivedFiles = model->getAutoDownloadReceivedFiles();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,9 @@ public:
|
||||||
Q_PROPERTY(QVariantMap playbackDevice READ getPlaybackDevice WRITE setPlaybackDevice NOTIFY playbackDeviceChanged)
|
Q_PROPERTY(QVariantMap playbackDevice READ getPlaybackDevice WRITE setPlaybackDevice NOTIFY playbackDeviceChanged)
|
||||||
Q_PROPERTY(QVariantMap ringerDevice READ getRingerDevice WRITE setRingerDevice NOTIFY ringerDeviceChanged)
|
Q_PROPERTY(QVariantMap ringerDevice READ getRingerDevice WRITE setRingerDevice NOTIFY ringerDeviceChanged)
|
||||||
|
|
||||||
|
// Network
|
||||||
|
Q_PROPERTY(bool ipv6Enabled READ getIpv6Enabled WRITE setIpv6Enabled NOTIFY ipv6EnabledChanged)
|
||||||
|
|
||||||
Q_PROPERTY(
|
Q_PROPERTY(
|
||||||
QVariantMap conferenceLayout READ getConferenceLayout WRITE setConferenceLayout NOTIFY conferenceLayoutChanged)
|
QVariantMap conferenceLayout READ getConferenceLayout WRITE setConferenceLayout NOTIFY conferenceLayoutChanged)
|
||||||
Q_PROPERTY(
|
Q_PROPERTY(
|
||||||
|
|
@ -195,6 +198,13 @@ public:
|
||||||
Q_INVOKABLE void closeCallSettings();
|
Q_INVOKABLE void closeCallSettings();
|
||||||
Q_INVOKABLE void updateMicVolume() const;
|
Q_INVOKABLE void updateMicVolume() const;
|
||||||
|
|
||||||
|
// Network. --------------------------------------------------------------------
|
||||||
|
|
||||||
|
bool getIpv6Enabled() {
|
||||||
|
return mIpv6Enabled;
|
||||||
|
}
|
||||||
|
void setIpv6Enabled(bool enabled);
|
||||||
|
|
||||||
bool getLogsEnabled() const;
|
bool getLogsEnabled() const;
|
||||||
void setLogsEnabled(bool enabled);
|
void setLogsEnabled(bool enabled);
|
||||||
|
|
||||||
|
|
@ -245,7 +255,6 @@ public:
|
||||||
DECLARE_CORE_GETSET(bool, autoStart, AutoStart)
|
DECLARE_CORE_GETSET(bool, autoStart, AutoStart)
|
||||||
DECLARE_CORE_GETSET(bool, exitOnClose, ExitOnClose)
|
DECLARE_CORE_GETSET(bool, exitOnClose, ExitOnClose)
|
||||||
DECLARE_CORE_GETSET(bool, syncLdapContacts, SyncLdapContacts)
|
DECLARE_CORE_GETSET(bool, syncLdapContacts, SyncLdapContacts)
|
||||||
DECLARE_CORE_GETSET_MEMBER(bool, ipv6Enabled, Ipv6Enabled)
|
|
||||||
DECLARE_CORE_GETSET(QString, configLocale, ConfigLocale)
|
DECLARE_CORE_GETSET(QString, configLocale, ConfigLocale)
|
||||||
DECLARE_CORE_GETSET(QString, downloadFolder, DownloadFolder)
|
DECLARE_CORE_GETSET(QString, downloadFolder, DownloadFolder)
|
||||||
// Read-only
|
// Read-only
|
||||||
|
|
@ -285,6 +294,10 @@ signals:
|
||||||
void captureDevicesChanged(const QVariantList &devices);
|
void captureDevicesChanged(const QVariantList &devices);
|
||||||
void playbackDevicesChanged(const QVariantList &devices);
|
void playbackDevicesChanged(const QVariantList &devices);
|
||||||
void ringerDevicesChanged(const QVariantList &devices);
|
void ringerDevicesChanged(const QVariantList &devices);
|
||||||
|
|
||||||
|
// Network
|
||||||
|
void ipv6EnabledChanged();
|
||||||
|
|
||||||
void conferenceLayoutsChanged(const QVariantList &layouts);
|
void conferenceLayoutsChanged(const QVariantList &layouts);
|
||||||
void mediaEncryptionsChanged(const QVariantList &encryptions);
|
void mediaEncryptionsChanged(const QVariantList &encryptions);
|
||||||
|
|
||||||
|
|
@ -383,6 +396,9 @@ private:
|
||||||
float mPlaybackGain;
|
float mPlaybackGain;
|
||||||
int mEchoCancellationCalibration;
|
int mEchoCancellationCalibration;
|
||||||
|
|
||||||
|
// Network
|
||||||
|
bool mIpv6Enabled;
|
||||||
|
|
||||||
// Debug logs
|
// Debug logs
|
||||||
bool mLogsEnabled;
|
bool mLogsEnabled;
|
||||||
bool mFullLogsEnabled;
|
bool mFullLogsEnabled;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue