forked from qt-creator/qt-creator
Trk: Checking errorCode of CreateProcess message.
Reviewed-by: con
This commit is contained in:
@@ -644,6 +644,7 @@ void S60DeviceRunControl::signsisProcessFinished()
|
|||||||
connect(m_launcher, SIGNAL(installingStarted()), this, SLOT(printInstallingNotice()));
|
connect(m_launcher, SIGNAL(installingStarted()), this, SLOT(printInstallingNotice()));
|
||||||
connect(m_launcher, SIGNAL(startingApplication()), this, SLOT(printStartingNotice()));
|
connect(m_launcher, SIGNAL(startingApplication()), this, SLOT(printStartingNotice()));
|
||||||
connect(m_launcher, SIGNAL(applicationRunning(uint)), this, SLOT(printRunNotice(uint)));
|
connect(m_launcher, SIGNAL(applicationRunning(uint)), this, SLOT(printRunNotice(uint)));
|
||||||
|
connect(m_launcher, SIGNAL(canNotRun(QString)), this, SLOT(printRunFailNotice(QString)));
|
||||||
connect(m_launcher, SIGNAL(applicationOutputReceived(QString)), this, SLOT(printApplicationOutput(QString)));
|
connect(m_launcher, SIGNAL(applicationOutputReceived(QString)), this, SLOT(printApplicationOutput(QString)));
|
||||||
connect(m_launcher, SIGNAL(copyProgress(int)), this, SLOT(printCopyProgress(int)));
|
connect(m_launcher, SIGNAL(copyProgress(int)), this, SLOT(printCopyProgress(int)));
|
||||||
|
|
||||||
@@ -692,6 +693,10 @@ void S60DeviceRunControl::printRunNotice(uint pid)
|
|||||||
emit addToOutputWindow(this, tr("Application running with pid %1.").arg(pid));
|
emit addToOutputWindow(this, tr("Application running with pid %1.").arg(pid));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void S60DeviceRunControl::printRunFailNotice(const QString &errorMessage) {
|
||||||
|
emit addToOutputWindow(this, tr("Could not start application: %1").arg(errorMessage));
|
||||||
|
}
|
||||||
|
|
||||||
void S60DeviceRunControl::printApplicationOutput(const QString &output)
|
void S60DeviceRunControl::printApplicationOutput(const QString &output)
|
||||||
{
|
{
|
||||||
emit addToOutputWindowInline(this, output);
|
emit addToOutputWindowInline(this, output);
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ private slots:
|
|||||||
void printInstallingNotice();
|
void printInstallingNotice();
|
||||||
void printStartingNotice();
|
void printStartingNotice();
|
||||||
void printRunNotice(uint pid);
|
void printRunNotice(uint pid);
|
||||||
|
void printRunFailNotice(const QString &errorMessage);
|
||||||
void printApplicationOutput(const QString &output);
|
void printApplicationOutput(const QString &output);
|
||||||
void runFinished();
|
void runFinished();
|
||||||
|
|
||||||
|
|||||||
@@ -368,6 +368,11 @@ void Launcher::handleCpuType(const TrkResult &result)
|
|||||||
|
|
||||||
void Launcher::handleCreateProcess(const TrkResult &result)
|
void Launcher::handleCreateProcess(const TrkResult &result)
|
||||||
{
|
{
|
||||||
|
if (result.errorCode()) {
|
||||||
|
emit canNotRun(errorMessage(result.errorCode()));
|
||||||
|
emit finished();
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 40 00 00]
|
// 40 00 00]
|
||||||
//logMessage(" RESULT: " + result.toString());
|
//logMessage(" RESULT: " + result.toString());
|
||||||
// [80 08 00 00 00 01 B5 00 00 01 B6 78 67 40 00 00 40 00 00]
|
// [80 08 00 00 00 01 B5 00 00 01 B6 78 67 40 00 00 40 00 00]
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ signals:
|
|||||||
void installingStarted();
|
void installingStarted();
|
||||||
void startingApplication();
|
void startingApplication();
|
||||||
void applicationRunning(uint pid);
|
void applicationRunning(uint pid);
|
||||||
|
void canNotRun(const QString &errorMessage);
|
||||||
void finished();
|
void finished();
|
||||||
void applicationOutputReceived(const QString &output);
|
void applicationOutputReceived(const QString &output);
|
||||||
void copyProgress(int percent);
|
void copyProgress(int percent);
|
||||||
@@ -71,8 +72,6 @@ private slots:
|
|||||||
void handleResult(const trk::TrkResult &data);
|
void handleResult(const trk::TrkResult &data);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void tryTrkRead();
|
|
||||||
|
|
||||||
// kill process and breakpoints
|
// kill process and breakpoints
|
||||||
void cleanUp();
|
void cleanUp();
|
||||||
|
|
||||||
@@ -89,7 +88,6 @@ private:
|
|||||||
void handleTrkVersion(const TrkResult &result);
|
void handleTrkVersion(const TrkResult &result);
|
||||||
void waitForTrkFinished(const TrkResult &data);
|
void waitForTrkFinished(const TrkResult &data);
|
||||||
|
|
||||||
void handleAndReportCreateProcess(const TrkResult &result);
|
|
||||||
void copyFileToRemote();
|
void copyFileToRemote();
|
||||||
void installRemotePackageSilently(const QString &filename);
|
void installRemotePackageSilently(const QString &filename);
|
||||||
void installAndRun();
|
void installAndRun();
|
||||||
|
|||||||
@@ -621,8 +621,7 @@ int WinReaderThread::tryRead()
|
|||||||
void WinReaderThread::run()
|
void WinReaderThread::run()
|
||||||
{
|
{
|
||||||
m_handles[FileHandle] = m_context->readOverlapped.hEvent;
|
m_handles[FileHandle] = m_context->readOverlapped.hEvent;
|
||||||
int readResult;
|
while ( tryRead() == 0) ;
|
||||||
while ( (readResult = tryRead()) == 0) ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WinReaderThread::terminate()
|
void WinReaderThread::terminate()
|
||||||
@@ -736,9 +735,8 @@ int UnixReaderThread::tryRead()
|
|||||||
|
|
||||||
void UnixReaderThread::run()
|
void UnixReaderThread::run()
|
||||||
{
|
{
|
||||||
int readResult;
|
|
||||||
// Read loop
|
// Read loop
|
||||||
while ( (readResult = tryRead()) == 0) ;
|
while ( tryRead() == 0) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnixReaderThread::terminate()
|
void UnixReaderThread::terminate()
|
||||||
|
|||||||
@@ -95,8 +95,6 @@ public:
|
|||||||
// Send an Ack synchronously, bypassing the queue
|
// Send an Ack synchronously, bypassing the queue
|
||||||
bool sendTrkAck(unsigned char token);
|
bool sendTrkAck(unsigned char token);
|
||||||
|
|
||||||
void tryTrkRead(); // TODO: Why public?
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void messageReceived(const trk::TrkResult &result);
|
void messageReceived(const trk::TrkResult &result);
|
||||||
// Emitted with the contents of messages enclosed in 07e, not for log output
|
// Emitted with the contents of messages enclosed in 07e, not for log output
|
||||||
|
|||||||
Reference in New Issue
Block a user