forked from qt-creator/qt-creator
Add restore fallback functionality, make better tr()
Task-number: QTCREATORBUG-5025 Change-Id: Ia3f6fa2380dd1a93f120873f584662a267ca4d50 Reviewed-on: http://codereview.qt.nokia.com/360 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
This commit is contained in:
@@ -234,6 +234,7 @@ CppCodeStylePreferencesWidget::CppCodeStylePreferencesWidget(QWidget *parent)
|
||||
m_ui->categoryTab->setCurrentIndex(0);
|
||||
|
||||
m_ui->tabPreferencesWidget->setFlat(true);
|
||||
m_ui->fallbackWidget->setLabelText(tr("Code style settings:"));
|
||||
}
|
||||
|
||||
CppCodeStylePreferencesWidget::~CppCodeStylePreferencesWidget()
|
||||
@@ -321,15 +322,11 @@ void CppCodeStylePreferencesWidget::setCppCodeStyleSettings(const CppCodeStyleSe
|
||||
|
||||
void CppCodeStylePreferencesWidget::slotCurrentFallbackChanged(TextEditor::IFallbackPreferences *fallback)
|
||||
{
|
||||
m_ui->tabPreferencesWidget->setEnabled(!fallback);
|
||||
m_ui->contentGroupBox->setEnabled(!fallback);
|
||||
m_ui->bracesGroupBox->setEnabled(!fallback);
|
||||
m_ui->switchGroupBox->setEnabled(!fallback);
|
||||
m_ui->alignmentGroupBox->setEnabled(!fallback);
|
||||
|
||||
// if C++ global is used for style, use it for tab settings as well
|
||||
if (fallback && m_tabPreferences && m_cppCodeStylePreferences->currentFallback())
|
||||
m_tabPreferences->setCurrentFallback(m_cppCodeStylePreferences->currentFallback()->id());
|
||||
updatePreview();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user