forked from qt-creator/qt-creator
Beautifier: Add const wherever applicable
Change-Id: Iba3e5793bfd0e4057074e2b04e6353ba09aa4a5f Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
committed by
David Schulz
parent
f06482ca7f
commit
e7789de28c
@@ -112,11 +112,12 @@ void ClangFormat::formatFile()
|
||||
|
||||
void ClangFormat::formatSelectedText()
|
||||
{
|
||||
TextEditor::TextEditorWidget *widget = TextEditor::TextEditorWidget::currentTextEditorWidget();
|
||||
const TextEditor::TextEditorWidget *widget
|
||||
= TextEditor::TextEditorWidget::currentTextEditorWidget();
|
||||
if (!widget)
|
||||
return;
|
||||
|
||||
QTextCursor tc = widget->textCursor();
|
||||
const QTextCursor tc = widget->textCursor();
|
||||
if (tc.hasSelection()) {
|
||||
const int offset = tc.selectionStart();
|
||||
const int length = tc.selectionEnd() - offset;
|
||||
|
||||
Reference in New Issue
Block a user