Added mutex for updating zeroconf service

This commit is contained in:
Xinyu Hou 2014-11-24 11:59:24 +00:00
parent c323003f65
commit 5afd94edb3
2 changed files with 6 additions and 0 deletions

View File

@ -804,6 +804,8 @@ void MainWindow::changeEvent(QEvent* event)
void MainWindow::updateZeroconfService()
{
QMutexLocker locker(&m_Mutex);
if (isBonjourRunning()) {
if (!m_AppConfig.wizardShouldRun()) {
if (m_pZeroconfService) {
@ -960,6 +962,7 @@ void MainWindow::on_m_pCheckBoxAutoConnect_toggled(bool checked)
if (!checked) {
m_pComboServerList->clear();
m_pComboServerList->hide();
}
}

View File

@ -34,6 +34,8 @@
#include "IpcClient.h"
#include "Ipc.h"
#include <QMutex>
class QAction;
class QMenu;
class QLineEdit;
@ -176,6 +178,7 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
DataDownloader* m_pDataDownloader;
QMessageBox* m_DownloadMessageBox;
QAbstractButton* m_pCancelButton;
QMutex m_Mutex;
private slots:
void on_m_pComboServerList_currentIndexChanged(QString );