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
Tobias Hunger
qt-creator
Commits
bbe3bab2
Commit
bbe3bab2
authored
Oct 02, 2009
by
Robert Loehning
Browse files
Trk: Fixed installing without running.
parent
8b9f29f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/shared/trk/launcher.cpp
View file @
bbe3bab2
...
...
@@ -127,8 +127,6 @@ bool Launcher::startServer(QString *errorMessage)
d
->
m_device
.
sendTrkMessage
(
TrkSupported
,
TrkCallback
(
this
,
&
Launcher
::
handleSupportMask
));
d
->
m_device
.
sendTrkMessage
(
TrkCpuType
,
TrkCallback
(
this
,
&
Launcher
::
handleCpuType
));
d
->
m_device
.
sendTrkMessage
(
TrkVersions
,
TrkCallback
(
this
,
&
Launcher
::
handleTrkVersion
));
if
(
d
->
m_fileName
.
isEmpty
())
return
true
;
if
(
d
->
m_copyState
.
sourceFileName
.
isEmpty
()
||
d
->
m_copyState
.
destinationFileName
.
isEmpty
())
installAndRun
();
else
...
...
@@ -144,12 +142,12 @@ void Launcher::setVerbose(int v)
void
Launcher
::
installAndRun
()
{
if
(
!
d
->
m_installFileName
.
isEmpty
())
{
installRemotePackageSilently
(
d
->
m_installFileName
);
}
else
{
if
(
d
->
m_installFileName
.
isEmpty
())
startInferiorIfNeeded
();
}
else
installRemotePackageSilently
(
d
->
m_installFileName
);
}
void
Launcher
::
logMessage
(
const
QString
&
msg
)
{
if
(
d
->
m_verbose
)
...
...
@@ -295,7 +293,6 @@ void Launcher::handleTrkVersion(const TrkResult &result)
<<
" float size: "
<<
d
->
m_session
.
fpTypeSize
<<
" Trk: v"
<<
trkMajor
<<
'.'
<<
trkMinor
<<
" Protocol: "
<<
protocolMajor
<<
'.'
<<
protocolMinor
;
qWarning
(
"%s"
,
qPrintable
(
msg
));
d
->
m_device
.
sendTrkMessage
(
TrkPing
,
TrkCallback
(
this
,
&
Launcher
::
waitForTrkFinished
));
}
}
...
...
@@ -497,15 +494,18 @@ void Launcher::installRemotePackageSilently(const QString &fileName)
void
Launcher
::
handleInstallPackageFinished
(
const
TrkResult
&
)
{
if
(
d
->
m_fileName
.
isEmpty
())
{
if
(
d
->
m_fileName
.
isEmpty
())
emit
finished
();
}
else
{
else
startInferiorIfNeeded
();
}
}
void
Launcher
::
startInferiorIfNeeded
()
{
if
(
d
->
m_fileName
.
isEmpty
())
{
d
->
m_device
.
sendTrkMessage
(
TrkPing
,
TrkCallback
(
this
,
&
Launcher
::
waitForTrkFinished
));
return
;
}
emit
startingApplication
();
if
(
d
->
m_session
.
pid
!=
0
)
{
logMessage
(
"Process already 'started'"
);
...
...
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