Debugger: Use Utils::FilePath for serverStartScript

Change-Id: Ia3c6263a8f020b90c6f623a6cf88169db8fc2865
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2019-06-04 09:29:42 +02:00
parent a32b2ed666
commit 77d2cebc12
3 changed files with 8 additions and 8 deletions

View File

@@ -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);

View File

@@ -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));
}

View File

@@ -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);