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
3023495c
Commit
3023495c
authored
Dec 17, 2009
by
hjk
Browse files
debugger: don't keep scrolling to the end if the user manually moved the
cursor
parent
d29b5cd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/debuggeroutputwindow.cpp
View file @
3023495c
...
...
@@ -341,6 +341,10 @@ void DebuggerOutputWindow::showOutput(int channel, const QString &output)
{
if
(
output
.
isEmpty
())
return
;
QTextCursor
oldCursor
=
m_combinedText
->
textCursor
();
QTextCursor
cursor
=
oldCursor
;
cursor
.
movePosition
(
QTextCursor
::
End
);
bool
atEnd
=
oldCursor
.
position
()
==
cursor
.
position
();
foreach
(
QString
line
,
output
.
split
(
'\n'
))
{
// FIXME: QTextEdit asserts on really long lines...
const
int
n
=
30000
;
...
...
@@ -349,10 +353,11 @@ void DebuggerOutputWindow::showOutput(int channel, const QString &output)
if
(
line
!=
QLatin1String
(
"(gdb) "
))
m_combinedText
->
appendPlainText
(
charForChannel
(
channel
)
+
line
);
}
QTextCursor
cursor
=
m_combinedText
->
textCursor
();
cursor
.
movePosition
(
QTextCursor
::
End
);
m_combinedText
->
setTextCursor
(
cursor
);
m_combinedText
->
ensureCursorVisible
();
if
(
atEnd
)
{
m_combinedText
->
setTextCursor
(
cursor
);
m_combinedText
->
ensureCursorVisible
();
}
}
void
DebuggerOutputWindow
::
showInput
(
int
channel
,
const
QString
&
input
)
...
...
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