forked from qt-creator/qt-creator
ProjectExplorer: FilePathify IDevice::debugServerPath
Change-Id: Ic7e5ba0ac5ff4fa2605f1e479e914cd85623c9da Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1036,7 +1036,7 @@ DebugServerRunner::DebugServerRunner(RunControl *runControl, DebugServerPortsGat
|
||||
if (isQmlDebugging && !isCppDebugging) {
|
||||
debugServer.command.setExecutable(mainRunnable.command.executable()); // FIXME: Case should not happen?
|
||||
} else {
|
||||
debugServer.command.setExecutable(FilePath::fromString(runControl->device()->debugServerPath()));
|
||||
debugServer.command.setExecutable(runControl->device()->debugServerPath());
|
||||
if (debugServer.command.isEmpty())
|
||||
debugServer.command.setExecutable("gdbserver");
|
||||
args.clear();
|
||||
|
@@ -152,7 +152,7 @@ public:
|
||||
|
||||
QSsh::SshConnectionParameters sshParameters;
|
||||
Utils::PortList freePorts;
|
||||
QString debugServerPath;
|
||||
Utils::FilePath debugServerPath;
|
||||
QString qmlRunCommand;
|
||||
bool emptyCommandAllowed = false;
|
||||
|
||||
@@ -615,7 +615,7 @@ void IDevice::fromMap(const QVariantMap &map)
|
||||
d->machineType = static_cast<MachineType>(map.value(QLatin1String(MachineTypeKey), DefaultMachineType).toInt());
|
||||
d->version = map.value(QLatin1String(VersionKey), 0).toInt();
|
||||
|
||||
d->debugServerPath = map.value(QLatin1String(DebugServerKey)).toString();
|
||||
d->debugServerPath = FilePath::fromVariant(map.value(QLatin1String(DebugServerKey)));
|
||||
d->qmlRunCommand = map.value(QLatin1String(QmlRuntimeKey)).toString();
|
||||
d->extraData = map.value(ExtraDataKey).toMap();
|
||||
}
|
||||
@@ -646,7 +646,7 @@ QVariantMap IDevice::toMap() const
|
||||
map.insert(QLatin1String(PortsSpecKey), d->freePorts.toString());
|
||||
map.insert(QLatin1String(VersionKey), d->version);
|
||||
|
||||
map.insert(QLatin1String(DebugServerKey), d->debugServerPath);
|
||||
map.insert(QLatin1String(DebugServerKey), d->debugServerPath.toVariant());
|
||||
map.insert(QLatin1String(QmlRuntimeKey), d->qmlRunCommand);
|
||||
map.insert(ExtraDataKey, d->extraData);
|
||||
|
||||
@@ -720,12 +720,12 @@ void IDevice::setMachineType(MachineType machineType)
|
||||
d->machineType = machineType;
|
||||
}
|
||||
|
||||
QString IDevice::debugServerPath() const
|
||||
FilePath IDevice::debugServerPath() const
|
||||
{
|
||||
return d->debugServerPath;
|
||||
}
|
||||
|
||||
void IDevice::setDebugServerPath(const QString &path)
|
||||
void IDevice::setDebugServerPath(const FilePath &path)
|
||||
{
|
||||
d->debugServerPath = path;
|
||||
}
|
||||
|
@@ -211,8 +211,8 @@ public:
|
||||
MachineType machineType() const;
|
||||
void setMachineType(MachineType machineType);
|
||||
|
||||
QString debugServerPath() const;
|
||||
void setDebugServerPath(const QString &path);
|
||||
Utils::FilePath debugServerPath() const;
|
||||
void setDebugServerPath(const Utils::FilePath &path);
|
||||
|
||||
QString qmlRunCommand() const;
|
||||
void setQmlRunCommand(const QString &path);
|
||||
|
@@ -129,7 +129,7 @@ void GenericLinuxDeviceConfigurationWidget::keyFileEditingFinished()
|
||||
|
||||
void GenericLinuxDeviceConfigurationWidget::gdbServerEditingFinished()
|
||||
{
|
||||
device()->setDebugServerPath(m_ui->gdbServerLineEdit->text());
|
||||
device()->setDebugServerPath(FilePath::fromString(m_ui->gdbServerLineEdit->text()));
|
||||
}
|
||||
|
||||
void GenericLinuxDeviceConfigurationWidget::handleFreePortsChanged()
|
||||
@@ -212,6 +212,6 @@ void GenericLinuxDeviceConfigurationWidget::initGui()
|
||||
m_ui->timeoutSpinBox->setValue(sshParams.timeout);
|
||||
m_ui->userLineEdit->setText(sshParams.userName());
|
||||
m_ui->keyFileLineEdit->setPath(sshParams.privateKeyFile);
|
||||
m_ui->gdbServerLineEdit->setText(device()->debugServerPath());
|
||||
m_ui->gdbServerLineEdit->setText(device()->debugServerPath().toString());
|
||||
updatePortsWarningLabel();
|
||||
}
|
||||
|
Reference in New Issue
Block a user