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
c7cee130
Commit
c7cee130
authored
Apr 13, 2010
by
ck
Browse files
Maemo: Rename some run control symbols.
Rename function to better reflect its meaning. Add prefix to class members.
parent
51177675
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp
View file @
c7cee130
...
...
@@ -59,8 +59,8 @@ using ProjectExplorer::ToolChain;
AbstractMaemoRunControl
::
AbstractMaemoRunControl
(
RunConfiguration
*
rc
)
:
RunControl
(
rc
)
,
runConfig
(
qobject_cast
<
MaemoRunConfiguration
*>
(
rc
))
,
devConfig
(
runConfig
?
runConfig
->
deviceConfig
()
:
MaemoDeviceConfig
())
,
m_
runConfig
(
qobject_cast
<
MaemoRunConfiguration
*>
(
rc
))
,
m_
devConfig
(
m_
runConfig
?
m_
runConfig
->
deviceConfig
()
:
MaemoDeviceConfig
())
{
}
...
...
@@ -82,20 +82,20 @@ void AbstractMaemoRunControl::stop()
void
AbstractMaemoRunControl
::
startDeployment
(
bool
forDebugging
)
{
QTC_ASSERT
(
runConfig
,
return
);
QTC_ASSERT
(
m_
runConfig
,
return
);
if
(
m_stoppedByUser
)
{
handleDeploymentFinished
(
false
);
}
else
if
(
devConfig
.
isValid
())
{
}
else
if
(
m_
devConfig
.
isValid
())
{
m_deployables
.
clear
();
if
(
runConfig
->
currentlyNeedsDeployment
(
devConfig
.
host
))
{
if
(
m_
runConfig
->
currentlyNeedsDeployment
(
m_
devConfig
.
host
))
{
m_deployables
.
append
(
Deployable
(
executableFileName
(),
QFileInfo
(
executableOnHost
()).
canonicalPath
(),
&
MaemoRunConfiguration
::
wasDeployed
));
}
if
(
forDebugging
&&
runConfig
->
debuggingHelpersNeedDeployment
(
devConfig
.
host
))
{
const
QFileInfo
&
info
(
runConfig
->
dumperLib
());
&&
m_
runConfig
->
debuggingHelpersNeedDeployment
(
m_
devConfig
.
host
))
{
const
QFileInfo
&
info
(
m_
runConfig
->
dumperLib
());
m_deployables
.
append
(
Deployable
(
info
.
fileName
(),
info
.
canonicalPath
(),
&
MaemoRunConfiguration
::
debuggingHelpersDeployed
));
}
...
...
@@ -125,9 +125,9 @@ void AbstractMaemoRunControl::deploy()
deploySpecs
<<
SshDeploySpec
(
srcFilePath
,
tgtFilePath
);
}
emit
addToOutputWindow
(
this
,
tr
(
"Files to deploy: %1."
).
arg
(
files
.
join
(
" "
)));
m_sshDeployer
.
reset
(
new
MaemoSshDeployer
(
devConfig
,
deploySpecs
));
m_sshDeployer
.
reset
(
new
MaemoSshDeployer
(
m_
devConfig
,
deploySpecs
));
connect
(
m_sshDeployer
.
data
(),
SIGNAL
(
finished
()),
this
,
SLOT
(
deploy
Process
Finished
()));
this
,
SLOT
(
deploy
Thread
Finished
()));
connect
(
m_sshDeployer
.
data
(),
SIGNAL
(
fileCopied
(
QString
)),
this
,
SLOT
(
handleFileCopied
()));
m_progress
.
setProgressRange
(
0
,
m_deployables
.
count
());
...
...
@@ -144,7 +144,7 @@ void AbstractMaemoRunControl::deploy()
void
AbstractMaemoRunControl
::
handleFileCopied
()
{
Deployable
deployable
=
m_deployables
.
takeFirst
();
(
runConfig
->*
deployable
.
updateTimestamp
)(
devConfig
.
host
);
(
m_
runConfig
->*
deployable
.
updateTimestamp
)(
m_
devConfig
.
host
);
m_progress
.
setProgressValue
(
m_progress
.
progressValue
()
+
1
);
}
...
...
@@ -160,7 +160,7 @@ bool AbstractMaemoRunControl::isDeploying() const
void
AbstractMaemoRunControl
::
run
(
const
QString
&
remoteCall
)
{
m_sshRunner
.
reset
(
new
MaemoSshRunner
(
devConfig
,
remoteCall
));
m_sshRunner
.
reset
(
new
MaemoSshRunner
(
m_
devConfig
,
remoteCall
));
handleExecutionAboutToStart
(
m_sshRunner
.
data
());
m_sshRunner
->
start
();
}
...
...
@@ -191,11 +191,11 @@ void AbstractMaemoRunControl::kill(const QStringList &apps)
}
const
QString
remoteCall
=
niceKill
+
QLatin1String
(
"sleep 1; "
)
+
brutalKill
;
m_sshStopper
.
reset
(
new
MaemoSshRunner
(
devConfig
,
remoteCall
));
m_sshStopper
.
reset
(
new
MaemoSshRunner
(
m_
devConfig
,
remoteCall
));
m_sshStopper
->
start
();
}
void
AbstractMaemoRunControl
::
deploy
Process
Finished
()
void
AbstractMaemoRunControl
::
deploy
Thread
Finished
()
{
const
bool
success
=
!
m_sshDeployer
->
hasError
();
if
(
m_stoppedByUser
)
{
...
...
@@ -213,15 +213,15 @@ void AbstractMaemoRunControl::deployProcessFinished()
const
QString
AbstractMaemoRunControl
::
executableOnHost
()
const
{
qDebug
(
"runconfig->executable: %s"
,
qPrintable
(
runConfig
->
executable
()));
return
runConfig
->
executable
();
qDebug
(
"runconfig->executable: %s"
,
qPrintable
(
m_
runConfig
->
executable
()));
return
m_
runConfig
->
executable
();
}
const
QString
AbstractMaemoRunControl
::
sshPort
()
const
{
return
devConfig
.
type
==
MaemoDeviceConfig
::
Physical
?
QString
::
number
(
devConfig
.
sshPort
)
:
runConfig
->
simulatorSshPort
();
return
m_
devConfig
.
type
==
MaemoDeviceConfig
::
Physical
?
QString
::
number
(
m_
devConfig
.
sshPort
)
:
m_
runConfig
->
simulatorSshPort
();
}
const
QString
AbstractMaemoRunControl
::
executableFileName
()
const
...
...
@@ -231,23 +231,23 @@ const QString AbstractMaemoRunControl::executableFileName() const
const
QString
AbstractMaemoRunControl
::
remoteDir
()
const
{
return
homeDirOnDevice
(
devConfig
.
uname
);
return
homeDirOnDevice
(
m_
devConfig
.
uname
);
}
const
QStringList
AbstractMaemoRunControl
::
options
()
const
{
const
bool
usePassword
=
devConfig
.
authentication
==
MaemoDeviceConfig
::
Password
;
=
m_
devConfig
.
authentication
==
MaemoDeviceConfig
::
Password
;
const
QLatin1String
opt
(
"-o"
);
QStringList
optionList
;
if
(
!
usePassword
)
optionList
<<
QLatin1String
(
"-i"
)
<<
devConfig
.
keyFile
;
optionList
<<
QLatin1String
(
"-i"
)
<<
m_
devConfig
.
keyFile
;
return
optionList
<<
opt
<<
QString
::
fromLatin1
(
"PasswordAuthentication=%1"
).
arg
(
usePassword
?
"yes"
:
"no"
)
<<
opt
<<
QString
::
fromLatin1
(
"PubkeyAuthentication=%1"
).
arg
(
usePassword
?
"no"
:
"yes"
)
<<
opt
<<
QString
::
fromLatin1
(
"ConnectTimeout=%1"
).
arg
(
devConfig
.
timeout
)
<<
QString
::
fromLatin1
(
"ConnectTimeout=%1"
).
arg
(
m_
devConfig
.
timeout
)
<<
opt
<<
QLatin1String
(
"CheckHostIP=no"
)
<<
opt
<<
QLatin1String
(
"StrictHostKeyChecking=no"
);
}
...
...
@@ -308,7 +308,7 @@ void MaemoRunControl::startExecution()
{
const
QString
remoteCall
=
QString
::
fromLocal8Bit
(
"%1 %2 %3"
)
.
arg
(
targetCmdLinePrefix
()).
arg
(
executableOnTarget
())
.
arg
(
runConfig
->
arguments
().
join
(
" "
));
.
arg
(
m_
runConfig
->
arguments
().
join
(
" "
));
run
(
remoteCall
);
}
...
...
@@ -353,14 +353,14 @@ MaemoDebugRunControl::MaemoDebugRunControl(RunConfiguration *runConfiguration)
m_startParams
->
startMode
=
Debugger
::
StartRemote
;
m_startParams
->
executable
=
executableOnHost
();
m_startParams
->
remoteChannel
=
devConfig
.
host
%
QLatin1Char
(
':'
)
%
gdbServerPort
();
=
m_
devConfig
.
host
%
QLatin1Char
(
':'
)
%
gdbServerPort
();
m_startParams
->
remoteArchitecture
=
QLatin1String
(
"arm"
);
m_startParams
->
sysRoot
=
runConfig
->
sysRoot
();
m_startParams
->
sysRoot
=
m_
runConfig
->
sysRoot
();
m_startParams
->
toolChainType
=
ToolChain
::
GCC_MAEMO
;
m_startParams
->
debuggerCommand
=
runConfig
->
gdbCmd
();
m_startParams
->
dumperLibrary
=
runConfig
->
dumperLib
();
m_startParams
->
debuggerCommand
=
m_
runConfig
->
gdbCmd
();
m_startParams
->
dumperLibrary
=
m_
runConfig
->
dumperLib
();
m_startParams
->
remoteDumperLib
=
QString
::
fromLocal8Bit
(
"%1/%2"
)
.
arg
(
remoteDir
()).
arg
(
QFileInfo
(
runConfig
->
dumperLib
()).
fileName
());
.
arg
(
remoteDir
()).
arg
(
QFileInfo
(
m_
runConfig
->
dumperLib
()).
fileName
());
connect
(
m_debuggerManager
,
SIGNAL
(
debuggingFinished
()),
this
,
SLOT
(
debuggingFinished
()),
Qt
::
QueuedConnection
);
...
...
@@ -401,7 +401,7 @@ void MaemoDebugRunControl::startGdbServer()
{
const
QString
remoteCall
(
QString
::
fromLocal8Bit
(
"%1 gdbserver :%2 %3 %4"
).
arg
(
targetCmdLinePrefix
()).
arg
(
gdbServerPort
())
.
arg
(
executableOnTarget
()).
arg
(
runConfig
->
arguments
().
join
(
" "
)));
.
arg
(
executableOnTarget
()).
arg
(
m_
runConfig
->
arguments
().
join
(
" "
)));
run
(
remoteCall
);
}
...
...
@@ -476,9 +476,9 @@ void MaemoDebugRunControl::debuggerOutput(const QString &output)
QString
MaemoDebugRunControl
::
gdbServerPort
()
const
{
return
devConfig
.
type
==
MaemoDeviceConfig
::
Physical
?
QString
::
number
(
devConfig
.
gdbServerPort
)
:
runConfig
->
simulatorGdbServerPort
();
return
m_
devConfig
.
type
==
MaemoDeviceConfig
::
Physical
?
QString
::
number
(
m_
devConfig
.
gdbServerPort
)
:
m_
runConfig
->
simulatorGdbServerPort
();
}
}
// namespace Internal
...
...
src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.h
View file @
c7cee130
...
...
@@ -86,12 +86,12 @@ protected:
const
QString
remoteDir
()
const
;
const
QStringList
options
()
const
;
private
slots
:
void
deploy
Process
Finished
();
void
deploy
Thread
Finished
();
void
handleFileCopied
();
protected:
MaemoRunConfiguration
*
runConfig
;
// TODO this pointer can be invalid
const
MaemoDeviceConfig
devConfig
;
MaemoRunConfiguration
*
m_
runConfig
;
// TODO this pointer can be invalid
const
MaemoDeviceConfig
m_
devConfig
;
bool
m_stoppedByUser
;
private:
...
...
Write
Preview
Supports
Markdown
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