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();
|
m_pComboServerList->hide();
|
||||||
|
|
||||||
updateEdition();
|
setEdition(m_AppConfig.edition());
|
||||||
|
|
||||||
m_pLabelPadlock->hide();
|
m_pLabelPadlock->hide();
|
||||||
|
|
||||||
@ -939,7 +939,7 @@ void MainWindow::changeEvent(QEvent* event)
|
|||||||
retranslateUi(this);
|
retranslateUi(this);
|
||||||
retranslateMenuBar();
|
retranslateMenuBar();
|
||||||
|
|
||||||
updateEdition();
|
setEdition(m_AppConfig.edition());
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1285,20 +1285,6 @@ void MainWindow::promptAutoConfig()
|
|||||||
m_AppConfig.setAutoConfigPrompted(true);
|
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 )
|
void MainWindow::on_m_pComboServerList_currentIndexChanged(QString )
|
||||||
{
|
{
|
||||||
if (m_pComboServerList->count() != 0) {
|
if (m_pComboServerList->count() != 0) {
|
||||||
|
@ -172,7 +172,6 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
|
|||||||
bool isBonjourRunning();
|
bool isBonjourRunning();
|
||||||
void downloadBonjour();
|
void downloadBonjour();
|
||||||
void promptAutoConfig();
|
void promptAutoConfig();
|
||||||
void updateEdition();
|
|
||||||
QString getProfileRootForArg();
|
QString getProfileRootForArg();
|
||||||
void checkConnected(const QString& line);
|
void checkConnected(const QString& line);
|
||||||
void checkFingerprint(const QString& line);
|
void checkFingerprint(const QString& line);
|
||||||
|
Loading…
Reference in New Issue
Block a user