summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiels Weber <niels.weber@digia.com>2013-03-14 15:39:24 +0100
committerNiels Weber <niels.weber@digia.com>2013-03-14 15:55:06 +0100
commitbbebc83ebf22b6286a82586fa8845cb3c0e94d4e (patch)
tree64bb6d4f794156cc7c2c08ec44d398bb0b7fb42f
parent98a9496395dee22ea9f1cc4ee4a319dabd06f775 (diff)
Replace child in place instead of deleting and appending.
Change-Id: Idb8463d3728d2cdbaff59c7c27ec7d2044ea2bf0 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
-rw-r--r--tools/binarycreator/binarycreator.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/binarycreator/binarycreator.cpp b/tools/binarycreator/binarycreator.cpp
index 2a5f55cc1..a6a38a9da 100644
--- a/tools/binarycreator/binarycreator.cpp
+++ b/tools/binarycreator/binarycreator.cpp
@@ -542,8 +542,7 @@ static QString createMetaDataDirectory(const QInstallerTools::PackageInfoVector
if (!QFile::copy(elementFileInfo.absoluteFilePath(), targetDir.absoluteFilePath(newName)))
throw Error(QString::fromLatin1("Could not copy %1.").arg(domElement.text()));
}
- domElement.removeChild(domElement.firstChild());
- domElement.appendChild(dom.createTextNode(newName));
+ domElement.replaceChild(dom.createTextNode(newName), domElement.firstChild());
}
openForWrite(&configXml, configXml.fileName());