forked from qt-creator/qt-creator
QmlJsEditor: Don't export Internal classes
Export two functions doing the actual work instead. Centralize some repeated code. Change-Id: I7de674ef7ae5537663d1227d36cc556c4ee3ed74 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -396,17 +396,8 @@ void QuickToolBar::onEnabledChanged(bool b)
|
||||
|
||||
void QuickToolBar::indentLines(int startLine, int endLine)
|
||||
{
|
||||
if (startLine > 0) {
|
||||
TextEditor::TabSettings tabSettings = m_editorWidget->textDocument()->tabSettings();
|
||||
for (int i = startLine; i <= endLine; i++) {
|
||||
QTextBlock start = m_editorWidget->document()->findBlockByNumber(i);
|
||||
|
||||
if (start.isValid()) {
|
||||
QmlJSEditor::Internal::Indenter indenterMy(m_editorWidget->document());
|
||||
indenterMy.indentBlock(start, QChar::Null, tabSettings);
|
||||
}
|
||||
}
|
||||
}
|
||||
QmlJSEditor::indentQmlJs(m_editorWidget->document(), startLine, endLine,
|
||||
m_editorWidget->textDocument()->tabSettings());
|
||||
}
|
||||
|
||||
ContextPaneWidget *QuickToolBar::contextWidget()
|
||||
|
||||
Reference in New Issue
Block a user