Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flatpak-qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marco Bubke
flatpak-qt-creator
Commits
c7cee130
Commit
c7cee130
authored
14 years ago
by
ck
Browse files
Options
Downloads
Patches
Plain Diff
Maemo: Rename some run control symbols.
Rename function to better reflect its meaning. Add prefix to class members.
parent
51177675
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp
+32
-32
32 additions, 32 deletions
src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp
src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.h
+3
-3
3 additions, 3 deletions
src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.h
with
35 additions
and
35 deletions
src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp
+
32
−
32
View file @
c7cee130
...
@@ -59,8 +59,8 @@ using ProjectExplorer::ToolChain;
...
@@ -59,8 +59,8 @@ using ProjectExplorer::ToolChain;
AbstractMaemoRunControl
::
AbstractMaemoRunControl
(
RunConfiguration
*
rc
)
AbstractMaemoRunControl
::
AbstractMaemoRunControl
(
RunConfiguration
*
rc
)
:
RunControl
(
rc
)
:
RunControl
(
rc
)
,
runConfig
(
qobject_cast
<
MaemoRunConfiguration
*>
(
rc
))
,
m_
runConfig
(
qobject_cast
<
MaemoRunConfiguration
*>
(
rc
))
,
devConfig
(
runConfig
?
runConfig
->
deviceConfig
()
:
MaemoDeviceConfig
())
,
m_
devConfig
(
m_
runConfig
?
m_
runConfig
->
deviceConfig
()
:
MaemoDeviceConfig
())
{
{
}
}
...
@@ -82,20 +82,20 @@ void AbstractMaemoRunControl::stop()
...
@@ -82,20 +82,20 @@ void AbstractMaemoRunControl::stop()
void
AbstractMaemoRunControl
::
startDeployment
(
bool
forDebugging
)
void
AbstractMaemoRunControl
::
startDeployment
(
bool
forDebugging
)
{
{
QTC_ASSERT
(
runConfig
,
return
);
QTC_ASSERT
(
m_
runConfig
,
return
);
if
(
m_stoppedByUser
)
{
if
(
m_stoppedByUser
)
{
handleDeploymentFinished
(
false
);
handleDeploymentFinished
(
false
);
}
else
if
(
devConfig
.
isValid
())
{
}
else
if
(
m_
devConfig
.
isValid
())
{
m_deployables
.
clear
();
m_deployables
.
clear
();
if
(
runConfig
->
currentlyNeedsDeployment
(
devConfig
.
host
))
{
if
(
m_
runConfig
->
currentlyNeedsDeployment
(
m_
devConfig
.
host
))
{
m_deployables
.
append
(
Deployable
(
executableFileName
(),
m_deployables
.
append
(
Deployable
(
executableFileName
(),
QFileInfo
(
executableOnHost
()).
canonicalPath
(),
QFileInfo
(
executableOnHost
()).
canonicalPath
(),
&
MaemoRunConfiguration
::
wasDeployed
));
&
MaemoRunConfiguration
::
wasDeployed
));
}
}
if
(
forDebugging
if
(
forDebugging
&&
runConfig
->
debuggingHelpersNeedDeployment
(
devConfig
.
host
))
{
&&
m_
runConfig
->
debuggingHelpersNeedDeployment
(
m_
devConfig
.
host
))
{
const
QFileInfo
&
info
(
runConfig
->
dumperLib
());
const
QFileInfo
&
info
(
m_
runConfig
->
dumperLib
());
m_deployables
.
append
(
Deployable
(
info
.
fileName
(),
info
.
canonicalPath
(),
m_deployables
.
append
(
Deployable
(
info
.
fileName
(),
info
.
canonicalPath
(),
&
MaemoRunConfiguration
::
debuggingHelpersDeployed
));
&
MaemoRunConfiguration
::
debuggingHelpersDeployed
));
}
}
...
@@ -125,9 +125,9 @@ void AbstractMaemoRunControl::deploy()
...
@@ -125,9 +125,9 @@ void AbstractMaemoRunControl::deploy()
deploySpecs
<<
SshDeploySpec
(
srcFilePath
,
tgtFilePath
);
deploySpecs
<<
SshDeploySpec
(
srcFilePath
,
tgtFilePath
);
}
}
emit
addToOutputWindow
(
this
,
tr
(
"Files to deploy: %1."
).
arg
(
files
.
join
(
" "
)));
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
()),
connect
(
m_sshDeployer
.
data
(),
SIGNAL
(
finished
()),
this
,
SLOT
(
deploy
Process
Finished
()));
this
,
SLOT
(
deploy
Thread
Finished
()));
connect
(
m_sshDeployer
.
data
(),
SIGNAL
(
fileCopied
(
QString
)),
connect
(
m_sshDeployer
.
data
(),
SIGNAL
(
fileCopied
(
QString
)),
this
,
SLOT
(
handleFileCopied
()));
this
,
SLOT
(
handleFileCopied
()));
m_progress
.
setProgressRange
(
0
,
m_deployables
.
count
());
m_progress
.
setProgressRange
(
0
,
m_deployables
.
count
());
...
@@ -144,7 +144,7 @@ void AbstractMaemoRunControl::deploy()
...
@@ -144,7 +144,7 @@ void AbstractMaemoRunControl::deploy()
void
AbstractMaemoRunControl
::
handleFileCopied
()
void
AbstractMaemoRunControl
::
handleFileCopied
()
{
{
Deployable
deployable
=
m_deployables
.
takeFirst
();
Deployable
deployable
=
m_deployables
.
takeFirst
();
(
runConfig
->*
deployable
.
updateTimestamp
)(
devConfig
.
host
);
(
m_
runConfig
->*
deployable
.
updateTimestamp
)(
m_
devConfig
.
host
);
m_progress
.
setProgressValue
(
m_progress
.
progressValue
()
+
1
);
m_progress
.
setProgressValue
(
m_progress
.
progressValue
()
+
1
);
}
}
...
@@ -160,7 +160,7 @@ bool AbstractMaemoRunControl::isDeploying() const
...
@@ -160,7 +160,7 @@ bool AbstractMaemoRunControl::isDeploying() const
void
AbstractMaemoRunControl
::
run
(
const
QString
&
remoteCall
)
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
());
handleExecutionAboutToStart
(
m_sshRunner
.
data
());
m_sshRunner
->
start
();
m_sshRunner
->
start
();
}
}
...
@@ -191,11 +191,11 @@ void AbstractMaemoRunControl::kill(const QStringList &apps)
...
@@ -191,11 +191,11 @@ void AbstractMaemoRunControl::kill(const QStringList &apps)
}
}
const
QString
remoteCall
const
QString
remoteCall
=
niceKill
+
QLatin1String
(
"sleep 1; "
)
+
brutalKill
;
=
niceKill
+
QLatin1String
(
"sleep 1; "
)
+
brutalKill
;
m_sshStopper
.
reset
(
new
MaemoSshRunner
(
devConfig
,
remoteCall
));
m_sshStopper
.
reset
(
new
MaemoSshRunner
(
m_
devConfig
,
remoteCall
));
m_sshStopper
->
start
();
m_sshStopper
->
start
();
}
}
void
AbstractMaemoRunControl
::
deploy
Process
Finished
()
void
AbstractMaemoRunControl
::
deploy
Thread
Finished
()
{
{
const
bool
success
=
!
m_sshDeployer
->
hasError
();
const
bool
success
=
!
m_sshDeployer
->
hasError
();
if
(
m_stoppedByUser
)
{
if
(
m_stoppedByUser
)
{
...
@@ -213,15 +213,15 @@ void AbstractMaemoRunControl::deployProcessFinished()
...
@@ -213,15 +213,15 @@ void AbstractMaemoRunControl::deployProcessFinished()
const
QString
AbstractMaemoRunControl
::
executableOnHost
()
const
const
QString
AbstractMaemoRunControl
::
executableOnHost
()
const
{
{
qDebug
(
"runconfig->executable: %s"
,
qPrintable
(
runConfig
->
executable
()));
qDebug
(
"runconfig->executable: %s"
,
qPrintable
(
m_
runConfig
->
executable
()));
return
runConfig
->
executable
();
return
m_
runConfig
->
executable
();
}
}
const
QString
AbstractMaemoRunControl
::
sshPort
()
const
const
QString
AbstractMaemoRunControl
::
sshPort
()
const
{
{
return
devConfig
.
type
==
MaemoDeviceConfig
::
Physical
return
m_
devConfig
.
type
==
MaemoDeviceConfig
::
Physical
?
QString
::
number
(
devConfig
.
sshPort
)
?
QString
::
number
(
m_
devConfig
.
sshPort
)
:
runConfig
->
simulatorSshPort
();
:
m_
runConfig
->
simulatorSshPort
();
}
}
const
QString
AbstractMaemoRunControl
::
executableFileName
()
const
const
QString
AbstractMaemoRunControl
::
executableFileName
()
const
...
@@ -231,23 +231,23 @@ const QString AbstractMaemoRunControl::executableFileName() const
...
@@ -231,23 +231,23 @@ const QString AbstractMaemoRunControl::executableFileName() const
const
QString
AbstractMaemoRunControl
::
remoteDir
()
const
const
QString
AbstractMaemoRunControl
::
remoteDir
()
const
{
{
return
homeDirOnDevice
(
devConfig
.
uname
);
return
homeDirOnDevice
(
m_
devConfig
.
uname
);
}
}
const
QStringList
AbstractMaemoRunControl
::
options
()
const
const
QStringList
AbstractMaemoRunControl
::
options
()
const
{
{
const
bool
usePassword
const
bool
usePassword
=
devConfig
.
authentication
==
MaemoDeviceConfig
::
Password
;
=
m_
devConfig
.
authentication
==
MaemoDeviceConfig
::
Password
;
const
QLatin1String
opt
(
"-o"
);
const
QLatin1String
opt
(
"-o"
);
QStringList
optionList
;
QStringList
optionList
;
if
(
!
usePassword
)
if
(
!
usePassword
)
optionList
<<
QLatin1String
(
"-i"
)
<<
devConfig
.
keyFile
;
optionList
<<
QLatin1String
(
"-i"
)
<<
m_
devConfig
.
keyFile
;
return
optionList
<<
opt
return
optionList
<<
opt
<<
QString
::
fromLatin1
(
"PasswordAuthentication=%1"
).
<<
QString
::
fromLatin1
(
"PasswordAuthentication=%1"
).
arg
(
usePassword
?
"yes"
:
"no"
)
<<
opt
arg
(
usePassword
?
"yes"
:
"no"
)
<<
opt
<<
QString
::
fromLatin1
(
"PubkeyAuthentication=%1"
).
<<
QString
::
fromLatin1
(
"PubkeyAuthentication=%1"
).
arg
(
usePassword
?
"no"
:
"yes"
)
<<
opt
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
(
"CheckHostIP=no"
)
<<
opt
<<
QLatin1String
(
"StrictHostKeyChecking=no"
);
<<
opt
<<
QLatin1String
(
"StrictHostKeyChecking=no"
);
}
}
...
@@ -308,7 +308,7 @@ void MaemoRunControl::startExecution()
...
@@ -308,7 +308,7 @@ void MaemoRunControl::startExecution()
{
{
const
QString
remoteCall
=
QString
::
fromLocal8Bit
(
"%1 %2 %3"
)
const
QString
remoteCall
=
QString
::
fromLocal8Bit
(
"%1 %2 %3"
)
.
arg
(
targetCmdLinePrefix
()).
arg
(
executableOnTarget
())
.
arg
(
targetCmdLinePrefix
()).
arg
(
executableOnTarget
())
.
arg
(
runConfig
->
arguments
().
join
(
" "
));
.
arg
(
m_
runConfig
->
arguments
().
join
(
" "
));
run
(
remoteCall
);
run
(
remoteCall
);
}
}
...
@@ -353,14 +353,14 @@ MaemoDebugRunControl::MaemoDebugRunControl(RunConfiguration *runConfiguration)
...
@@ -353,14 +353,14 @@ MaemoDebugRunControl::MaemoDebugRunControl(RunConfiguration *runConfiguration)
m_startParams
->
startMode
=
Debugger
::
StartRemote
;
m_startParams
->
startMode
=
Debugger
::
StartRemote
;
m_startParams
->
executable
=
executableOnHost
();
m_startParams
->
executable
=
executableOnHost
();
m_startParams
->
remoteChannel
m_startParams
->
remoteChannel
=
devConfig
.
host
%
QLatin1Char
(
':'
)
%
gdbServerPort
();
=
m_
devConfig
.
host
%
QLatin1Char
(
':'
)
%
gdbServerPort
();
m_startParams
->
remoteArchitecture
=
QLatin1String
(
"arm"
);
m_startParams
->
remoteArchitecture
=
QLatin1String
(
"arm"
);
m_startParams
->
sysRoot
=
runConfig
->
sysRoot
();
m_startParams
->
sysRoot
=
m_
runConfig
->
sysRoot
();
m_startParams
->
toolChainType
=
ToolChain
::
GCC_MAEMO
;
m_startParams
->
toolChainType
=
ToolChain
::
GCC_MAEMO
;
m_startParams
->
debuggerCommand
=
runConfig
->
gdbCmd
();
m_startParams
->
debuggerCommand
=
m_
runConfig
->
gdbCmd
();
m_startParams
->
dumperLibrary
=
runConfig
->
dumperLib
();
m_startParams
->
dumperLibrary
=
m_
runConfig
->
dumperLib
();
m_startParams
->
remoteDumperLib
=
QString
::
fromLocal8Bit
(
"%1/%2"
)
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
,
connect
(
m_debuggerManager
,
SIGNAL
(
debuggingFinished
()),
this
,
SLOT
(
debuggingFinished
()),
Qt
::
QueuedConnection
);
SLOT
(
debuggingFinished
()),
Qt
::
QueuedConnection
);
...
@@ -401,7 +401,7 @@ void MaemoDebugRunControl::startGdbServer()
...
@@ -401,7 +401,7 @@ void MaemoDebugRunControl::startGdbServer()
{
{
const
QString
remoteCall
(
QString
::
fromLocal8Bit
(
"%1 gdbserver :%2 %3 %4"
).
const
QString
remoteCall
(
QString
::
fromLocal8Bit
(
"%1 gdbserver :%2 %3 %4"
).
arg
(
targetCmdLinePrefix
()).
arg
(
gdbServerPort
())
arg
(
targetCmdLinePrefix
()).
arg
(
gdbServerPort
())
.
arg
(
executableOnTarget
()).
arg
(
runConfig
->
arguments
().
join
(
" "
)));
.
arg
(
executableOnTarget
()).
arg
(
m_
runConfig
->
arguments
().
join
(
" "
)));
run
(
remoteCall
);
run
(
remoteCall
);
}
}
...
@@ -476,9 +476,9 @@ void MaemoDebugRunControl::debuggerOutput(const QString &output)
...
@@ -476,9 +476,9 @@ void MaemoDebugRunControl::debuggerOutput(const QString &output)
QString
MaemoDebugRunControl
::
gdbServerPort
()
const
QString
MaemoDebugRunControl
::
gdbServerPort
()
const
{
{
return
devConfig
.
type
==
MaemoDeviceConfig
::
Physical
return
m_
devConfig
.
type
==
MaemoDeviceConfig
::
Physical
?
QString
::
number
(
devConfig
.
gdbServerPort
)
?
QString
::
number
(
m_
devConfig
.
gdbServerPort
)
:
runConfig
->
simulatorGdbServerPort
();
:
m_
runConfig
->
simulatorGdbServerPort
();
}
}
}
// namespace Internal
}
// namespace Internal
...
...
This diff is collapsed.
Click to expand it.
src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.h
+
3
−
3
View file @
c7cee130
...
@@ -86,12 +86,12 @@ protected:
...
@@ -86,12 +86,12 @@ protected:
const
QString
remoteDir
()
const
;
const
QString
remoteDir
()
const
;
const
QStringList
options
()
const
;
const
QStringList
options
()
const
;
private
slots
:
private
slots
:
void
deploy
Process
Finished
();
void
deploy
Thread
Finished
();
void
handleFileCopied
();
void
handleFileCopied
();
protected:
protected:
MaemoRunConfiguration
*
runConfig
;
// TODO this pointer can be invalid
MaemoRunConfiguration
*
m_
runConfig
;
// TODO this pointer can be invalid
const
MaemoDeviceConfig
devConfig
;
const
MaemoDeviceConfig
m_
devConfig
;
bool
m_stoppedByUser
;
bool
m_stoppedByUser
;
private:
private:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment