Indenters: Move style setup into the QtStyleCodeFormatter constructors.

This makes sure styles are consistent for the editor and the quick fix
engine.
This commit is contained in:
Christian Kamm
2010-08-12 14:00:15 +02:00
parent 0355e37e53
commit 538f611503
9 changed files with 50 additions and 38 deletions

View File

@@ -29,6 +29,8 @@
#include "qmljseditorcodeformatter.h"
#include <texteditor/tabsettings.h>
#include <QtCore/QDebug>
using namespace QmlJS;
@@ -40,6 +42,12 @@ QtStyleCodeFormatter::QtStyleCodeFormatter()
{
}
QtStyleCodeFormatter::QtStyleCodeFormatter(const TextEditor::TabSettings &tabSettings)
: m_indentSize(tabSettings.m_indentSize)
{
setTabSize(tabSettings.m_tabSize);
}
void QtStyleCodeFormatter::setIndentSize(int size)
{
m_indentSize = size;