Try user specified name when auto detect failed
This commit is contained in:
parent
97ea94de69
commit
3b1e15ba08
|
@ -511,18 +511,16 @@ 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()) {
|
if (m_pLineEditHostname->text().isEmpty()) {
|
||||||
show();
|
show();
|
||||||
QMessageBox::warning(this, tr("Hostname is empty"),
|
QMessageBox::warning(this, tr("Hostname is empty"),
|
||||||
|
@ -531,7 +529,6 @@ bool MainWindow::clientArgs(QStringList& args, QString& app)
|
||||||
}
|
}
|
||||||
|
|
||||||
args << m_pLineEditHostname->text() + ":" + QString::number(appConfig().port());
|
args << m_pLineEditHostname->text() + ":" + QString::number(appConfig().port());
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue