aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/ib
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2014-01-16 13:27:48 -0500
committerJoerg Bornemann <joerg.bornemann@digia.com>2014-03-04 14:55:04 +0100
commitb13126f71d0b70dab117821903d9dc632b2c7ca6 (patch)
treefcdf1bfba1fa5954d5b6f8fb6886bfe92b5ffdd5 /share/qbs/modules/ib
parent1c20be2f88f9f539eb0fb8b3e76d03cebeb3f5d2 (diff)
Use PropertyList instead of plutil for increased performance.
Change-Id: I8ff5b11ed06bb2817e47a973d1a8043c5bcd3237 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'share/qbs/modules/ib')
-rw-r--r--share/qbs/modules/ib/IBModule.qbs20
1 files changed, 12 insertions, 8 deletions
diff --git a/share/qbs/modules/ib/IBModule.qbs b/share/qbs/modules/ib/IBModule.qbs
index 0a0049733..21117103d 100644
--- a/share/qbs/modules/ib/IBModule.qbs
+++ b/share/qbs/modules/ib/IBModule.qbs
@@ -87,14 +87,18 @@ Module {
if (process.exec("ibtool", ["--version"], true) !== 0)
print(process.readStdErr());
- var plist = new PropertyList();
- plist.readFromString(process.readStdOut());
-
- plist = JSON.parse(plist.toJSONString());
- if (plist)
- plist = plist["com.apple.ibtool.version"];
- if (plist)
- version = plist["short-bundle-version"];
+ var propertyList = new PropertyList();
+ try {
+ propertyList.readFromString(process.readStdOut());
+
+ var plist = JSON.parse(propertyList.toJSONString());
+ if (plist)
+ plist = plist["com.apple.ibtool.version"];
+ if (plist)
+ version = plist["short-bundle-version"];
+ } finally {
+ propertyList.clear();
+ }
} finally {
process.close();
}