Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
844db3d7
Commit
844db3d7
authored
Aug 04, 2009
by
con
Browse files
Fix adding of endlines to application output.
parent
85596e7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/outputwindow.cpp
View file @
844db3d7
...
...
@@ -49,6 +49,8 @@
#include
<QtGui/QVBoxLayout>
#include
<QtGui/QTabWidget>
#include
<QtGui/QApplication>
using
namespace
ProjectExplorer
::
Internal
;
using
namespace
ProjectExplorer
;
...
...
@@ -391,12 +393,13 @@ OutputWindow::~OutputWindow()
void
OutputWindow
::
appendOutput
(
const
QString
&
out
)
{
setMaximumBlockCount
(
MaxBlockCount
);
moveCursor
(
QTextCursor
::
End
);
if
(
out
.
endsWith
(
'\n'
))
append
PlainText
(
out
.
right
(
out
.
length
()
-
1
));
insert
PlainText
(
out
.
right
(
out
.
length
()
-
1
));
else
appendPlainText
(
out
);
insertPlainText
(
out
);
// insert newline and get automatic scroll behavior
appendPlainText
(
""
);
// makes sure that there's an newline in front
enableUndoRedo
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment