forked from qt-creator/qt-creator
Core: Re-order system settings dialog a bit
Change-Id: I853ac869769dd55d118bf722d3cbfa4416a54972 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -142,6 +142,7 @@ SystemSettings::SystemSettings()
|
|||||||
|
|
||||||
#ifdef ENABLE_CRASHPAD
|
#ifdef ENABLE_CRASHPAD
|
||||||
enableCrashReporting.setSettingsKey("CrashReportingEnabled");
|
enableCrashReporting.setSettingsKey("CrashReportingEnabled");
|
||||||
|
enableCrashReporting.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
|
||||||
enableCrashReporting.setLabelText(tr("Enable crash reporting"));
|
enableCrashReporting.setLabelText(tr("Enable crash reporting"));
|
||||||
enableCrashReporting.setToolTip(
|
enableCrashReporting.setToolTip(
|
||||||
Tr::tr("Allow crashes to be automatically reported. Collected reports are "
|
Tr::tr("Allow crashes to be automatically reported. Collected reports are "
|
||||||
@@ -165,8 +166,10 @@ public:
|
|||||||
, m_terminalOpenArgs(new QLineEdit)
|
, m_terminalOpenArgs(new QLineEdit)
|
||||||
, m_terminalExecuteArgs(new QLineEdit)
|
, m_terminalExecuteArgs(new QLineEdit)
|
||||||
, m_environmentChangesLabel(new Utils::ElidingLabel)
|
, m_environmentChangesLabel(new Utils::ElidingLabel)
|
||||||
, m_clearCrashReportsButton(new QPushButton(Tr::tr("Clear Local Crash Reports")))
|
#ifdef ENABLE_CRASHPAD
|
||||||
, m_crashReportsSizeText(new QLabel)
|
, m_clearCrashReportsButton(new QPushButton(Tr::tr("Clear Local Crash Reports"), this))
|
||||||
|
, m_crashReportsSizeText(new QLabel(this))
|
||||||
|
#endif
|
||||||
|
|
||||||
{
|
{
|
||||||
SystemSettings &s = systemSettings();
|
SystemSettings &s = systemSettings();
|
||||||
@@ -191,54 +194,56 @@ public:
|
|||||||
resetFileBrowserButton->setToolTip(Tr::tr("Reset to default."));
|
resetFileBrowserButton->setToolTip(Tr::tr("Reset to default."));
|
||||||
auto helpExternalFileBrowserButton = new QToolButton;
|
auto helpExternalFileBrowserButton = new QToolButton;
|
||||||
helpExternalFileBrowserButton->setText(Tr::tr("?"));
|
helpExternalFileBrowserButton->setText(Tr::tr("?"));
|
||||||
auto helpCrashReportingButton = new QToolButton;
|
#ifdef ENABLE_CRASHPAD
|
||||||
|
auto helpCrashReportingButton = new QToolButton(this);
|
||||||
helpCrashReportingButton->setText(Tr::tr("?"));
|
helpCrashReportingButton->setText(Tr::tr("?"));
|
||||||
|
#endif
|
||||||
auto resetTerminalButton = new QPushButton(Tr::tr("Reset"));
|
auto resetTerminalButton = new QPushButton(Tr::tr("Reset"));
|
||||||
resetTerminalButton->setToolTip(Tr::tr("Reset to default.", "Terminal"));
|
resetTerminalButton->setToolTip(Tr::tr("Reset to default.", "Terminal"));
|
||||||
auto environmentButton = new QPushButton(Tr::tr("Change..."));
|
auto environmentButton = new QPushButton(Tr::tr("Change..."));
|
||||||
environmentButton->setSizePolicy(QSizePolicy::Fixed,
|
environmentButton->setSizePolicy(QSizePolicy::Fixed,
|
||||||
environmentButton->sizePolicy().verticalPolicy());
|
environmentButton->sizePolicy().verticalPolicy());
|
||||||
|
|
||||||
Grid form;
|
Grid grid;
|
||||||
form.addRow(
|
grid.addRow({Tr::tr("Environment:"),
|
||||||
{Tr::tr("Environment:"), Span(2, Row{m_environmentChangesLabel, environmentButton})});
|
Span(3, m_environmentChangesLabel), environmentButton});
|
||||||
if (HostOsInfo::isAnyUnixHost()) {
|
if (HostOsInfo::isAnyUnixHost()) {
|
||||||
form.addRow({Tr::tr("Terminal:"),
|
grid.addRow({Tr::tr("Terminal:"),
|
||||||
Span(2,
|
m_terminalComboBox,
|
||||||
Row{m_terminalComboBox,
|
m_terminalOpenArgs,
|
||||||
m_terminalOpenArgs,
|
m_terminalExecuteArgs,
|
||||||
m_terminalExecuteArgs,
|
resetTerminalButton});
|
||||||
resetTerminalButton})});
|
|
||||||
}
|
}
|
||||||
if (HostOsInfo::isAnyUnixHost() && !HostOsInfo::isMacHost()) {
|
if (HostOsInfo::isAnyUnixHost() && !HostOsInfo::isMacHost()) {
|
||||||
form.addRow({Tr::tr("External file browser:"),
|
grid.addRow({Tr::tr("External file browser:"),
|
||||||
Span(2,
|
Span(3, m_externalFileBrowserEdit),
|
||||||
Row{m_externalFileBrowserEdit,
|
resetFileBrowserButton,
|
||||||
resetFileBrowserButton,
|
helpExternalFileBrowserButton});
|
||||||
helpExternalFileBrowserButton})});
|
|
||||||
}
|
}
|
||||||
form.addRow({Span(3, s.patchCommand)});
|
grid.addRow({Span(4, s.patchCommand)});
|
||||||
if (HostOsInfo::isMacHost()) {
|
if (HostOsInfo::isMacHost()) {
|
||||||
form.addRow({fileSystemCaseSensitivityLabel,
|
grid.addRow({fileSystemCaseSensitivityLabel,
|
||||||
Span(2, Row{m_fileSystemCaseSensitivityChooser, st})});
|
m_fileSystemCaseSensitivityChooser});
|
||||||
}
|
}
|
||||||
form.addRow({s.reloadSetting, st});
|
grid.addRow({s.reloadSetting});
|
||||||
form.addRow({s.autoSaveModifiedFiles, Span(2, Row{s.autoSaveInterval, st})});
|
grid.addRow({s.autoSaveModifiedFiles, Row{s.autoSaveInterval, st}});
|
||||||
form.addRow({Span(3, s.autoSaveAfterRefactoring)});
|
grid.addRow({s.autoSuspendEnabled, Row{s.autoSuspendMinDocumentCount, st}});
|
||||||
form.addRow({s.autoSuspendEnabled, Span(2, Row{s.autoSuspendMinDocumentCount, st})});
|
grid.addRow({s.autoSaveAfterRefactoring});
|
||||||
form.addRow({s.warnBeforeOpeningBigFiles, Span(2, Row{s.bigFileSizeLimitInMB, st})});
|
grid.addRow({s.warnBeforeOpeningBigFiles, Row{s.bigFileSizeLimitInMB, st}});
|
||||||
form.addRow({Tr::tr("Maximum number of entries in \"Recent Files\":"),
|
grid.addRow({Tr::tr("Maximum number of entries in \"Recent Files\":"),
|
||||||
Span(2, Row{s.maxRecentFiles, st})});
|
Row{s.maxRecentFiles, st}});
|
||||||
form.addRow({s.askBeforeExit});
|
grid.addRow({s.askBeforeExit});
|
||||||
#ifdef ENABLE_CRASHPAD
|
#ifdef ENABLE_CRASHPAD
|
||||||
form.addRow({Span(3, Row{s.enableCrashReporting, helpCrashReportingButton, st})});
|
grid.addRow({s.enableCrashReporting,
|
||||||
form.addRow({Span(3, Row{m_clearCrashReportsButton, m_crashReportsSizeText, st})});
|
Row{m_clearCrashReportsButton,
|
||||||
|
m_crashReportsSizeText,
|
||||||
|
helpCrashReportingButton, st}});
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
Group {
|
Group {
|
||||||
title(Tr::tr("System")),
|
title(Tr::tr("System")),
|
||||||
Column { form, st }
|
Column { grid, st }
|
||||||
}
|
}
|
||||||
}.attachTo(this);
|
}.attachTo(this);
|
||||||
|
|
||||||
@@ -367,8 +372,10 @@ private:
|
|||||||
QLineEdit *m_terminalOpenArgs;
|
QLineEdit *m_terminalOpenArgs;
|
||||||
QLineEdit *m_terminalExecuteArgs;
|
QLineEdit *m_terminalExecuteArgs;
|
||||||
Utils::ElidingLabel *m_environmentChangesLabel;
|
Utils::ElidingLabel *m_environmentChangesLabel;
|
||||||
|
#ifdef ENABLE_CRASHPAD
|
||||||
QPushButton *m_clearCrashReportsButton;
|
QPushButton *m_clearCrashReportsButton;
|
||||||
QLabel *m_crashReportsSizeText;
|
QLabel *m_crashReportsSizeText;
|
||||||
|
#endif
|
||||||
QPointer<QMessageBox> m_dialog;
|
QPointer<QMessageBox> m_dialog;
|
||||||
EnvironmentItems m_environmentChanges;
|
EnvironmentItems m_environmentChanges;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user