summaryrefslogtreecommitdiffstats
path: root/installerbuilder/libinstaller/getrepositorymetainfojob.cpp
diff options
context:
space:
mode:
authorkh1 <qt-info@nokia.com>2011-07-12 22:33:07 +0200
committerkh1 <qt-info@nokia.com>2011-07-12 22:33:07 +0200
commit3c79343be154d22c5fe76b70fa908781deb25005 (patch)
tree0bf0fb57a198dd2ab40453a04cf6da56f541f4b1 /installerbuilder/libinstaller/getrepositorymetainfojob.cpp
parentf1e28107d113f6045a3bb033ca167389d824bd68 (diff)
Small cleanup. No need for a second QFile.
Diffstat (limited to 'installerbuilder/libinstaller/getrepositorymetainfojob.cpp')
-rw-r--r--installerbuilder/libinstaller/getrepositorymetainfojob.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/installerbuilder/libinstaller/getrepositorymetainfojob.cpp b/installerbuilder/libinstaller/getrepositorymetainfojob.cpp
index 0e626a882..b98230c61 100644
--- a/installerbuilder/libinstaller/getrepositorymetainfojob.cpp
+++ b/installerbuilder/libinstaller/getrepositorymetainfojob.cpp
@@ -175,15 +175,14 @@ void GetRepositoryMetaInfoJob::updatesXmlDownloadFinished()
emitFinishedWithError(QInstaller::ExtractionError, e.message());
return;
}
- QFile file(fn);
- const QString updatesXmlPath = m_temporaryDirectory + QLatin1String("/Updates.xml");
- if (!file.rename(updatesXmlPath)) {
+
+ QFile updatesFile(fn);
+ if (!updatesFile.rename(m_temporaryDirectory + QLatin1String("/Updates.xml"))) {
emitFinishedWithError(QInstaller::DownloadError,
- tr("Could not move Updates.xml to target location: %1.").arg(file.errorString()));
+ tr("Could not move Updates.xml to target location: %1.").arg(updatesFile.errorString()));
return;
}
- QFile updatesFile(updatesXmlPath);
if (!updatesFile.open(QIODevice::ReadOnly)) {
emitFinishedWithError(QInstaller::DownloadError, tr("Could not open Updates.xml for reading: %1.")
.arg(updatesFile.errorString()));
@@ -354,8 +353,8 @@ void GetRepositoryMetaInfoJob::metaDownloadFinished()
metaDownloadError(tr("Bad hash."));
return;
}
+ m_packageHash.removeLast();
m_currentPackageName.clear();
- m_packageHash.pop_back();
}
try {