forked from qt-creator/qt-creator
OutputWindow: Reduce scope of local variable
Found by cppcheck. Change-Id: I597021ddb3317cf6320bf25eb2d52141fa1e4f80 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
André Hartmann
parent
4960b2ac2a
commit
30359f725e
@@ -439,14 +439,13 @@ void OutputWindow::appendMessage(const QString &output, OutputFormat format)
|
||||
if (sameLine) {
|
||||
d->scrollToBottom = true;
|
||||
|
||||
int newline = -1;
|
||||
bool enforceNewline = d->enforceNewline;
|
||||
d->enforceNewline = false;
|
||||
|
||||
if (enforceNewline) {
|
||||
out.prepend('\n');
|
||||
} else {
|
||||
newline = out.indexOf(QLatin1Char('\n'));
|
||||
const int newline = out.indexOf(QLatin1Char('\n'));
|
||||
moveCursor(QTextCursor::End);
|
||||
if (newline != -1) {
|
||||
if (d->formatter)
|
||||
|
Reference in New Issue
Block a user