Editor: New option for surrounding auto brackets

Notice that this option already existed in the auto completer. However,
from the user perspective it was synchronized with auto insert brackets.

Task-number: QTCREATORBUG-5835
Change-Id: Ia87a2ca38d89dba51380a4fdb58a5a3689ed9265
Reviewed-on: http://codereview.qt-project.org/4885
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Leandro Melo
2011-09-14 12:14:15 +02:00
committed by hjk
parent 05ceaa45c6
commit fa281be8bf
5 changed files with 114 additions and 35 deletions

View File

@@ -5536,7 +5536,8 @@ void BaseTextEditorWidget::setStorageSettings(const StorageSettings &storageSett
void BaseTextEditorWidget::setCompletionSettings(const TextEditor::CompletionSettings &completionSettings)
{
d->m_autoCompleter->setAutoParenthesesEnabled(completionSettings.m_autoInsertBrackets);
d->m_autoCompleter->setSurroundWithEnabled(completionSettings.m_autoInsertBrackets);
d->m_autoCompleter->setSurroundWithEnabled(completionSettings.m_autoInsertBrackets
&& completionSettings.m_surroundingAutoBrackets);
}
void BaseTextEditorWidget::setExtraEncodingSettings(const ExtraEncodingSettings &extraEncodingSettings)