mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
Move FPS under the save scope in settings + fix the save popup showing when not saved
This commit is contained in:
parent
c6ac29595a
commit
1e29c57ad3
3 changed files with 26 additions and 6 deletions
|
|
@ -66,6 +66,7 @@ SettingsCore::SettingsCore(QObject *parent) : QObject(parent) {
|
|||
|
||||
// Advanced
|
||||
mAutoStart = settingsModel->getAutoStart();
|
||||
mHideFps = settingsModel->getHideFps();
|
||||
|
||||
// Audio
|
||||
mCaptureDevices = settingsModel->getCaptureDevices();
|
||||
|
|
@ -122,7 +123,6 @@ SettingsCore::SettingsCore(QObject *parent) : QObject(parent) {
|
|||
INIT_CORE_MEMBER(DisableBroadcastFeature, settingsModel)
|
||||
INIT_CORE_MEMBER(HideSettings, settingsModel)
|
||||
INIT_CORE_MEMBER(HideAccountSettings, settingsModel)
|
||||
INIT_CORE_MEMBER(HideFps, settingsModel)
|
||||
INIT_CORE_MEMBER(DisableCallRecordings, settingsModel)
|
||||
INIT_CORE_MEMBER(AssistantHideCreateAccount, settingsModel)
|
||||
INIT_CORE_MEMBER(AssistantHideCreateAccount, settingsModel)
|
||||
|
|
@ -270,6 +270,11 @@ void SettingsCore::setSelf(QSharedPointer<SettingsCore> me) {
|
|||
mSettingsModelConnection->invokeToCore([this, enabled]() { setIpv6Enabled(enabled); });
|
||||
});
|
||||
|
||||
// Hide FPS
|
||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::hideFpsChanged, [this](const bool hide) {
|
||||
mSettingsModelConnection->invokeToCore([this, hide]() { setHideFps(hide); });
|
||||
});
|
||||
|
||||
// AutoStart
|
||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::autoStartChanged, [this](const bool enabled) {
|
||||
mSettingsModelConnection->invokeToCore([this, enabled]() {
|
||||
|
|
@ -656,6 +661,14 @@ void SettingsCore::setAutoStart(bool enabled) {
|
|||
}
|
||||
}
|
||||
|
||||
void SettingsCore::setHideFps(bool hide) {
|
||||
if (mHideFps != hide) {
|
||||
mHideFps = hide;
|
||||
emit hideFpsChanged();
|
||||
setIsSaved(false);
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsCore::setAutoDownloadReceivedFiles(bool enabled) {
|
||||
if (mAutoDownloadReceivedFiles != enabled) {
|
||||
mAutoDownloadReceivedFiles = enabled;
|
||||
|
|
@ -748,7 +761,7 @@ bool SettingsCore::isSaved() const {
|
|||
void SettingsCore::setIsSaved(bool saved) {
|
||||
if (mIsSaved != saved) {
|
||||
mIsSaved = saved;
|
||||
emit isSavedChanged();
|
||||
emit isSavedChanged(saved);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ public:
|
|||
|
||||
// Network
|
||||
Q_PROPERTY(bool ipv6Enabled READ getIpv6Enabled WRITE setIpv6Enabled NOTIFY ipv6EnabledChanged)
|
||||
Q_PROPERTY(bool hideFps READ getHideFps WRITE setHideFps NOTIFY hideFpsChanged)
|
||||
|
||||
// Advanced
|
||||
Q_PROPERTY(bool autoStart READ getAutoStart WRITE setAutoStart NOTIFY autoStartChanged)
|
||||
|
|
@ -215,6 +216,11 @@ public:
|
|||
}
|
||||
void setAutoStart(bool enabled);
|
||||
|
||||
bool getHideFps() {
|
||||
return mHideFps;
|
||||
}
|
||||
void setHideFps(bool hide);
|
||||
|
||||
bool getLogsEnabled() const;
|
||||
void setLogsEnabled(bool enabled);
|
||||
|
||||
|
|
@ -249,7 +255,6 @@ public:
|
|||
DECLARE_CORE_GETSET_MEMBER(bool, disableBroadcastFeature, DisableBroadcastFeature)
|
||||
DECLARE_CORE_GETSET_MEMBER(bool, hideSettings, HideSettings)
|
||||
DECLARE_CORE_GETSET_MEMBER(bool, hideAccountSettings, HideAccountSettings)
|
||||
DECLARE_CORE_GETSET_MEMBER(bool, hideFps, HideFps)
|
||||
DECLARE_CORE_GETSET_MEMBER(bool, disableCallRecordings, DisableCallRecordings)
|
||||
DECLARE_CORE_GETSET_MEMBER(bool, assistantHideCreateAccount, AssistantHideCreateAccount)
|
||||
DECLARE_CORE_GETSET_MEMBER(bool, assistantDisableQrCode, AssistantDisableQrCode)
|
||||
|
|
@ -309,6 +314,7 @@ signals:
|
|||
|
||||
// Advanced
|
||||
void autoStartChanged();
|
||||
void hideFpsChanged();
|
||||
|
||||
void conferenceLayoutsChanged(const QVariantList &layouts);
|
||||
void mediaEncryptionsChanged(const QVariantList &encryptions);
|
||||
|
|
@ -330,7 +336,7 @@ signals:
|
|||
|
||||
void createEndToEndEncryptedMeetingsAndGroupCallsChanged(bool endtoend);
|
||||
|
||||
void isSavedChanged();
|
||||
void isSavedChanged(bool saved);
|
||||
|
||||
void lSetPlaybackDevice(QVariantMap device);
|
||||
void playbackDeviceChanged(const QVariantMap &device);
|
||||
|
|
@ -413,6 +419,7 @@ private:
|
|||
|
||||
// Advanced
|
||||
bool mAutoStart;
|
||||
bool mHideFps;
|
||||
|
||||
// Debug logs
|
||||
bool mLogsEnabled;
|
||||
|
|
|
|||
|
|
@ -124,8 +124,8 @@ AbstractWindow {
|
|||
function onAssistantGoDirectlyToThirdPartySipAccountLoginChanged() {
|
||||
initStackViewItem()
|
||||
}
|
||||
function onIsSavedChanged() {
|
||||
if (SettingsCpp.isSaved) UtilsCpp.showInformationPopup(qsTr("information_popup_success_title"),
|
||||
function onIsSavedChanged(saved) {
|
||||
if (saved) UtilsCpp.showInformationPopup(qsTr("information_popup_success_title"),
|
||||
//: "Les changements ont été sauvegardés"
|
||||
qsTr("information_popup_changes_saved"), true, mainWindow)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue