Merge pull request #6490 from symless/v1-issue-6407-enterprise-autoconfig5

Fixes auto config UI elements in enterprise versions
This commit is contained in:
Jnewbon 2019-04-30 11:50:52 +01:00 committed by GitHub
commit fe6cc4b849
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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()
@ -1275,7 +1276,11 @@ void MainWindow::updateAutoConfigWidgets()
m_pLabelAutoDetected->hide();
m_pComboServerList->hide();
#ifndef SYNERGY_ENTERPRISE
m_pWidgetAutoConfig->show();
#else
m_pWidgetAutoConfig->hide();
#endif
}
}