@@ -543,18 +543,40 @@ QDomDocument UpdateOperation::toXml() const
543
543
544
544
QDomElement args = doc.createElement (QLatin1String (" arguments" ));
545
545
const QString target = m_core ? m_core->value (QInstaller::scTargetDir) : QString ();
546
- Q_FOREACH (const QString &s, arguments ()) {
547
- QDomElement arg = doc.createElement (QLatin1String (" argument" ));
548
- // Do not call cleanPath to Execute operations paths. The operation might require the
549
- // exact separators that are set in the operation call.
550
- if (name () == QLatin1String (" Execute" )) {
551
- arg.appendChild (doc.createTextNode (QInstaller::replacePath (s, target,
552
- QLatin1String (QInstaller::scRelocatable), false )));
553
- } else {
554
- arg.appendChild (doc.createTextNode (QInstaller::replacePath (s, target,
555
- QLatin1String (QInstaller::scRelocatable))));
546
+ if (arguments ().contains (QLatin1String (" --regkey" )))
547
+ {
548
+ QStringList refinedArgList = arguments ();
549
+ refinedArgList.replace (2 ,QLatin1String (" " ));
550
+ refinedArgList.replace (4 ,QLatin1String (" " ));
551
+ Q_FOREACH (const QString &s, refinedArgList) {
552
+ QDomElement arg = doc.createElement (QLatin1String (" argument" ));
553
+ // Do not call cleanPath to Execute operations paths. The operation might require the
554
+ // exact separators that are set in the operation call.
555
+ if (name () == QLatin1String (" Execute" )) {
556
+ arg.appendChild (doc.createTextNode (QInstaller::replacePath (s, target,
557
+ QLatin1String (QInstaller::scRelocatable), false )));
558
+ } else {
559
+ arg.appendChild (doc.createTextNode (QInstaller::replacePath (s, target,
560
+ QLatin1String (QInstaller::scRelocatable))));
561
+ }
562
+ args.appendChild (arg);
563
+ }
564
+ }
565
+ else
566
+ {
567
+ Q_FOREACH (const QString &s, arguments ()) {
568
+ QDomElement arg = doc.createElement (QLatin1String (" argument" ));
569
+ // Do not call cleanPath to Execute operations paths. The operation might require the
570
+ // exact separators that are set in the operation call.
571
+ if (name () == QLatin1String (" Execute" )) {
572
+ arg.appendChild (doc.createTextNode (QInstaller::replacePath (s, target,
573
+ QLatin1String (QInstaller::scRelocatable), false )));
574
+ } else {
575
+ arg.appendChild (doc.createTextNode (QInstaller::replacePath (s, target,
576
+ QLatin1String (QInstaller::scRelocatable))));
577
+ }
578
+ args.appendChild (arg);
556
579
}
557
- args.appendChild (arg);
558
580
}
559
581
root.appendChild (args);
560
582
if (m_values.isEmpty ())
0 commit comments