changed the way shadowsocks client config was created
- some code style refactoring
This commit is contained in:
parent
36fae9152f
commit
c23c8e8462
23 changed files with 146 additions and 170 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include "ssh_configurator.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QProcess>
|
||||
#include <QString>
|
||||
|
|
@ -18,10 +19,10 @@
|
|||
|
||||
using namespace QSsh;
|
||||
|
||||
SshConfigurator::SshConfigurator(std::shared_ptr<Settings> settings, std::shared_ptr<ServerController> serverController, QObject *parent):
|
||||
ConfiguratorBase(settings, serverController, parent)
|
||||
SshConfigurator::SshConfigurator(std::shared_ptr<Settings> settings,
|
||||
std::shared_ptr<ServerController> serverController,
|
||||
QObject *parent): ConfiguratorBase(settings, serverController, parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QString SshConfigurator::convertOpenSShKey(const QString &key)
|
||||
|
|
@ -76,10 +77,8 @@ void SshConfigurator::openSshTerminal(const ServerCredentials &credentials)
|
|||
// todo: connect by key
|
||||
// p->setNativeArguments(QString("%1@%2")
|
||||
// .arg(credentials.userName).arg(credentials.hostName).arg(credentials.password));
|
||||
}
|
||||
else {
|
||||
p->setNativeArguments(QString("%1@%2 -pw %3")
|
||||
.arg(credentials.userName).arg(credentials.hostName).arg(credentials.password));
|
||||
} else {
|
||||
p->setNativeArguments(QString("%1@%2 -pw %3").arg(credentials.userName).arg(credentials.hostName, credentials.password));
|
||||
}
|
||||
#else
|
||||
p->setProgram("/bin/bash");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue