forked from qt-creator/qt-creator
Maemo: Make gdbserver port user-configurable.
This commit is contained in:
@@ -64,7 +64,8 @@ namespace {
|
|||||||
const QLatin1String NameKey("Name");
|
const QLatin1String NameKey("Name");
|
||||||
const QLatin1String TypeKey("Type");
|
const QLatin1String TypeKey("Type");
|
||||||
const QLatin1String HostKey("Host");
|
const QLatin1String HostKey("Host");
|
||||||
const QLatin1String PortKey("Port");
|
const QLatin1String SshPortKey("SshPort");
|
||||||
|
const QLatin1String GdbServerPortKey("GdbServerPort");
|
||||||
const QLatin1String UserNameKey("Uname");
|
const QLatin1String UserNameKey("Uname");
|
||||||
const QLatin1String AuthKey("Authentication");
|
const QLatin1String AuthKey("Authentication");
|
||||||
const QLatin1String KeyFileKey("KeyFile");
|
const QLatin1String KeyFileKey("KeyFile");
|
||||||
@@ -92,7 +93,8 @@ private:
|
|||||||
MaemoDeviceConfig::MaemoDeviceConfig(const QString &name)
|
MaemoDeviceConfig::MaemoDeviceConfig(const QString &name)
|
||||||
: name(name),
|
: name(name),
|
||||||
type(Physical),
|
type(Physical),
|
||||||
port(22),
|
sshPort(22),
|
||||||
|
gdbServerPort(10000),
|
||||||
authentication(Key),
|
authentication(Key),
|
||||||
keyFile(DefaultKeyFile),
|
keyFile(DefaultKeyFile),
|
||||||
timeout(30),
|
timeout(30),
|
||||||
@@ -105,7 +107,8 @@ MaemoDeviceConfig::MaemoDeviceConfig(const QSettings &settings,
|
|||||||
: name(settings.value(NameKey).toString()),
|
: name(settings.value(NameKey).toString()),
|
||||||
type(static_cast<DeviceType>(settings.value(TypeKey, Physical).toInt())),
|
type(static_cast<DeviceType>(settings.value(TypeKey, Physical).toInt())),
|
||||||
host(settings.value(HostKey).toString()),
|
host(settings.value(HostKey).toString()),
|
||||||
port(settings.value(PortKey, 22).toInt()),
|
sshPort(settings.value(SshPortKey, 22).toInt()),
|
||||||
|
gdbServerPort(settings.value(GdbServerPortKey, 10000).toInt()),
|
||||||
uname(settings.value(UserNameKey).toString()),
|
uname(settings.value(UserNameKey).toString()),
|
||||||
authentication(static_cast<AuthType>(settings.value(AuthKey).toInt())),
|
authentication(static_cast<AuthType>(settings.value(AuthKey).toInt())),
|
||||||
pwd(settings.value(PasswordKey).toString()),
|
pwd(settings.value(PasswordKey).toString()),
|
||||||
@@ -132,7 +135,8 @@ void MaemoDeviceConfig::save(QSettings &settings) const
|
|||||||
settings.setValue(NameKey, name);
|
settings.setValue(NameKey, name);
|
||||||
settings.setValue(TypeKey, type);
|
settings.setValue(TypeKey, type);
|
||||||
settings.setValue(HostKey, host);
|
settings.setValue(HostKey, host);
|
||||||
settings.setValue(PortKey, port);
|
settings.setValue(SshPortKey, sshPort);
|
||||||
|
settings.setValue(GdbServerPortKey, gdbServerPort);
|
||||||
settings.setValue(UserNameKey, uname);
|
settings.setValue(UserNameKey, uname);
|
||||||
settings.setValue(AuthKey, authentication);
|
settings.setValue(AuthKey, authentication);
|
||||||
settings.setValue(PasswordKey, pwd);
|
settings.setValue(PasswordKey, pwd);
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ public:
|
|||||||
QString name;
|
QString name;
|
||||||
DeviceType type;
|
DeviceType type;
|
||||||
QString host;
|
QString host;
|
||||||
int port;
|
int sshPort;
|
||||||
|
int gdbServerPort;
|
||||||
QString uname;
|
QString uname;
|
||||||
AuthType authentication;
|
AuthType authentication;
|
||||||
QString pwd;
|
QString pwd;
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ void AbstractMaemoRunControl::deploy()
|
|||||||
emit addToOutputWindow(this, tr("File to deploy: %1.").arg(deployable.fileName));
|
emit addToOutputWindow(this, tr("File to deploy: %1.").arg(deployable.fileName));
|
||||||
|
|
||||||
QStringList cmdArgs;
|
QStringList cmdArgs;
|
||||||
cmdArgs << "-P" << port() << options() << deployable.fileName
|
cmdArgs << "-P" << sshPort() << options() << deployable.fileName
|
||||||
<< (devConfig.uname + "@" + devConfig.host + ":" + remoteDir());
|
<< (devConfig.uname + "@" + devConfig.host + ":" + remoteDir());
|
||||||
deployProcess.setWorkingDirectory(deployable.dir);
|
deployProcess.setWorkingDirectory(deployable.dir);
|
||||||
|
|
||||||
@@ -239,9 +239,9 @@ const QString AbstractMaemoRunControl::executableOnHost() const
|
|||||||
return runConfig->executable();
|
return runConfig->executable();
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString AbstractMaemoRunControl::port() const
|
const QString AbstractMaemoRunControl::sshPort() const
|
||||||
{
|
{
|
||||||
return QString::number(devConfig.port);
|
return QString::number(devConfig.sshPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString AbstractMaemoRunControl::executableFileName() const
|
const QString AbstractMaemoRunControl::executableFileName() const
|
||||||
@@ -376,7 +376,7 @@ void MaemoRunControl::startExecution()
|
|||||||
.arg(runConfig->arguments().join(" "));
|
.arg(runConfig->arguments().join(" "));
|
||||||
|
|
||||||
QStringList cmdArgs;
|
QStringList cmdArgs;
|
||||||
cmdArgs << "-n" << "-p" << port() << "-l" << devConfig.uname
|
cmdArgs << "-n" << "-p" << sshPort() << "-l" << devConfig.uname
|
||||||
<< options() << devConfig.host << remoteCall;
|
<< options() << devConfig.host << remoteCall;
|
||||||
sshProcess.start(runConfig->sshCmd(), cmdArgs);
|
sshProcess.start(runConfig->sshCmd(), cmdArgs);
|
||||||
|
|
||||||
@@ -428,7 +428,7 @@ void MaemoRunControl::stop()
|
|||||||
QStringList cmdArgs;
|
QStringList cmdArgs;
|
||||||
const QString remoteCall = QString::fromLocal8Bit("pkill -x %1; "
|
const QString remoteCall = QString::fromLocal8Bit("pkill -x %1; "
|
||||||
"sleep 1; pkill -x -9 %1").arg(executableFileName());
|
"sleep 1; pkill -x -9 %1").arg(executableFileName());
|
||||||
cmdArgs << "-n" << "-p" << port() << "-l" << devConfig.uname
|
cmdArgs << "-n" << "-p" << sshPort() << "-l" << devConfig.uname
|
||||||
<< options() << devConfig.host << remoteCall;
|
<< options() << devConfig.host << remoteCall;
|
||||||
stopProcess.start(runConfig->sshCmd(), cmdArgs);
|
stopProcess.start(runConfig->sshCmd(), cmdArgs);
|
||||||
#endif // USE_SSH_LIB
|
#endif // USE_SSH_LIB
|
||||||
@@ -458,7 +458,7 @@ void MaemoRunControl::handleRemoteOutput(const QString &output)
|
|||||||
|
|
||||||
MaemoDebugRunControl::MaemoDebugRunControl(RunConfiguration *runConfiguration)
|
MaemoDebugRunControl::MaemoDebugRunControl(RunConfiguration *runConfiguration)
|
||||||
: AbstractMaemoRunControl(runConfiguration)
|
: AbstractMaemoRunControl(runConfiguration)
|
||||||
, gdbServerPort("10000"), debuggerManager(0)
|
, debuggerManager(0)
|
||||||
, startParams(new Debugger::DebuggerStartParameters)
|
, startParams(new Debugger::DebuggerStartParameters)
|
||||||
{
|
{
|
||||||
#ifndef USE_SSH_LIB
|
#ifndef USE_SSH_LIB
|
||||||
@@ -472,7 +472,8 @@ MaemoDebugRunControl::MaemoDebugRunControl(RunConfiguration *runConfiguration)
|
|||||||
QTC_ASSERT(debuggerManager != 0, return);
|
QTC_ASSERT(debuggerManager != 0, return);
|
||||||
startParams->startMode = Debugger::StartRemote;
|
startParams->startMode = Debugger::StartRemote;
|
||||||
startParams->executable = executableOnHost();
|
startParams->executable = executableOnHost();
|
||||||
startParams->remoteChannel = devConfig.host + ":" + gdbServerPort;
|
startParams->remoteChannel
|
||||||
|
= devConfig.host + ":" + QString::number(devConfig.gdbServerPort);
|
||||||
startParams->remoteArchitecture = "arm";
|
startParams->remoteArchitecture = "arm";
|
||||||
startParams->sysRoot = runConfig->sysRoot();
|
startParams->sysRoot = runConfig->sysRoot();
|
||||||
startParams->toolChainType = ToolChain::GCC_MAEMO;
|
startParams->toolChainType = ToolChain::GCC_MAEMO;
|
||||||
@@ -513,8 +514,8 @@ void MaemoDebugRunControl::handleDeploymentFinished(bool success)
|
|||||||
void MaemoDebugRunControl::startGdbServer()
|
void MaemoDebugRunControl::startGdbServer()
|
||||||
{
|
{
|
||||||
const QString remoteCall(QString::fromLocal8Bit("%1 gdbserver :%2 %3 %4").
|
const QString remoteCall(QString::fromLocal8Bit("%1 gdbserver :%2 %3 %4").
|
||||||
arg(targetCmdLinePrefix()).arg(gdbServerPort). arg(executableOnTarget())
|
arg(targetCmdLinePrefix()).arg(devConfig.gdbServerPort)
|
||||||
.arg(runConfig->arguments().join(" ")));
|
.arg(executableOnTarget()).arg(runConfig->arguments().join(" ")));
|
||||||
inferiorPid = -1;
|
inferiorPid = -1;
|
||||||
#ifdef USE_SSH_LIB
|
#ifdef USE_SSH_LIB
|
||||||
sshRunner.reset(new MaemoSshRunner(devConfig, remoteCall));
|
sshRunner.reset(new MaemoSshRunner(devConfig, remoteCall));
|
||||||
@@ -524,7 +525,7 @@ void MaemoDebugRunControl::startGdbServer()
|
|||||||
#else
|
#else
|
||||||
QStringList sshArgs;
|
QStringList sshArgs;
|
||||||
sshArgs << "-t" << "-n" << "-l" << devConfig.uname << "-p"
|
sshArgs << "-t" << "-n" << "-l" << devConfig.uname << "-p"
|
||||||
<< port() << options() << devConfig.host << remoteCall;
|
<< sshPort() << options() << devConfig.host << remoteCall;
|
||||||
disconnect(&gdbServer, SIGNAL(readyReadStandardError()), 0, 0);
|
disconnect(&gdbServer, SIGNAL(readyReadStandardError()), 0, 0);
|
||||||
connect(&gdbServer, SIGNAL(readyReadStandardError()), this,
|
connect(&gdbServer, SIGNAL(readyReadStandardError()), this,
|
||||||
SLOT(gdbServerStarted()));
|
SLOT(gdbServerStarted()));
|
||||||
@@ -651,7 +652,7 @@ void MaemoDebugRunControl::debuggingFinished()
|
|||||||
const QString remoteCall = QString::fromLocal8Bit("kill %1; sleep 1; "
|
const QString remoteCall = QString::fromLocal8Bit("kill %1; sleep 1; "
|
||||||
"kill -9 %1; pkill -x -9 gdbserver").arg(inferiorPid);
|
"kill -9 %1; pkill -x -9 gdbserver").arg(inferiorPid);
|
||||||
QStringList sshArgs;
|
QStringList sshArgs;
|
||||||
sshArgs << "-n" << "-l" << devConfig.uname << "-p" << port()
|
sshArgs << "-n" << "-l" << devConfig.uname << "-p" << sshPort()
|
||||||
<< options() << devConfig.host << remoteCall;
|
<< options() << devConfig.host << remoteCall;
|
||||||
stopProcess.start(runConfig->sshCmd(), sshArgs);
|
stopProcess.start(runConfig->sshCmd(), sshArgs);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ protected:
|
|||||||
const QString executableOnHost() const;
|
const QString executableOnHost() const;
|
||||||
const QString executableOnTarget() const;
|
const QString executableOnTarget() const;
|
||||||
const QString executableFileName() const;
|
const QString executableFileName() const;
|
||||||
const QString port() const;
|
const QString sshPort() const;
|
||||||
const QString targetCmdLinePrefix() const;
|
const QString targetCmdLinePrefix() const;
|
||||||
const QString remoteDir() const;
|
const QString remoteDir() const;
|
||||||
const QStringList options() const;
|
const QStringList options() const;
|
||||||
@@ -183,7 +183,6 @@ private:
|
|||||||
QProcess gdbServer;
|
QProcess gdbServer;
|
||||||
QProcess stopProcess;
|
QProcess stopProcess;
|
||||||
#endif // USE_SSH_LIB
|
#endif // USE_SSH_LIB
|
||||||
const QString gdbServerPort;
|
|
||||||
Debugger::DebuggerManager *debuggerManager;
|
Debugger::DebuggerManager *debuggerManager;
|
||||||
QSharedPointer<Debugger::DebuggerStartParameters> startParams;
|
QSharedPointer<Debugger::DebuggerStartParameters> startParams;
|
||||||
int inferiorPid;
|
int inferiorPid;
|
||||||
|
|||||||
@@ -133,7 +133,8 @@ private slots:
|
|||||||
void deviceTypeChanged();
|
void deviceTypeChanged();
|
||||||
void authenticationTypeChanged();
|
void authenticationTypeChanged();
|
||||||
void hostNameEditingFinished();
|
void hostNameEditingFinished();
|
||||||
void portEditingFinished();
|
void sshPortEditingFinished();
|
||||||
|
void gdbServerPortEditingFinished();
|
||||||
void timeoutEditingFinished();
|
void timeoutEditingFinished();
|
||||||
void userNameEditingFinished();
|
void userNameEditingFinished();
|
||||||
void passwordEditingFinished();
|
void passwordEditingFinished();
|
||||||
@@ -161,7 +162,8 @@ private:
|
|||||||
|
|
||||||
Ui_maemoSettingsWidget *m_ui;
|
Ui_maemoSettingsWidget *m_ui;
|
||||||
QList<MaemoDeviceConfig> m_devConfs;
|
QList<MaemoDeviceConfig> m_devConfs;
|
||||||
PortAndTimeoutValidator m_portValidator;
|
PortAndTimeoutValidator m_sshPortValidator;
|
||||||
|
PortAndTimeoutValidator m_gdbServerPortValidator;
|
||||||
PortAndTimeoutValidator m_timeoutValidator;
|
PortAndTimeoutValidator m_timeoutValidator;
|
||||||
NameValidator m_nameValidator;
|
NameValidator m_nameValidator;
|
||||||
#ifdef USE_SSH_LIB
|
#ifdef USE_SSH_LIB
|
||||||
@@ -239,7 +241,8 @@ void MaemoSettingsWidget::initGui()
|
|||||||
{
|
{
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
m_ui->nameLineEdit->setValidator(&m_nameValidator);
|
m_ui->nameLineEdit->setValidator(&m_nameValidator);
|
||||||
m_ui->portLineEdit->setValidator(&m_portValidator);
|
m_ui->sshPortLineEdit->setValidator(&m_sshPortValidator);
|
||||||
|
m_ui->gdbServerPortLineEdit->setValidator(&m_gdbServerPortValidator);
|
||||||
m_ui->timeoutLineEdit->setValidator(&m_timeoutValidator);
|
m_ui->timeoutLineEdit->setValidator(&m_timeoutValidator);
|
||||||
m_ui->keyFileLineEdit->setExpectedKind(Utils::PathChooser::File);
|
m_ui->keyFileLineEdit->setExpectedKind(Utils::PathChooser::File);
|
||||||
foreach(const MaemoDeviceConfig &devConf, m_devConfs)
|
foreach(const MaemoDeviceConfig &devConf, m_devConfs)
|
||||||
@@ -305,14 +308,17 @@ void MaemoSettingsWidget::display(const MaemoDeviceConfig &devConfig)
|
|||||||
else
|
else
|
||||||
m_ui->keyButton->setChecked(true);
|
m_ui->keyButton->setChecked(true);
|
||||||
m_ui->hostLineEdit->setText(devConfig.host);
|
m_ui->hostLineEdit->setText(devConfig.host);
|
||||||
m_ui->portLineEdit->setText(QString::number(devConfig.port));
|
m_ui->sshPortLineEdit->setText(QString::number(devConfig.sshPort));
|
||||||
|
m_ui->gdbServerPortLineEdit
|
||||||
|
->setText(QString::number(devConfig.gdbServerPort));
|
||||||
m_ui->timeoutLineEdit->setText(QString::number(devConfig.timeout));
|
m_ui->timeoutLineEdit->setText(QString::number(devConfig.timeout));
|
||||||
m_ui->userLineEdit->setText(devConfig.uname);
|
m_ui->userLineEdit->setText(devConfig.uname);
|
||||||
m_ui->pwdLineEdit->setText(devConfig.pwd);
|
m_ui->pwdLineEdit->setText(devConfig.pwd);
|
||||||
m_ui->keyFileLineEdit->setPath(devConfig.keyFile);
|
m_ui->keyFileLineEdit->setPath(devConfig.keyFile);
|
||||||
m_ui->detailsWidget->setEnabled(true);
|
m_ui->detailsWidget->setEnabled(true);
|
||||||
m_nameValidator.setDisplayName(devConfig.name);
|
m_nameValidator.setDisplayName(devConfig.name);
|
||||||
m_portValidator.setValue(devConfig.port);
|
m_sshPortValidator.setValue(devConfig.sshPort);
|
||||||
|
m_gdbServerPortValidator.setValue(devConfig.gdbServerPort);
|
||||||
m_timeoutValidator.setValue(devConfig.timeout);
|
m_timeoutValidator.setValue(devConfig.timeout);
|
||||||
m_ui->detailsWidget->setEnabled(true);
|
m_ui->detailsWidget->setEnabled(true);
|
||||||
}
|
}
|
||||||
@@ -367,9 +373,16 @@ void MaemoSettingsWidget::hostNameEditingFinished()
|
|||||||
currentConfig().host = m_ui->hostLineEdit->text();
|
currentConfig().host = m_ui->hostLineEdit->text();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaemoSettingsWidget::portEditingFinished()
|
void MaemoSettingsWidget::sshPortEditingFinished()
|
||||||
{
|
{
|
||||||
setPortOrTimeout(m_ui->portLineEdit, currentConfig().port, m_portValidator);
|
setPortOrTimeout(m_ui->sshPortLineEdit, currentConfig().sshPort,
|
||||||
|
m_sshPortValidator);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MaemoSettingsWidget::gdbServerPortEditingFinished()
|
||||||
|
{
|
||||||
|
setPortOrTimeout(m_ui->gdbServerPortLineEdit, currentConfig().gdbServerPort,
|
||||||
|
m_gdbServerPortValidator);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaemoSettingsWidget::timeoutEditingFinished()
|
void MaemoSettingsWidget::timeoutEditingFinished()
|
||||||
@@ -594,7 +607,8 @@ void MaemoSettingsWidget::clearDetails()
|
|||||||
{
|
{
|
||||||
m_ui->nameLineEdit->clear();
|
m_ui->nameLineEdit->clear();
|
||||||
m_ui->hostLineEdit->clear();
|
m_ui->hostLineEdit->clear();
|
||||||
m_ui->portLineEdit->clear();
|
m_ui->sshPortLineEdit->clear();
|
||||||
|
m_ui->gdbServerPortLineEdit->clear();
|
||||||
m_ui->timeoutLineEdit->clear();
|
m_ui->timeoutLineEdit->clear();
|
||||||
m_ui->userLineEdit->clear();
|
m_ui->userLineEdit->clear();
|
||||||
m_ui->pwdLineEdit->clear();
|
m_ui->pwdLineEdit->clear();
|
||||||
|
|||||||
@@ -124,57 +124,67 @@
|
|||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Port:</string>
|
<string>SSH Port:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QLineEdit" name="portLineEdit"/>
|
<widget class="QLineEdit" name="sshPortLineEdit"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="QLabel" name="label_5">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Connection Timeout:</string>
|
<string>Connection Timeout:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1">
|
<item row="6" column="1">
|
||||||
<widget class="QLineEdit" name="timeoutLineEdit"/>
|
<widget class="QLineEdit" name="timeoutLineEdit"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0">
|
<item row="7" column="0">
|
||||||
<widget class="QLabel" name="label_6">
|
<widget class="QLabel" name="label_6">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>User Name:</string>
|
<string>User Name:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="1">
|
<item row="7" column="1">
|
||||||
<widget class="QLineEdit" name="userLineEdit"/>
|
<widget class="QLineEdit" name="userLineEdit"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="0">
|
<item row="8" column="0">
|
||||||
<widget class="QLabel" name="passwordLabel">
|
<widget class="QLabel" name="passwordLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Password:</string>
|
<string>Password:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="1">
|
<item row="8" column="1">
|
||||||
<widget class="QLineEdit" name="pwdLineEdit">
|
<widget class="QLineEdit" name="pwdLineEdit">
|
||||||
<property name="echoMode">
|
<property name="echoMode">
|
||||||
<enum>QLineEdit::Password</enum>
|
<enum>QLineEdit::Password</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="0">
|
<item row="9" column="0">
|
||||||
<widget class="QLabel" name="keyLabel">
|
<widget class="QLabel" name="keyLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Private key file:</string>
|
<string>Private key file:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="1">
|
<item row="9" column="1">
|
||||||
<widget class="Utils::PathChooser" name="keyFileLineEdit" native="true"/>
|
<widget class="Utils::PathChooser" name="keyFileLineEdit" native="true"/>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="gdbServerPortLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Gdbserver Port:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QLineEdit" name="gdbServerPortLineEdit"/>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -272,8 +282,8 @@ p, li { white-space: pre-wrap; }
|
|||||||
<slot>configNameEditingFinished()</slot>
|
<slot>configNameEditingFinished()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>372</x>
|
<x>396</x>
|
||||||
<y>146</y>
|
<y>145</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>514</x>
|
<x>514</x>
|
||||||
@@ -288,8 +298,8 @@ p, li { white-space: pre-wrap; }
|
|||||||
<slot>deviceTypeChanged()</slot>
|
<slot>deviceTypeChanged()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>264</x>
|
<x>267</x>
|
||||||
<y>175</y>
|
<y>169</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>511</x>
|
<x>511</x>
|
||||||
@@ -304,8 +314,8 @@ p, li { white-space: pre-wrap; }
|
|||||||
<slot>hostNameEditingFinished()</slot>
|
<slot>hostNameEditingFinished()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>385</x>
|
<x>396</x>
|
||||||
<y>228</y>
|
<y>216</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>424</x>
|
<x>424</x>
|
||||||
@@ -314,14 +324,14 @@ p, li { white-space: pre-wrap; }
|
|||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
<connection>
|
||||||
<sender>portLineEdit</sender>
|
<sender>sshPortLineEdit</sender>
|
||||||
<signal>editingFinished()</signal>
|
<signal>editingFinished()</signal>
|
||||||
<receiver>maemoSettingsWidget</receiver>
|
<receiver>maemoSettingsWidget</receiver>
|
||||||
<slot>portEditingFinished()</slot>
|
<slot>sshPortEditingFinished()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>385</x>
|
<x>396</x>
|
||||||
<y>255</y>
|
<y>240</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>514</x>
|
<x>514</x>
|
||||||
@@ -384,8 +394,8 @@ p, li { white-space: pre-wrap; }
|
|||||||
<slot>deviceTypeChanged()</slot>
|
<slot>deviceTypeChanged()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>376</x>
|
<x>387</x>
|
||||||
<y>175</y>
|
<y>169</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>426</x>
|
<x>426</x>
|
||||||
@@ -521,12 +531,28 @@ p, li { white-space: pre-wrap; }
|
|||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>gdbServerPortLineEdit</sender>
|
||||||
|
<signal>editingFinished()</signal>
|
||||||
|
<receiver>maemoSettingsWidget</receiver>
|
||||||
|
<slot>gdbServerPortEditingFinished()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>218</x>
|
||||||
|
<y>255</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>427</x>
|
||||||
|
<y>467</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
</connections>
|
</connections>
|
||||||
<slots>
|
<slots>
|
||||||
<slot>configNameEditingFinished()</slot>
|
<slot>configNameEditingFinished()</slot>
|
||||||
<slot>deviceTypeChanged()</slot>
|
<slot>deviceTypeChanged()</slot>
|
||||||
<slot>hostNameEditingFinished()</slot>
|
<slot>hostNameEditingFinished()</slot>
|
||||||
<slot>portEditingFinished()</slot>
|
<slot>sshPortEditingFinished()</slot>
|
||||||
<slot>timeoutEditingFinished()</slot>
|
<slot>timeoutEditingFinished()</slot>
|
||||||
<slot>userNameEditingFinished()</slot>
|
<slot>userNameEditingFinished()</slot>
|
||||||
<slot>passwordEditingFinished()</slot>
|
<slot>passwordEditingFinished()</slot>
|
||||||
@@ -537,5 +563,6 @@ p, li { white-space: pre-wrap; }
|
|||||||
<slot>keyFileEditingFinished()</slot>
|
<slot>keyFileEditingFinished()</slot>
|
||||||
<slot>testConfig()</slot>
|
<slot>testConfig()</slot>
|
||||||
<slot>deployKey()</slot>
|
<slot>deployKey()</slot>
|
||||||
|
<slot>gdbServerPortEditingFinished()</slot>
|
||||||
</slots>
|
</slots>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
@@ -74,8 +74,8 @@ MaemoSshConnection::MaemoSshConnection(const MaemoDeviceConfig &devConf,
|
|||||||
authString = &devConf.keyFile;
|
authString = &devConf.keyFile;
|
||||||
connFunc = &ne7ssh::connectWithKey;
|
connFunc = &ne7ssh::connectWithKey;
|
||||||
}
|
}
|
||||||
m_channel = (ssh.*connFunc)(devConf.host.toAscii(), devConf.port,
|
m_channel = (ssh.*connFunc)(devConf.host.toLatin1(), devConf.sshPort,
|
||||||
devConf.uname.toAscii(), authString->toAscii(), shell, devConf.timeout);
|
devConf.uname.toAscii(), authString->toLatin1(), shell, devConf.timeout);
|
||||||
if (m_channel == -1)
|
if (m_channel == -1)
|
||||||
throw MaemoSshException(tr("Could not connect to host"));
|
throw MaemoSshException(tr("Could not connect to host"));
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ void MaemoInteractiveSshConnection::runCommand(const QString &command)
|
|||||||
ssh.lock();
|
ssh.lock();
|
||||||
const char * output = ssh.read(channel(), false);
|
const char * output = ssh.read(channel(), false);
|
||||||
if (output) {
|
if (output) {
|
||||||
emit remoteOutput(QLatin1String(output));
|
emit remoteOutput(QString::fromUtf8(output));
|
||||||
ssh.resetInput(channel(), false);
|
ssh.resetInput(channel(), false);
|
||||||
}
|
}
|
||||||
ssh.unlock();
|
ssh.unlock();
|
||||||
|
|||||||
Reference in New Issue
Block a user