From 85c359693a38d8084a1d01a53242f0eb4c81bc52 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Wed, 5 Sep 2018 05:10:56 +0800 Subject: [PATCH] #6407 Hide all auto config elements for enterprise build --- src/gui/src/AppConfig.cpp | 9 ++++++++- src/gui/src/MainWindow.cpp | 7 ++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/gui/src/AppConfig.cpp b/src/gui/src/AppConfig.cpp index a0f607cf..2d6fd1b3 100644 --- a/src/gui/src/AppConfig.cpp +++ b/src/gui/src/AppConfig.cpp @@ -127,7 +127,14 @@ const QString &AppConfig::language() const { return m_Language; } bool AppConfig::startedBefore() const { return m_StartedBefore; } -bool AppConfig::autoConfig() const { return m_AutoConfig; } +bool AppConfig::autoConfig() const { +#ifndef SYNERGY_ENTERPRISE + return m_AutoConfig; +#else + // always disable auto config for enterprise edition. + return false; +#endif +} QString AppConfig::autoConfigServer() const { return m_AutoConfigServer; } diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index 751d2ee1..1d2ed1eb 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -179,10 +179,11 @@ MainWindow::MainWindow (QSettings& settings, AppConfig& appConfig, #ifndef SYNERGY_ENTERPRISE updateZeroconfService(); - updateAutoConfigWidgets(); addZeroconfServer(m_AppConfig->autoConfigServer()); #endif + + updateAutoConfigWidgets(); } MainWindow::~MainWindow() @@ -1262,7 +1263,11 @@ void MainWindow::updateAutoConfigWidgets() m_pLabelAutoDetected->hide(); m_pComboServerList->hide(); +#ifndef SYNERGY_ENTERPRISE m_pWidgetAutoConfig->show(); +#else + m_pWidgetAutoConfig->hide(); +#endif } }