#6407 Hide all auto config elements for enterprise build

This commit is contained in:
Nick Bolton 2018-09-05 05:10:56 +08:00
parent 2118c6647c
commit 85c359693a
2 changed files with 14 additions and 2 deletions

View File

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

View File

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