Text editor: Introduce per project settings

With some refactorings to make the code look better.

Reviewed-by: con
This commit is contained in:
Leandro Melo
2011-02-01 14:13:54 +01:00
parent cbafc50acc
commit ea313f3ec8
46 changed files with 1955 additions and 912 deletions

View File

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