Skip to content
Snippets Groups Projects
Commit 038b7582 authored by ck's avatar ck
Browse files

Maemo: Minor style/performance issues.

parent 49c43aaa
No related branches found
No related tags found
No related merge requests found
...@@ -49,6 +49,7 @@ ...@@ -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,8 +478,9 @@ void MaemoRunConfiguration::updateTarget() ...@@ -477,8 +478,9 @@ void MaemoRunConfiguration::updateTarget()
m_executable.clear(); m_executable.clear();
m_cachedTargetInformationValid = true; m_cachedTargetInformationValid = true;
Qt4TargetInformation info = qt4Project()->targetInformation(qt4Project()->activeQt4BuildConfiguration(), Qt4TargetInformation info
m_proFilePath); = qt4Project()->targetInformation(qt4Project()->activeQt4BuildConfiguration(),
m_proFilePath);
if (info.error != Qt4TargetInformation::NoError) { if (info.error != Qt4TargetInformation::NoError) {
if (info.error == Qt4TargetInformation::ProParserError) { if (info.error == Qt4TargetInformation::ProParserError) {
Core::ICore::instance()->messageManager()->printToOutputPane(tr( Core::ICore::instance()->messageManager()->printToOutputPane(tr(
...@@ -489,7 +491,8 @@ void MaemoRunConfiguration::updateTarget() ...@@ -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,8 +53,8 @@ class MaemoRunConfigurationWidget : public QWidget ...@@ -53,8 +53,8 @@ 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:
void configNameEdited(const QString &text); void configNameEdited(const QString &text);
......
...@@ -76,6 +76,7 @@ AbstractMaemoRunControl::AbstractMaemoRunControl(RunConfiguration *rc) ...@@ -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)
...@@ -87,7 +88,7 @@ void AbstractMaemoRunControl::startDeployment(bool forDebugging) ...@@ -87,7 +88,7 @@ void AbstractMaemoRunControl::startDeployment(bool forDebugging)
tr("Deploying"), QLatin1String("Maemo.Deploy")); tr("Deploying"), QLatin1String("Maemo.Deploy"));
#endif // USE_SSH_LIB #endif // USE_SSH_LIB
if (devConfig.isValid()) { if (devConfig.isValid()) {
deployables.clear(); deployables.clear();
if (runConfig->currentlyNeedsDeployment()) { if (runConfig->currentlyNeedsDeployment()) {
deployables.append(Deployable(executableFileName(), deployables.append(Deployable(executableFileName(),
QFileInfo(executableOnHost()).canonicalPath(), QFileInfo(executableOnHost()).canonicalPath(),
...@@ -152,8 +153,8 @@ void AbstractMaemoRunControl::deploy() ...@@ -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) ...@@ -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) ...@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment