summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@digia.com>2014-08-27 10:51:40 +0200
committerKarsten Heimrich <karsten.heimrich@digia.com>2014-08-29 12:40:05 +0200
commitdf2663a932ffc1e68fbde4b9c60efb93e36b519e (patch)
tree93277db0760329fcf544dae99398a49a9ca74756 /tools
parentcf60ba8b28282d9ab08e53850b5d65a4454966f3 (diff)
Let the binary layout function find the cookie on its own.
Saves some ugly looking call convention, as we need to find the cookie anyway, pass the cookie instead of the position. Change-Id: I2227576a8ad251fac5312fc477f8381287b0d36d Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/devtool/main.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/devtool/main.cpp b/tools/devtool/main.cpp
index ef738868e..d31870e67 100644
--- a/tools/devtool/main.cpp
+++ b/tools/devtool/main.cpp
@@ -104,9 +104,9 @@ int main(int argc, char *argv[])
try {
QFile *file = new QFile(path);
QInstaller::openForRead(file);
- qint64 pos = QInstaller::BinaryContent::findMagicCookie(file,
+
+ QInstaller::BinaryLayout layout = QInstaller::BinaryContent::binaryLayout(file,
QInstaller::BinaryContent::MagicCookie);
- QInstaller::BinaryLayout layout = QInstaller::BinaryContent::readBinaryLayout(file, pos);
if (layout.magicMarker == QInstaller::BinaryContent::MagicUninstallerMarker) {
QFileInfo fi(path);
@@ -115,9 +115,8 @@ int main(int argc, char *argv[])
path = fi.absolutePath() + QLatin1Char('/') + fi.baseName() + QLatin1String(".dat");
file->setFileName(path);
- pos = QInstaller::BinaryContent::findMagicCookie(file,
+ layout = QInstaller::BinaryContent::binaryLayout(file,
QInstaller::BinaryContent::MagicCookie);
- layout = QInstaller::BinaryContent::readBinaryLayout(file, pos);
}
if (parser.isSet(update)) {