Commit 44f224ac authored by Robert Loehning's avatar Robert Loehning
Browse files

Trk: Checking result of TrkCloseFile

parent 319a0e2a
......@@ -629,6 +629,7 @@ void S60DeviceRunControlBase::signsisProcessFinished()
connect(m_launcher, SIGNAL(copyingStarted()), this, SLOT(printCopyingNotice()));
connect(m_launcher, SIGNAL(canNotCreateFile(QString,QString)), this, SLOT(printCreateFileFailed(QString,QString)));
connect(m_launcher, SIGNAL(canNotWriteFile(QString,QString)), this, SLOT(printWriteFileFailed(QString,QString)));
connect(m_launcher, SIGNAL(canNotCloseFile(QString,QString)), this, SLOT(printCloseFileFailed(QString,QString)));
connect(m_launcher, SIGNAL(installingStarted()), this, SLOT(printInstallingNotice()));
connect(m_launcher, SIGNAL(canNotInstall(QString,QString)), this, SLOT(printInstallFailed(QString,QString)));
connect(m_launcher, SIGNAL(copyProgress(int)), this, SLOT(printCopyProgress(int)));
......@@ -662,6 +663,12 @@ void S60DeviceRunControlBase::printWriteFileFailed(const QString &filename, cons
emit addToOutputWindow(this, tr("Could not write to file %1 on device: %2").arg(filename, errorMessage));
}
void S60DeviceRunControlBase::printCloseFileFailed(const QString &filename, const QString &errorMessage)
{
const QString msg = tr("Could not close file %1 on device: %2. It will be closed when App TRK is closed.");
emit addToOutputWindow(this, msg.arg(filename, errorMessage));
}
void S60DeviceRunControlBase::printCopyingNotice()
{
emit addToOutputWindow(this, tr("Copying install file..."));
......
......@@ -173,6 +173,7 @@ private slots:
void printCopyingNotice();
void printCreateFileFailed(const QString &filename, const QString &errorMessage);
void printWriteFileFailed(const QString &filename, const QString &errorMessage);
void printCloseFileFailed(const QString &filename, const QString &errorMessage);
void printCopyProgress(int progress);
void printInstallingNotice();
void printInstallFailed(const QString &filename, const QString &errorMessage);
......
......@@ -297,8 +297,11 @@ void Launcher::handleResult(const TrkResult &result)
void Launcher::handleTrkVersion(const TrkResult &result)
{
if (result.errorCode() || result.data.size() < 5)
if (result.errorCode() || result.data.size() < 5) {
if (d->m_startupActions == ActionPingOnly)
emit finished();
return;
}
const int trkMajor = result.data.at(1);
const int trkMinor = result.data.at(2);
const int protocolMajor = result.data.at(3);
......@@ -377,7 +380,8 @@ void Launcher::closeRemoteFile(bool failed)
void Launcher::handleFileCopied(const TrkResult &result)
{
Q_UNUSED(result)
if (result.errorCode())
emit canNotCloseFile(d->m_copyState.destinationFileName, result.errorString());
if (d->m_startupActions & ActionInstall)
installRemotePackageSilently();
else if (d->m_startupActions & ActionRun)
......
......@@ -71,6 +71,7 @@ signals:
void copyingStarted();
void canNotCreateFile(const QString &filename, const QString &errorMessage);
void canNotWriteFile(const QString &filename, const QString &errorMessage);
void canNotCloseFile(const QString &filename, const QString &errorMessage);
void installingStarted();
void canNotInstall(const QString &packageFilename, const QString &errorMessage);
void startingApplication();
......
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