Commit 33bbae9e authored by con's avatar con
Browse files

Show the user the device name in application output.

Reviewed-by: Daniel Molkentin
parent 2721eb23
......@@ -20,7 +20,7 @@
tool chain?
* seems that the make for building for device doesn't return useful exit code,
so a run is started even if the build has errors
* gcce error parser (gcc seems not to be enough sometimes, and the make tool does not return valid exit codes
* gcce error parser (gcc seems not to be enough sometimes, and the make tool does not return valid exit codes`
* Run Configurations
* handling of active run config getting disabled not optimal yet
......
......@@ -482,6 +482,7 @@ void S60DeviceRunControl::start()
Qt4Project *project = qobject_cast<Qt4Project *>(rc->project());
m_serialPortName = rc->serialPortName();
m_serialPortFriendlyName = S60Manager::instance()->serialDeviceLister()->friendlyNameForPort(m_serialPortName);
m_targetName = rc->targetName();
m_baseFileName = rc->basePackageFilePath();
m_workingDirectory = QFileInfo(m_baseFileName).absolutePath();
......@@ -589,6 +590,7 @@ void S60DeviceRunControl::signsisProcessFinished()
m_adapter->setCopyFileName(copySrc, copyDst);
m_adapter->setInstallFileName(copyDst);
m_adapter->setFileName(runFileName);
emit addToOutputWindow(this, tr("Starting application on %1...").arg(m_serialPortFriendlyName));
if (!m_adapter->startServer()) {
delete m_adapter;
m_adapter = 0;
......@@ -600,7 +602,7 @@ void S60DeviceRunControl::signsisProcessFinished()
void S60DeviceRunControl::printCopyingNotice()
{
emit addToOutputWindow(this, tr("Copying install file to device..."));
emit addToOutputWindow(this, tr("Copying install file..."));
}
void S60DeviceRunControl::printInstallingNotice()
......@@ -610,7 +612,7 @@ void S60DeviceRunControl::printInstallingNotice()
void S60DeviceRunControl::printStartingNotice()
{
emit addToOutputWindow(this, tr("Starting..."));
emit addToOutputWindow(this, tr("Starting application..."));
}
void S60DeviceRunControl::printRunNotice(uint pid)
......
......@@ -166,6 +166,7 @@ private:
void processFailed(const QString &program, QProcess::ProcessError errorCode);
QString m_serialPortName;
QString m_serialPortFriendlyName;
QString m_targetName;
QString m_baseFileName;
QString m_workingDirectory;
......
......@@ -80,6 +80,15 @@ QList<SerialDeviceLister::SerialDevice> SerialDeviceLister::serialDevices() cons
return m_devices;
}
QString SerialDeviceLister::friendlyNameForPort(const QString &port) const
{
foreach (const SerialDevice &device, m_devices) {
if (device.portName == port)
return device.friendlyName;
}
return QString();
}
void SerialDeviceLister::update()
{
updateSilently();
......
......@@ -56,6 +56,7 @@ public:
SerialDeviceLister(QObject *parent = 0);
~SerialDeviceLister();
QList<SerialDevice> serialDevices() const;
QString friendlyNameForPort(const QString &port) const;
public slots:
void update();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment