Add serial key in app settings #4715
This commit is contained in:
parent
3bc46dca2d
commit
bc768cbca3
|
@ -132,6 +132,7 @@ void AppConfig::loadSettings()
|
||||||
m_UserToken = settings().value("userToken", "").toString();
|
m_UserToken = settings().value("userToken", "").toString();
|
||||||
m_CryptoEnabled = settings().value("cryptoEnabled", false).toBool();
|
m_CryptoEnabled = settings().value("cryptoEnabled", false).toBool();
|
||||||
m_AutoHide = settings().value("autoHide", false).toBool();
|
m_AutoHide = settings().value("autoHide", false).toBool();
|
||||||
|
m_Serialkey = settings().value("serialKey", "").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppConfig::saveSettings()
|
void AppConfig::saveSettings()
|
||||||
|
@ -153,6 +154,7 @@ void AppConfig::saveSettings()
|
||||||
settings().setValue("userToken", m_UserToken);
|
settings().setValue("userToken", m_UserToken);
|
||||||
settings().setValue("cryptoEnabled", m_CryptoEnabled);
|
settings().setValue("cryptoEnabled", m_CryptoEnabled);
|
||||||
settings().setValue("autoHide", m_AutoHide);
|
settings().setValue("autoHide", m_AutoHide);
|
||||||
|
settings().setValue("serialKey", m_Serialkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppConfig::setAutoConfig(bool autoConfig)
|
void AppConfig::setAutoConfig(bool autoConfig)
|
||||||
|
|
|
@ -78,6 +78,8 @@ class AppConfig
|
||||||
QString activateEmail() { return m_ActivateEmail; }
|
QString activateEmail() { return m_ActivateEmail; }
|
||||||
void setUserToken(QString t) { m_UserToken = t; }
|
void setUserToken(QString t) { m_UserToken = t; }
|
||||||
QString userToken() { return m_UserToken; }
|
QString userToken() { return m_UserToken; }
|
||||||
|
void setSerialKey(QString serial) { m_Serialkey = serial; }
|
||||||
|
QString serialKey() { return m_Serialkey; }
|
||||||
|
|
||||||
QString synergysName() const { return m_SynergysName; }
|
QString synergysName() const { return m_SynergysName; }
|
||||||
QString synergycName() const { return m_SynergycName; }
|
QString synergycName() const { return m_SynergycName; }
|
||||||
|
@ -129,6 +131,7 @@ class AppConfig
|
||||||
QString m_UserToken;
|
QString m_UserToken;
|
||||||
bool m_CryptoEnabled;
|
bool m_CryptoEnabled;
|
||||||
bool m_AutoHide;
|
bool m_AutoHide;
|
||||||
|
QString m_Serialkey;
|
||||||
|
|
||||||
static const char m_SynergysName[];
|
static const char m_SynergysName[];
|
||||||
static const char m_SynergycName[];
|
static const char m_SynergycName[];
|
||||||
|
|
|
@ -60,6 +60,7 @@ SetupWizard::SetupWizard(MainWindow& mainWindow, bool startMain) :
|
||||||
AppConfig& appConfig = m_MainWindow.appConfig();
|
AppConfig& appConfig = m_MainWindow.appConfig();
|
||||||
|
|
||||||
m_pLineEditEmail->setText(appConfig.activateEmail());
|
m_pLineEditEmail->setText(appConfig.activateEmail());
|
||||||
|
m_pLineEditSerialKey->setText(appConfig.serialKey());
|
||||||
|
|
||||||
m_pLineEditSerialKey->setEnabled(false);
|
m_pLineEditSerialKey->setEnabled(false);
|
||||||
|
|
||||||
|
@ -108,7 +109,6 @@ bool SetupWizard::validateCurrentPage()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// plugin page no longer requires email and password
|
|
||||||
// create subscription file in profile directory
|
// create subscription file in profile directory
|
||||||
SubscriptionManager subscriptionManager;
|
SubscriptionManager subscriptionManager;
|
||||||
bool r = subscriptionManager.activateSerial(m_pLineEditSerialKey->text());
|
bool r = subscriptionManager.activateSerial(m_pLineEditSerialKey->text());
|
||||||
|
@ -196,6 +196,11 @@ void SetupWizard::accept()
|
||||||
appConfig.setEdition(m_Edition);
|
appConfig.setEdition(m_Edition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_pRadioButtonSubscription->isChecked())
|
||||||
|
{
|
||||||
|
appConfig.setSerialKey(m_pLineEditSerialKey->text());
|
||||||
|
}
|
||||||
|
|
||||||
m_MainWindow.setEdition(m_Edition);
|
m_MainWindow.setEdition(m_Edition);
|
||||||
m_MainWindow.updateLocalFingerprint();
|
m_MainWindow.updateLocalFingerprint();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue