Uthe edition value in app config as default #4715

This commit is contained in:
Jerry (Xinyu Hou) 2015-11-18 15:05:05 -08:00
parent 20d4d47648
commit b1c5a83bfb
2 changed files with 2 additions and 17 deletions

View File

@ -134,7 +134,7 @@ MainWindow::MainWindow(QSettings& settings, AppConfig& appConfig) :
m_pComboServerList->hide();
updateEdition();
setEdition(m_AppConfig.edition());
m_pLabelPadlock->hide();
@ -939,7 +939,7 @@ void MainWindow::changeEvent(QEvent* event)
retranslateUi(this);
retranslateMenuBar();
updateEdition();
setEdition(m_AppConfig.edition());
break;
}
@ -1285,20 +1285,6 @@ void MainWindow::promptAutoConfig()
m_AppConfig.setAutoConfigPrompted(true);
}
void MainWindow::updateEdition()
{
QString mac = getFirstMacAddress();
QString hashSrc = m_AppConfig.activateEmail() + mac;
QString hashResult = hash(hashSrc);
if (hashResult == m_AppConfig.userToken()) {
setEdition(m_AppConfig.edition());
}
else {
setEdition(Unknown);
}
}
void MainWindow::on_m_pComboServerList_currentIndexChanged(QString )
{
if (m_pComboServerList->count() != 0) {

View File

@ -172,7 +172,6 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
bool isBonjourRunning();
void downloadBonjour();
void promptAutoConfig();
void updateEdition();
QString getProfileRootForArg();
void checkConnected(const QString& line);
void checkFingerprint(const QString& line);