Fixed startSynergy twice when detect the first server

This commit is contained in:
Xinyu Hou 2014-11-13 16:22:44 +00:00
parent f0cb271902
commit 8d7f6e146d
2 changed files with 1 additions and 4 deletions

View File

@ -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);
} }
} }

View File

@ -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)