mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-26 04:25:00 +03:00
Fixed the warning logic when hostname is empty
This commit is contained in:
parent
1a69f458b7
commit
22475067de
@ -505,14 +505,6 @@ bool MainWindow::clientArgs(QStringList& args, QString& app)
|
|||||||
app = QString("\"%1\"").arg(app);
|
app = QString("\"%1\"").arg(app);
|
||||||
#endif
|
#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 (appConfig().logToFile())
|
if (appConfig().logToFile())
|
||||||
{
|
{
|
||||||
appConfig().persistLogDir();
|
appConfig().persistLogDir();
|
||||||
@ -531,6 +523,13 @@ bool MainWindow::clientArgs(QStringList& args, QString& app)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
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());
|
args << m_pLineEditHostname->text() + ":" + QString::number(appConfig().port());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user