forked from qt-creator/qt-creator
Maemo: Some adaptations for Harmattan.
Reviewed-by: kh1
This commit is contained in:
@@ -227,9 +227,9 @@ void MaemoDeployStep::stop()
|
|||||||
|
|
||||||
if (remoteProcessRunning) {
|
if (remoteProcessRunning) {
|
||||||
const QByteArray programToKill
|
const QByteArray programToKill
|
||||||
= m_currentDeviceDeployAction ? "cp" : "dpkg";
|
= m_currentDeviceDeployAction ? "/bin/cp" : "/usr/bin/dpkg";
|
||||||
const QByteArray cmdLine = "pkill -x " + programToKill
|
const QByteArray cmdLine = "pkill " + programToKill
|
||||||
+ "; sleep 1; pkill -x -9 " + programToKill;
|
+ "; sleep 1; pkill -9 " + programToKill;
|
||||||
SshRemoteProcess::Ptr killProc
|
SshRemoteProcess::Ptr killProc
|
||||||
= m_connection->createRemoteProcess(cmdLine);
|
= m_connection->createRemoteProcess(cmdLine);
|
||||||
killProc->start();
|
killProc->start();
|
||||||
|
@@ -48,8 +48,8 @@ QString MaemoGlobal::remoteSudo()
|
|||||||
|
|
||||||
QString MaemoGlobal::remoteCommandPrefix(const QString &commandFilePath)
|
QString MaemoGlobal::remoteCommandPrefix(const QString &commandFilePath)
|
||||||
{
|
{
|
||||||
return QString::fromLocal8Bit("%1 chmod a+x %2 && source /etc/profile && DISPLAY=:0.0 ")
|
return QString::fromLocal8Bit("%1 chmod a+x %2 && source /etc/profile; "
|
||||||
.arg(remoteSudo()).arg(commandFilePath);
|
"source /home/user/.profile; ").arg(remoteSudo(), commandFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MaemoGlobal::remoteEnvironment(const QList<ProjectExplorer::EnvironmentItem> &list)
|
QString MaemoGlobal::remoteEnvironment(const QList<ProjectExplorer::EnvironmentItem> &list)
|
||||||
|
@@ -144,8 +144,8 @@ void MaemoSshRunner::cleanup(bool initialCleanup)
|
|||||||
QString niceKill;
|
QString niceKill;
|
||||||
QString brutalKill;
|
QString brutalKill;
|
||||||
foreach (const QString &proc, m_procsToKill) {
|
foreach (const QString &proc, m_procsToKill) {
|
||||||
niceKill += QString::fromLocal8Bit("pkill -x %1;").arg(proc);
|
niceKill += QString::fromLocal8Bit("pkill %1\\$;").arg(proc);
|
||||||
brutalKill += QString::fromLocal8Bit("pkill -x -9 %1;").arg(proc);
|
brutalKill += QString::fromLocal8Bit("pkill -9 %1\\$;").arg(proc);
|
||||||
}
|
}
|
||||||
QString remoteCall = niceKill + QLatin1String("sleep 1; ") + brutalKill;
|
QString remoteCall = niceKill + QLatin1String("sleep 1; ") + brutalKill;
|
||||||
remoteCall.remove(remoteCall.count() - 1, 1); // Get rid of trailing semicolon.
|
remoteCall.remove(remoteCall.count() - 1, 1); // Get rid of trailing semicolon.
|
||||||
|
Reference in New Issue
Block a user