mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-11 14:15:46 +08:00
Fixed Hostname dialog box opening unnecessarily (#6468)
#6392 Added check for autoconfig mode
This commit is contained in:
@@ -763,14 +763,27 @@ bool MainWindow::clientArgs(QStringList& args, QString& app)
|
||||
}
|
||||
#endif
|
||||
|
||||
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;
|
||||
}
|
||||
if (m_pLineEditHostname->text().isEmpty())
|
||||
{
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
//check if autoconfig mode is enabled
|
||||
if (!appConfig().autoConfig())
|
||||
{
|
||||
#endif
|
||||
show();
|
||||
QMessageBox::warning(
|
||||
this, tr("Hostname is empty"),
|
||||
tr("Please fill in a hostname for the synergy client to connect to."));
|
||||
return false;
|
||||
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
args << m_pLineEditHostname->text() + ":" + QString::number(appConfig().port());
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user