From bbebc83ebf22b6286a82586fa8845cb3c0e94d4e Mon Sep 17 00:00:00 2001 From: Niels Weber Date: Thu, 14 Mar 2013 15:39:24 +0100 Subject: Replace child in place instead of deleting and appending. Change-Id: Idb8463d3728d2cdbaff59c7c27ec7d2044ea2bf0 Reviewed-by: Tim Jenssen --- tools/binarycreator/binarycreator.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tools') 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()); -- cgit v1.2.3