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:
Jarek Kobus
2011-06-08 10:45:26 +02:00
committed by Jarek Kobus
parent e436768127
commit 2fad22c030
13 changed files with 114 additions and 81 deletions

View File

@@ -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();
}