Try user specified name when auto detect failed
This commit is contained in:
parent
97ea94de69
commit
3b1e15ba08
|
@ -511,28 +511,25 @@ bool MainWindow::clientArgs(QStringList& args, QString& app)
|
||||||
args << "--log" << appConfig().logFilenameCmd();
|
args << "--log" << appConfig().logFilenameCmd();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check auto connect first, if it is disabled or no server detected,
|
||||||
|
// use line edit host name if it is not empty
|
||||||
if (m_pCheckBoxAutoConnect->isChecked()) {
|
if (m_pCheckBoxAutoConnect->isChecked()) {
|
||||||
if (m_pComboServerList->count() == 0) {
|
if (m_pComboServerList->count() != 0) {
|
||||||
QMessageBox::information(this, tr("No server detected"),
|
|
||||||
tr("Sorry, Synergy hasn't detected any server."));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
QString serverIp = m_pComboServerList->currentText();
|
QString serverIp = m_pComboServerList->currentText();
|
||||||
args << serverIp + ":" + QString::number(appConfig().port());
|
args << serverIp + ":" + QString::number(appConfig().port());
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
if (m_pLineEditHostname->text().isEmpty()) {
|
|
||||||
show();
|
|
||||||
QMessageBox::warning(this, tr("Hostname is empty"),
|
|
||||||
tr("Please fill in a hostname for the synergy client to connect to."));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
args << m_pLineEditHostname->text() + ":" + QString::number(appConfig().port());
|
if (m_pLineEditHostname->text().isEmpty()) {
|
||||||
|
show();
|
||||||
|
QMessageBox::warning(this, tr("Hostname is empty"),
|
||||||
|
tr("Please fill in a hostname for the synergy client to connect to."));
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
args << m_pLineEditHostname->text() + ":" + QString::number(appConfig().port());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue