Fixed startSynergy twice when detect the first server
This commit is contained in:
parent
f0cb271902
commit
8d7f6e146d
|
@ -820,6 +820,7 @@ void MainWindow::updateZeroconfService()
|
||||||
void MainWindow::serverDetected(const QString name)
|
void MainWindow::serverDetected(const QString name)
|
||||||
{
|
{
|
||||||
if (m_pComboServerList->findText(name) == -1) {
|
if (m_pComboServerList->findText(name) == -1) {
|
||||||
|
// Note: the first added item triggers startSynergy
|
||||||
m_pComboServerList->addItem(name);
|
m_pComboServerList->addItem(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,10 +90,6 @@ void ZeroconfService::clientDetected(const QList<ZeroconfRecord>& list)
|
||||||
record.serviceName));
|
record.serviceName));
|
||||||
m_pMainWindow->autoAddScreen(record.serviceName);
|
m_pMainWindow->autoAddScreen(record.serviceName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!list.isEmpty()) {
|
|
||||||
m_pMainWindow->startSynergy();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZeroconfService::errorHandle(DNSServiceErrorType errorCode)
|
void ZeroconfService::errorHandle(DNSServiceErrorType errorCode)
|
||||||
|
|
Loading…
Reference in New Issue