forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user