Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
64d65fb6
Commit
64d65fb6
authored
May 12, 2010
by
ck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Maemo: Fix corner case in end-of-remote-process detection.
parent
a8e464ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
src/plugins/qt4projectmanager/qt-maemo/maemosshthread.cpp
src/plugins/qt4projectmanager/qt-maemo/maemosshthread.cpp
+7
-5
src/plugins/qt4projectmanager/qt-maemo/maemosshthread.h
src/plugins/qt4projectmanager/qt-maemo/maemosshthread.h
+1
-0
No files found.
src/plugins/qt4projectmanager/qt-maemo/maemosshthread.cpp
View file @
64d65fb6
...
...
@@ -117,7 +117,8 @@ bool MaemoSshRunner::runInternal()
void
MaemoSshRunner
::
handleRemoteOutput
()
{
const
QByteArray
output
=
m_connection
->
waitForRemoteOutput
(
0
);
const
QByteArray
output
=
m_potentialEndMarkerPrefix
+
m_connection
->
waitForRemoteOutput
(
0
);
// Wait for a prompt before sending the command.
if
(
!
m_promptEncountered
)
{
...
...
@@ -143,8 +144,6 @@ void MaemoSshRunner::handleRemoteOutput()
/*
* The output the user should see is everything after the first
* and before the last occurrence of our marker string.
* Note: We don't currently handle the case of an incomplete unicode
* character being sent.
*/
int
firstCharToEmit
;
int
charsToEmitCount
;
...
...
@@ -168,16 +167,19 @@ void MaemoSshRunner::handleRemoteOutput()
if
(
m_endMarkerCount
==
0
)
{
charsToEmitCount
=
0
;
}
else
{
firstCharToEmit
=
0
;
firstCharToEmit
=
m_potentialEndMarkerPrefix
.
count
()
;
charsToEmitCount
=
-
1
;
}
}
if
(
charsToEmitCount
!=
0
)
if
(
charsToEmitCount
!=
0
)
{
emit
remoteOutput
(
QString
::
fromUtf8
(
output
.
data
()
+
firstCharToEmit
,
charsToEmitCount
));
}
if
(
m_endMarkerCount
==
2
)
stop
();
m_potentialEndMarkerPrefix
=
output
.
right
(
EndMarker
.
count
()
-
1
);
}
const
QByteArray
MaemoSshRunner
::
EndMarker
(
QString
(
QChar
(
0x13a0
)).
toUtf8
());
...
...
src/plugins/qt4projectmanager/qt-maemo/maemosshthread.h
View file @
64d65fb6
...
...
@@ -104,6 +104,7 @@ private:
const
char
*
m_prompt
;
int
m_endMarkerCount
;
bool
m_promptEncountered
;
QByteArray
m_potentialEndMarkerPrefix
;
};
...
...
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