diff options
author | kh1 <karsten.heimrich@digia.com> | 2014-07-11 15:36:38 +0200 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@digia.com> | 2014-07-15 11:37:07 +0200 |
commit | 5a3063968c21be4522f3cc5bfd9d1471cc4d57c2 (patch) | |
tree | a6930edf0ec7ba9316e4cc151c684396e5989eeb /tools/devtool/main.cpp | |
parent | 62ef1132ae0775dae628b45f2642c25b19b740a5 (diff) |
Make the marker and the find function class members.
Prepare for QTIFW-292 and QTIFW-345.
Change-Id: I065366742d28e72bc5ae55e70eabf6532b809fea
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Diffstat (limited to 'tools/devtool/main.cpp')
-rw-r--r-- | tools/devtool/main.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/devtool/main.cpp b/tools/devtool/main.cpp index 713b0e02b..b03bc4ff1 100644 --- a/tools/devtool/main.cpp +++ b/tools/devtool/main.cpp @@ -106,17 +106,19 @@ int main(int argc, char *argv[]) try { QFile *file = new QFile(path); QInstaller::openForRead(file); - qint64 pos = QInstaller::findMagicCookie(file, QInstaller::MagicCookie); + qint64 pos = QInstaller::BinaryContent::findMagicCookie(file, + QInstaller::BinaryContent::MagicCookie); QInstaller::BinaryLayout layout = QInstaller::BinaryContent::readBinaryLayout(file, pos); - if (layout.magicMarker == QInstaller::MagicUninstallerMarker) { + if (layout.magicMarker == QInstaller::BinaryContent::MagicUninstallerMarker) { QFileInfo fi(path); if (QInstaller::isInBundle(fi.absoluteFilePath(), &bundlePath)) fi.setFile(bundlePath); path = fi.absolutePath() + QLatin1Char('/') + fi.baseName() + QLatin1String(".dat"); file->setFileName(path); - pos = QInstaller::findMagicCookie(file, QInstaller::MagicCookie); + pos = QInstaller::BinaryContent::findMagicCookie(file, + QInstaller::BinaryContent::MagicCookie); layout = QInstaller::BinaryContent::readBinaryLayout(file, pos); } @@ -181,7 +183,7 @@ int main(int argc, char *argv[]) if (parser.isSet(dump)) { // To dump the content we do not need the binary format engine. - if (layout.magicMarker != QInstaller::MagicInstallerMarker) + if (layout.magicMarker != QInstaller::BinaryContent::MagicInstallerMarker) throw QInstaller::Error(QLatin1String("Source file is not an installer.")); BinaryDump bd; return bd.dump(index, parser.value(dump)); |