Skip to content
GitLab
Menu
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
80e89b23
Commit
80e89b23
authored
Feb 24, 2009
by
Oswald Buddenhagen
Browse files
optimize output receiver somewhat
parent
0acae6f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/gdbengine.cpp
View file @
80e89b23
...
...
@@ -554,24 +554,29 @@ void GdbEngine::readGdbStandardError()
void
GdbEngine
::
readGdbStandardOutput
()
{
int
newstart
=
0
;
int
scan
=
m_inbuffer
.
size
();
m_inbuffer
.
append
(
m_gdbProc
.
readAllStandardOutput
());
int
newstart
=
0
;
while
(
newstart
<
m_inbuffer
.
size
())
{
int
start
=
newstart
;
int
end
=
m_inbuffer
.
indexOf
(
'\n'
,
s
tart
);
int
end
=
m_inbuffer
.
indexOf
(
'\n'
,
s
can
);
if
(
end
<
0
)
{
m_inbuffer
.
remove
(
0
,
start
);
return
;
}
newstart
=
end
+
1
;
scan
=
newstart
;
if
(
end
==
start
)
continue
;
#ifdef Q_OS_WIN
if
(
m_inbuffer
.
at
(
end
-
1
)
==
'\r'
)
{
--
end
;
if
(
end
==
start
)
continue
;
}
#endif
handleResponse
(
QByteArray
::
fromRawData
(
m_inbuffer
.
constData
()
+
start
,
end
-
start
));
}
m_inbuffer
.
clear
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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