From ac0140b029bad4de90d628e12814a6448817fd7d Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Mon, 16 Jun 2014 20:32:48 +0100
Subject: [PATCH 5/9] Fix RunProgram variable substitution

Patch from https://bugreports.qt-project.org/browse/QTIFW-397
Using <RunProgram>@TargetDir@/blah.exe</RunProgram> would use only the
default value of TargetDir, and ignored any user modification.
---
 src/libs/installer/packagemanagergui.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp
index 34e1471..a233a4b 100644
--- a/src/libs/installer/packagemanagergui.cpp
+++ b/src/libs/installer/packagemanagergui.cpp
@@ -3097,8 +3097,9 @@ void FinishedPage::leaving()
 */
 void FinishedPage::handleFinishClicked()
 {
+    // Applied patch from https://bugreports.qt-project.org/browse/QTIFW-397
     const QString program =
-        packageManagerCore()->replaceVariables(packageManagerCore()->value(scRunProgram));
+        packageManagerCore()->replaceVariables(packageManagerCore()->settings().runProgram());
 
     const QStringList args = packageManagerCore()->replaceVariables(packageManagerCore()
         ->values(scRunProgramArguments));
-- 
2.7.0

