CODA: Fixed: CODA keeps handle to .SIS file

Task-number: QTCREATORBUG-4324
Reviewed-by: Kai Koehne
This commit is contained in:
Pawel Polanski
2011-04-08 12:01:38 +02:00
parent 986c9560e9
commit 3875944c2a
2 changed files with 6 additions and 4 deletions

View File

@@ -588,6 +588,7 @@ void S60DeployStep::handleSymbianInstall(const Coda::CodaCommandResult &result)
void S60DeployStep::putSendNextChunk() void S60DeployStep::putSendNextChunk()
{ {
QTC_ASSERT(m_codaDevice, return); QTC_ASSERT(m_codaDevice, return);
QTC_ASSERT(m_putFile, return);
// Read and send off next chunk // Read and send off next chunk
const quint64 pos = m_putFile->pos(); const quint64 pos = m_putFile->pos();
@@ -595,7 +596,7 @@ void S60DeployStep::putSendNextChunk()
const quint64 size = m_putFile->size(); const quint64 size = m_putFile->size();
if (data.isEmpty()) { if (data.isEmpty()) {
m_putWriteOk = true; m_putWriteOk = true;
closeRemoteFile(); closeFiles();
setCopyProgress(100); setCopyProgress(100);
} else { } else {
m_putLastChunkSize = data.size(); m_putLastChunkSize = data.size();
@@ -609,8 +610,9 @@ void S60DeployStep::putSendNextChunk()
} }
} }
void S60DeployStep::closeRemoteFile() void S60DeployStep::closeFiles()
{ {
m_putFile.reset();
QTC_ASSERT(m_codaDevice, return); QTC_ASSERT(m_codaDevice, return);
m_codaDevice->sendFileSystemCloseCommand(Coda::CodaCallback(this, &S60DeployStep::handleFileSystemClose), m_codaDevice->sendFileSystemCloseCommand(Coda::CodaCallback(this, &S60DeployStep::handleFileSystemClose),
@@ -627,7 +629,7 @@ void S60DeployStep::handleFileSystemWrite(const Coda::CodaCommandResult &result)
} }
if (!m_putWriteOk || m_putLastChunkSize < m_putChunkSize) { if (!m_putWriteOk || m_putLastChunkSize < m_putChunkSize) {
closeRemoteFile(); closeFiles();
} else { } else {
putSendNextChunk(); putSendNextChunk();
} }

View File

@@ -171,7 +171,7 @@ private:
void handleSymbianInstall(const Coda::CodaCommandResult &result); void handleSymbianInstall(const Coda::CodaCommandResult &result);
void handleFileSystemOpen(const Coda::CodaCommandResult &result); void handleFileSystemOpen(const Coda::CodaCommandResult &result);
void handleFileSystemWrite(const Coda::CodaCommandResult &result); void handleFileSystemWrite(const Coda::CodaCommandResult &result);
void closeRemoteFile(); void closeFiles();
void putSendNextChunk(); void putSendNextChunk();
void handleFileSystemClose(const Coda::CodaCommandResult &result); void handleFileSystemClose(const Coda::CodaCommandResult &result);