forked from qt-creator/qt-creator
Debugger: Use Utils::FilePath for serverStartScript
Change-Id: Ia3c6263a8f020b90c6f623a6cf88169db8fc2865 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -150,7 +150,7 @@ public:
|
|||||||
Runnable runnable;
|
Runnable runnable;
|
||||||
bool breakAtMain = false;
|
bool breakAtMain = false;
|
||||||
bool runInTerminal = false;
|
bool runInTerminal = false;
|
||||||
QString serverStartScript;
|
FilePath serverStartScript;
|
||||||
QString debugInfoLocation;
|
QString debugInfoLocation;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -198,7 +198,7 @@ void StartApplicationParameters::toSettings(QSettings *settings) const
|
|||||||
settings->setValue("LastExternalWorkingDirectory", runnable.workingDirectory);
|
settings->setValue("LastExternalWorkingDirectory", runnable.workingDirectory);
|
||||||
settings->setValue("LastExternalBreakAtMain", breakAtMain);
|
settings->setValue("LastExternalBreakAtMain", breakAtMain);
|
||||||
settings->setValue("LastExternalRunInTerminal", runInTerminal);
|
settings->setValue("LastExternalRunInTerminal", runInTerminal);
|
||||||
settings->setValue("LastServerStartScript", serverStartScript);
|
settings->setValue("LastServerStartScript", serverStartScript.toVariant());
|
||||||
settings->setValue("LastDebugInfoLocation", debugInfoLocation);
|
settings->setValue("LastDebugInfoLocation", debugInfoLocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,7 +212,7 @@ void StartApplicationParameters::fromSettings(const QSettings *settings)
|
|||||||
runnable.workingDirectory = settings->value("LastExternalWorkingDirectory").toString();
|
runnable.workingDirectory = settings->value("LastExternalWorkingDirectory").toString();
|
||||||
breakAtMain = settings->value("LastExternalBreakAtMain").toBool();
|
breakAtMain = settings->value("LastExternalBreakAtMain").toBool();
|
||||||
runInTerminal = settings->value("LastExternalRunInTerminal").toBool();
|
runInTerminal = settings->value("LastExternalRunInTerminal").toBool();
|
||||||
serverStartScript = settings->value("LastServerStartScript").toString();
|
serverStartScript = FilePath::fromVariant(settings->value("LastServerStartScript"));
|
||||||
debugInfoLocation = settings->value("LastDebugInfoLocation").toString();
|
debugInfoLocation = settings->value("LastDebugInfoLocation").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -475,7 +475,7 @@ StartApplicationParameters StartApplicationDialog::parameters() const
|
|||||||
result.serverPort = d->serverPortSpinBox->value();
|
result.serverPort = d->serverPortSpinBox->value();
|
||||||
result.serverAddress = d->channelOverrideEdit->text();
|
result.serverAddress = d->channelOverrideEdit->text();
|
||||||
result.runnable.executable = d->localExecutablePathChooser->path();
|
result.runnable.executable = d->localExecutablePathChooser->path();
|
||||||
result.serverStartScript = d->serverStartScriptPathChooser->path();
|
result.serverStartScript = d->serverStartScriptPathChooser->fileName();
|
||||||
result.kitId = d->kitChooser->currentKitId();
|
result.kitId = d->kitChooser->currentKitId();
|
||||||
result.debugInfoLocation = d->debuginfoPathChooser->path();
|
result.debugInfoLocation = d->debuginfoPathChooser->path();
|
||||||
result.runnable.commandLineArguments = d->arguments->text();
|
result.runnable.commandLineArguments = d->arguments->text();
|
||||||
@@ -491,7 +491,7 @@ void StartApplicationDialog::setParameters(const StartApplicationParameters &p)
|
|||||||
d->serverPortSpinBox->setValue(p.serverPort);
|
d->serverPortSpinBox->setValue(p.serverPort);
|
||||||
d->channelOverrideEdit->setText(p.serverAddress);
|
d->channelOverrideEdit->setText(p.serverAddress);
|
||||||
d->localExecutablePathChooser->setPath(p.runnable.executable);
|
d->localExecutablePathChooser->setPath(p.runnable.executable);
|
||||||
d->serverStartScriptPathChooser->setPath(p.serverStartScript);
|
d->serverStartScriptPathChooser->setFileName(p.serverStartScript);
|
||||||
d->debuginfoPathChooser->setPath(p.debugInfoLocation);
|
d->debuginfoPathChooser->setPath(p.debugInfoLocation);
|
||||||
d->arguments->setText(p.runnable.commandLineArguments);
|
d->arguments->setText(p.runnable.commandLineArguments);
|
||||||
d->workingDirectory->setPath(p.runnable.workingDirectory);
|
d->workingDirectory->setPath(p.runnable.workingDirectory);
|
||||||
|
@@ -400,11 +400,11 @@ void DebuggerRunTool::setCommandsForReset(const QString &commands)
|
|||||||
m_runParameters.commandsForReset = commands;
|
m_runParameters.commandsForReset = commands;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerRunTool::setServerStartScript(const QString &serverStartScript)
|
void DebuggerRunTool::setServerStartScript(const FilePath &serverStartScript)
|
||||||
{
|
{
|
||||||
if (!serverStartScript.isEmpty()) {
|
if (!serverStartScript.isEmpty()) {
|
||||||
// Provide script information about the environment
|
// Provide script information about the environment
|
||||||
CommandLine serverStarter(FileName::fromString(serverStartScript), {});
|
CommandLine serverStarter(serverStartScript, {});
|
||||||
serverStarter.addArgs({m_runParameters.inferior.executable, m_runParameters.remoteChannel});
|
serverStarter.addArgs({m_runParameters.inferior.executable, m_runParameters.remoteChannel});
|
||||||
addStartDependency(new LocalProcessRunner(this, serverStarter));
|
addStartDependency(new LocalProcessRunner(this, serverStarter));
|
||||||
}
|
}
|
||||||
|
@@ -110,7 +110,7 @@ public:
|
|||||||
void setCommandsAfterConnect(const QString &commands);
|
void setCommandsAfterConnect(const QString &commands);
|
||||||
void setCommandsForReset(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 setDebugInfoLocation(const QString &debugInfoLocation);
|
||||||
|
|
||||||
void setQmlServer(const QUrl &qmlServer);
|
void setQmlServer(const QUrl &qmlServer);
|
||||||
|
Reference in New Issue
Block a user