forked from qt-creator/qt-creator
C++: support smart splitting of strings.
If 'enter' is pressed while the cursor is in the middle of a string, the string is ended at the current cursor position, and a new string is started on the next line. This makes it very easy to split a long string onto multiple lines. In addition, Shift+Enter insert an escape in the string, to continue the string at the beginning of next line. A setting can be used to enable or disable this option. Change-Id: Ia5f3c6989fc00d40d06bc4fe1182fe8b1318f565 Reviewed-by: Francois Ferrand <thetypz@gmail.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -99,6 +99,7 @@ QWidget *CompletionSettingsPage::widget()
|
||||
m_page->surroundSelectedText->setChecked(settings.m_surroundingAutoBrackets);
|
||||
m_page->partiallyComplete->setChecked(settings.m_partiallyComplete);
|
||||
m_page->spaceAfterFunctionName->setChecked(settings.m_spaceAfterFunctionName);
|
||||
m_page->autoSplitStrings->setChecked(settings.m_autoSplitStrings);
|
||||
m_page->enableDoxygenCheckBox->setChecked(m_commentsSettings.m_enableDoxygen);
|
||||
m_page->generateBriefCheckBox->setChecked(m_commentsSettings.m_generateBrief);
|
||||
m_page->leadingAsterisksCheckBox->setChecked(m_commentsSettings.m_leadingAsterisks);
|
||||
@@ -118,6 +119,7 @@ void CompletionSettingsPage::apply()
|
||||
settings.m_surroundingAutoBrackets = m_page->surroundSelectedText->isChecked();
|
||||
settings.m_partiallyComplete = m_page->partiallyComplete->isChecked();
|
||||
settings.m_spaceAfterFunctionName = m_page->spaceAfterFunctionName->isChecked();
|
||||
settings.m_autoSplitStrings = m_page->autoSplitStrings->isChecked();
|
||||
|
||||
TextEditor::TextEditorSettings::setCompletionSettings(settings);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user