forked from qt-creator/qt-creator
TextEditors: Remove widget's setTabSettings method
Change-Id: If212b45e2d526534b7853f3fa23b170f61e1976e Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -512,7 +512,7 @@ CPPEditor::CPPEditor(CPPEditorWidget *editor)
|
||||
Q_GLOBAL_STATIC(CppTools::SymbolFinder, symbolFinder)
|
||||
|
||||
CPPEditorWidget::CPPEditorWidget(QWidget *parent)
|
||||
: TextEditor::BaseTextEditorWidget(parent)
|
||||
: TextEditor::BaseTextEditorWidget(new CPPEditorDocument(), parent)
|
||||
{
|
||||
baseTextDocument()->setIndenter(new CppTools::CppQtStyleIndenter);
|
||||
ctor();
|
||||
@@ -1583,14 +1583,6 @@ void CPPEditorWidget::setFontSettings(const TextEditor::FontSettings &fs)
|
||||
highlighter->rehighlight();
|
||||
}
|
||||
|
||||
void CPPEditorWidget::setTabSettings(const TextEditor::TabSettings &ts)
|
||||
{
|
||||
CppTools::QtStyleCodeFormatter formatter;
|
||||
formatter.invalidateCache(document());
|
||||
|
||||
TextEditor::BaseTextEditorWidget::setTabSettings(ts);
|
||||
}
|
||||
|
||||
void CPPEditorWidget::unCommentSelection()
|
||||
{
|
||||
Utils::unCommentSelection(this);
|
||||
@@ -2027,4 +2019,16 @@ void CPPEditorWidget::showPreProcessorWidget()
|
||||
}
|
||||
}
|
||||
|
||||
CPPEditorDocument::CPPEditorDocument()
|
||||
{
|
||||
connect(this, SIGNAL(tabSettingsChanged()),
|
||||
this, SLOT(invalidateFormatterCache()));
|
||||
}
|
||||
|
||||
void CPPEditorDocument::invalidateFormatterCache()
|
||||
{
|
||||
CppTools::QtStyleCodeFormatter formatter;
|
||||
formatter.invalidateCache(document());
|
||||
}
|
||||
|
||||
#include <cppeditor.moc>
|
||||
|
||||
Reference in New Issue
Block a user