#5722 Trim serial keys already stored

This commit is contained in:
Andrew Nelless 2016-11-02 11:28:04 +00:00
parent 1a7920f80d
commit 24a548273e
2 changed files with 2 additions and 2 deletions

View File

@ -161,7 +161,7 @@ void AppConfig::loadSettings()
m_ActivateEmail = settings().value("activateEmail", "").toString(); m_ActivateEmail = settings().value("activateEmail", "").toString();
m_CryptoEnabled = settings().value("cryptoEnabled", true).toBool(); m_CryptoEnabled = settings().value("cryptoEnabled", true).toBool();
m_AutoHide = settings().value("autoHide", false).toBool(); m_AutoHide = settings().value("autoHide", false).toBool();
m_Serialkey = settings().value("serialKey", "").toString(); m_Serialkey = settings().value("serialKey", "").toString().trimmed();
m_lastVersion = settings().value("lastVersion", "Unknown").toString(); m_lastVersion = settings().value("lastVersion", "Unknown").toString();
m_LastExpiringWarningTime = settings().value("lastExpiringWarningTime", 0).toInt(); m_LastExpiringWarningTime = settings().value("lastExpiringWarningTime", 0).toInt();
m_ActivationHasRun = settings().value("activationHasRun", false).toBool(); m_ActivationHasRun = settings().value("activationHasRun", false).toBool();

View File

@ -118,7 +118,7 @@ void LicenseManager::refresh()
SerialKey serialKey (m_AppConfig->serialKey().toStdString()); SerialKey serialKey (m_AppConfig->serialKey().toStdString());
setSerialKey(serialKey, true); setSerialKey(serialKey, true);
} catch (...) { } catch (...) {
m_AppConfig->setSerialKey(""); m_AppConfig->clearSerialKey();
m_AppConfig->saveSettings(); m_AppConfig->saveSettings();
} }
} }