Beautifier: Add const wherever applicable

Change-Id: Iba3e5793bfd0e4057074e2b04e6353ba09aa4a5f
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
Lorenz Haas
2015-06-21 19:12:02 +02:00
committed by David Schulz
parent f06482ca7f
commit e7789de28c
8 changed files with 14 additions and 14 deletions

View File

@@ -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;