Let users configure the number of recent files shown

Fixes: QTCREATORBUG-21898
Change-Id: Ie804e722f9bb88762da57f157833e4dc43d8ccbf
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Christian Kandeler
2019-06-24 15:09:03 +02:00
parent 0715917414
commit bf0d84074f
5 changed files with 180 additions and 131 deletions

View File

@@ -118,6 +118,9 @@ QWidget *SystemSettings::widget()
m_page->warnBeforeOpeningBigFiles->setChecked(
EditorManagerPrivate::warnBeforeOpeningBigFilesEnabled());
m_page->bigFilesLimitSpinBox->setValue(EditorManagerPrivate::bigFileSizeLimit());
m_page->maxRecentFilesSpinBox->setMinimum(1);
m_page->maxRecentFilesSpinBox->setMaximum(99);
m_page->maxRecentFilesSpinBox->setValue(EditorManagerPrivate::maxRecentFiles());
if (HostOsInfo::isAnyUnixHost()) {
connect(m_page->resetTerminalButton, &QAbstractButton::clicked,
@@ -183,6 +186,7 @@ void SystemSettings::apply()
EditorManagerPrivate::setWarnBeforeOpeningBigFilesEnabled(
m_page->warnBeforeOpeningBigFiles->isChecked());
EditorManagerPrivate::setBigFileSizeLimit(m_page->bigFilesLimitSpinBox->value());
EditorManagerPrivate::setMaxRecentFiles(m_page->maxRecentFilesSpinBox->value());
if (HostOsInfo::isMacHost()) {
Qt::CaseSensitivity defaultSensitivity