forked from qt-creator/qt-creator
Text editor: Introduce per project settings
With some refactorings to make the code look better. Reviewed-by: con
This commit is contained in:
@@ -1555,7 +1555,8 @@ void BaseTextEditor::keyPressEvent(QKeyEvent *e)
|
||||
const TabSettings &ts = d->m_document->tabSettings();
|
||||
cursor.beginEditBlock();
|
||||
|
||||
int extraBlocks = d->m_autoCompleter->paragraphSeparatorAboutToBeInserted(cursor);
|
||||
int extraBlocks =
|
||||
d->m_autoCompleter->paragraphSeparatorAboutToBeInserted(cursor, tabSettings());
|
||||
|
||||
QString previousIndentationString;
|
||||
if (ts.m_autoIndent) {
|
||||
@@ -5424,6 +5425,11 @@ void BaseTextEditor::setCompletionSettings(const TextEditor::CompletionSettings
|
||||
d->m_autoCompleter->setSurroundWithEnabled(completionSettings.m_autoInsertBrackets);
|
||||
}
|
||||
|
||||
void BaseTextEditor::setExtraEncodingSettings(const ExtraEncodingSettings &extraEncodingSettings)
|
||||
{
|
||||
d->m_document->setExtraEncodingSettings(extraEncodingSettings);
|
||||
}
|
||||
|
||||
void BaseTextEditor::fold()
|
||||
{
|
||||
QTextDocument *doc = document();
|
||||
|
||||
Reference in New Issue
Block a user