aboutsummaryrefslogtreecommitdiff
path: root/launcher/launch/steps/PreLaunchCommand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/launch/steps/PreLaunchCommand.cpp')
-rw-r--r--launcher/launch/steps/PreLaunchCommand.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/launcher/launch/steps/PreLaunchCommand.cpp b/launcher/launch/steps/PreLaunchCommand.cpp
index 1a0889c8..d3660b30 100644
--- a/launcher/launch/steps/PreLaunchCommand.cpp
+++ b/launcher/launch/steps/PreLaunchCommand.cpp
@@ -28,9 +28,18 @@ PreLaunchCommand::PreLaunchCommand(LaunchTask *parent) : LaunchStep(parent)
void PreLaunchCommand::executeTask()
{
//FIXME: where to put this?
+#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
+ auto args = QProcess::splitCommand(m_command);
+ m_parent->substituteVariables(args);
+
+ emit logLine(tr("Running Pre-Launch command: %1").arg(args.join(' ')), MessageLevel::Launcher);
+ const QString program = args.takeFirst();
+ m_process.start(program, args);
+#else
QString prelaunch_cmd = m_parent->substituteVariables(m_command);
emit logLine(tr("Running Pre-Launch command: %1").arg(prelaunch_cmd), MessageLevel::Launcher);
m_process.start(prelaunch_cmd);
+#endif
}
void PreLaunchCommand::on_state(LoggedProcess::State state)