Added mutex for updating zeroconf service
This commit is contained in:
parent
c323003f65
commit
5afd94edb3
|
@ -804,6 +804,8 @@ void MainWindow::changeEvent(QEvent* event)
|
||||||
|
|
||||||
void MainWindow::updateZeroconfService()
|
void MainWindow::updateZeroconfService()
|
||||||
{
|
{
|
||||||
|
QMutexLocker locker(&m_Mutex);
|
||||||
|
|
||||||
if (isBonjourRunning()) {
|
if (isBonjourRunning()) {
|
||||||
if (!m_AppConfig.wizardShouldRun()) {
|
if (!m_AppConfig.wizardShouldRun()) {
|
||||||
if (m_pZeroconfService) {
|
if (m_pZeroconfService) {
|
||||||
|
@ -960,6 +962,7 @@ void MainWindow::on_m_pCheckBoxAutoConnect_toggled(bool checked)
|
||||||
|
|
||||||
if (!checked) {
|
if (!checked) {
|
||||||
m_pComboServerList->clear();
|
m_pComboServerList->clear();
|
||||||
|
m_pComboServerList->hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,8 @@
|
||||||
#include "IpcClient.h"
|
#include "IpcClient.h"
|
||||||
#include "Ipc.h"
|
#include "Ipc.h"
|
||||||
|
|
||||||
|
#include <QMutex>
|
||||||
|
|
||||||
class QAction;
|
class QAction;
|
||||||
class QMenu;
|
class QMenu;
|
||||||
class QLineEdit;
|
class QLineEdit;
|
||||||
|
@ -176,6 +178,7 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
|
||||||
DataDownloader* m_pDataDownloader;
|
DataDownloader* m_pDataDownloader;
|
||||||
QMessageBox* m_DownloadMessageBox;
|
QMessageBox* m_DownloadMessageBox;
|
||||||
QAbstractButton* m_pCancelButton;
|
QAbstractButton* m_pCancelButton;
|
||||||
|
QMutex m_Mutex;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_m_pComboServerList_currentIndexChanged(QString );
|
void on_m_pComboServerList_currentIndexChanged(QString );
|
||||||
|
|
Loading…
Reference in New Issue