forked from qt-creator/qt-creator
Maemo: Minor style/performance issues.
This commit is contained in:
@@ -49,6 +49,7 @@
|
|||||||
|
|
||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
#include <QtCore/QProcess>
|
#include <QtCore/QProcess>
|
||||||
|
#include <QtCore/QStringBuilder>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
const char * const MAEMO_RC_ID("Qt4ProjectManager.MaemoRunConfiguration");
|
const char * const MAEMO_RC_ID("Qt4ProjectManager.MaemoRunConfiguration");
|
||||||
@@ -477,7 +478,8 @@ void MaemoRunConfiguration::updateTarget()
|
|||||||
m_executable.clear();
|
m_executable.clear();
|
||||||
m_cachedTargetInformationValid = true;
|
m_cachedTargetInformationValid = true;
|
||||||
|
|
||||||
Qt4TargetInformation info = qt4Project()->targetInformation(qt4Project()->activeQt4BuildConfiguration(),
|
Qt4TargetInformation info
|
||||||
|
= qt4Project()->targetInformation(qt4Project()->activeQt4BuildConfiguration(),
|
||||||
m_proFilePath);
|
m_proFilePath);
|
||||||
if (info.error != Qt4TargetInformation::NoError) {
|
if (info.error != Qt4TargetInformation::NoError) {
|
||||||
if (info.error == Qt4TargetInformation::ProParserError) {
|
if (info.error == Qt4TargetInformation::ProParserError) {
|
||||||
@@ -489,7 +491,8 @@ void MaemoRunConfiguration::updateTarget()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_executable = QDir::cleanPath(info.workingDir + QLatin1Char('/') + info.target);
|
m_executable
|
||||||
|
= QDir::cleanPath(info.workingDir % QLatin1Char('/') % info.target);
|
||||||
|
|
||||||
emit targetInformationChanged();
|
emit targetInformationChanged();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class MaemoRunConfigurationWidget : public QWidget
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
MaemoRunConfigurationWidget(MaemoRunConfiguration *runConfiguration,
|
explicit MaemoRunConfigurationWidget(MaemoRunConfiguration *runConfiguration,
|
||||||
QWidget *parent = 0);
|
QWidget *parent = 0);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ AbstractMaemoRunControl::AbstractMaemoRunControl(RunConfiguration *rc)
|
|||||||
connect(&deployProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this,
|
connect(&deployProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this,
|
||||||
SLOT(deployProcessFinished()));
|
SLOT(deployProcessFinished()));
|
||||||
#endif // USE_SSH_LIB
|
#endif // USE_SSH_LIB
|
||||||
|
qDebug("%s: runconfig = %p, exdecutable = %s", Q_FUNC_INFO, runConfig, qPrintable(runConfig->executable()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractMaemoRunControl::startDeployment(bool forDebugging)
|
void AbstractMaemoRunControl::startDeployment(bool forDebugging)
|
||||||
@@ -152,8 +153,8 @@ void AbstractMaemoRunControl::deploy()
|
|||||||
|
|
||||||
QStringList cmdArgs;
|
QStringList cmdArgs;
|
||||||
cmdArgs << "-P" << sshPort() << options() << deployable.fileName
|
cmdArgs << "-P" << sshPort() << options() << deployable.fileName
|
||||||
<< (devConfig.uname + QLatin1Char('@') + devConfig.host +
|
<< (devConfig.uname % QLatin1Char('@') % devConfig.host
|
||||||
QLatin1Char(':') + remoteDir());
|
% QLatin1Char(':') % remoteDir());
|
||||||
deployProcess.setWorkingDirectory(deployable.dir);
|
deployProcess.setWorkingDirectory(deployable.dir);
|
||||||
|
|
||||||
deployProcess.start(runConfig->scpCmd(), cmdArgs);
|
deployProcess.start(runConfig->scpCmd(), cmdArgs);
|
||||||
@@ -237,6 +238,7 @@ void AbstractMaemoRunControl::deploymentFinished(bool success)
|
|||||||
|
|
||||||
const QString AbstractMaemoRunControl::executableOnHost() const
|
const QString AbstractMaemoRunControl::executableOnHost() const
|
||||||
{
|
{
|
||||||
|
qDebug("runconfig->executable: %s", qPrintable(runConfig->executable()));
|
||||||
return runConfig->executable();
|
return runConfig->executable();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -474,8 +476,9 @@ MaemoDebugRunControl::MaemoDebugRunControl(RunConfiguration *runConfiguration)
|
|||||||
startParams->startMode = Debugger::StartRemote;
|
startParams->startMode = Debugger::StartRemote;
|
||||||
startParams->executable = executableOnHost();
|
startParams->executable = executableOnHost();
|
||||||
startParams->remoteChannel
|
startParams->remoteChannel
|
||||||
= devConfig.host + QLatin1Char(':') + QString::number(devConfig.gdbServerPort);
|
= devConfig.host % QLatin1Char(':')
|
||||||
startParams->remoteArchitecture = "arm";
|
% QString::number(devConfig.gdbServerPort);
|
||||||
|
startParams->remoteArchitecture = QLatin1String("arm");
|
||||||
startParams->sysRoot = runConfig->sysRoot();
|
startParams->sysRoot = runConfig->sysRoot();
|
||||||
startParams->toolChainType = ToolChain::GCC_MAEMO;
|
startParams->toolChainType = ToolChain::GCC_MAEMO;
|
||||||
startParams->debuggerCommand = runConfig->gdbCmd();
|
startParams->debuggerCommand = runConfig->gdbCmd();
|
||||||
|
|||||||
Reference in New Issue
Block a user