mirror of
https://github.com/debauchee/barrier.git
synced 2024-11-30 21:39:19 +03:00
Uthe edition value in app config as default #4715
This commit is contained in:
parent
20d4d47648
commit
b1c5a83bfb
@ -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) {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user