forked from qt-creator/qt-creator
Core: Save less settings
Try to not save settings that weren't changed from their default, and make it possible for defaults to change in the future. Task-number: QTCREATORBUG-24762 Change-Id: If469b72573791bc92ed535edf00271ef09b55386 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -96,8 +96,8 @@ GeneralSettingsWidget::GeneralSettingsWidget(GeneralSettings *q)
|
||||
} else {
|
||||
const bool defaultValue = Utils::HostOsInfo::isWindowsHost();
|
||||
m_ui.dpiCheckbox->setChecked(ICore::settings()->value(settingsKeyDPI, defaultValue).toBool());
|
||||
connect(m_ui.dpiCheckbox, &QCheckBox::toggled, this, [](bool checked) {
|
||||
ICore::settings()->setValue(settingsKeyDPI, checked);
|
||||
connect(m_ui.dpiCheckbox, &QCheckBox::toggled, this, [defaultValue](bool checked) {
|
||||
ICore::settings()->setValueWithDefault(settingsKeyDPI, checked, defaultValue);
|
||||
QMessageBox::information(ICore::dialogParent(),
|
||||
tr("Restart Required"),
|
||||
tr("The high DPI settings will take effect after restart."));
|
||||
|
||||
Reference in New Issue
Block a user