diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp index 329f11a81b1..450cb575f7e 100644 --- a/src/plugins/debugger/debuggerdialogs.cpp +++ b/src/plugins/debugger/debuggerdialogs.cpp @@ -150,7 +150,7 @@ public: Runnable runnable; bool breakAtMain = false; bool runInTerminal = false; - QString serverStartScript; + FilePath serverStartScript; QString debugInfoLocation; }; @@ -198,7 +198,7 @@ void StartApplicationParameters::toSettings(QSettings *settings) const settings->setValue("LastExternalWorkingDirectory", runnable.workingDirectory); settings->setValue("LastExternalBreakAtMain", breakAtMain); settings->setValue("LastExternalRunInTerminal", runInTerminal); - settings->setValue("LastServerStartScript", serverStartScript); + settings->setValue("LastServerStartScript", serverStartScript.toVariant()); settings->setValue("LastDebugInfoLocation", debugInfoLocation); } @@ -212,7 +212,7 @@ void StartApplicationParameters::fromSettings(const QSettings *settings) runnable.workingDirectory = settings->value("LastExternalWorkingDirectory").toString(); breakAtMain = settings->value("LastExternalBreakAtMain").toBool(); runInTerminal = settings->value("LastExternalRunInTerminal").toBool(); - serverStartScript = settings->value("LastServerStartScript").toString(); + serverStartScript = FilePath::fromVariant(settings->value("LastServerStartScript")); debugInfoLocation = settings->value("LastDebugInfoLocation").toString(); } @@ -475,7 +475,7 @@ StartApplicationParameters StartApplicationDialog::parameters() const result.serverPort = d->serverPortSpinBox->value(); result.serverAddress = d->channelOverrideEdit->text(); result.runnable.executable = d->localExecutablePathChooser->path(); - result.serverStartScript = d->serverStartScriptPathChooser->path(); + result.serverStartScript = d->serverStartScriptPathChooser->fileName(); result.kitId = d->kitChooser->currentKitId(); result.debugInfoLocation = d->debuginfoPathChooser->path(); result.runnable.commandLineArguments = d->arguments->text(); @@ -491,7 +491,7 @@ void StartApplicationDialog::setParameters(const StartApplicationParameters &p) d->serverPortSpinBox->setValue(p.serverPort); d->channelOverrideEdit->setText(p.serverAddress); d->localExecutablePathChooser->setPath(p.runnable.executable); - d->serverStartScriptPathChooser->setPath(p.serverStartScript); + d->serverStartScriptPathChooser->setFileName(p.serverStartScript); d->debuginfoPathChooser->setPath(p.debugInfoLocation); d->arguments->setText(p.runnable.commandLineArguments); d->workingDirectory->setPath(p.runnable.workingDirectory); diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index 0c77157df51..245f3a15dad 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -400,11 +400,11 @@ void DebuggerRunTool::setCommandsForReset(const QString &commands) m_runParameters.commandsForReset = commands; } -void DebuggerRunTool::setServerStartScript(const QString &serverStartScript) +void DebuggerRunTool::setServerStartScript(const FilePath &serverStartScript) { if (!serverStartScript.isEmpty()) { // Provide script information about the environment - CommandLine serverStarter(FileName::fromString(serverStartScript), {}); + CommandLine serverStarter(serverStartScript, {}); serverStarter.addArgs({m_runParameters.inferior.executable, m_runParameters.remoteChannel}); addStartDependency(new LocalProcessRunner(this, serverStarter)); } diff --git a/src/plugins/debugger/debuggerruncontrol.h b/src/plugins/debugger/debuggerruncontrol.h index cf2227e7a1a..f5512dd9911 100644 --- a/src/plugins/debugger/debuggerruncontrol.h +++ b/src/plugins/debugger/debuggerruncontrol.h @@ -110,7 +110,7 @@ public: void setCommandsAfterConnect(const QString &commands); void setCommandsForReset(const QString &commands); - void setServerStartScript(const QString &serverStartScript); + void setServerStartScript(const Utils::FilePath &serverStartScript); void setDebugInfoLocation(const QString &debugInfoLocation); void setQmlServer(const QUrl &qmlServer);