Fixed code style

This commit is contained in:
Jerry (Xinyu Hou) 2016-10-12 12:59:38 +01:00
parent fc879323bc
commit a50ae2ad36

View File

@ -17,7 +17,7 @@
ActivationDialog::ActivationDialog(QWidget* parent, AppConfig& appConfig) : ActivationDialog::ActivationDialog(QWidget* parent, AppConfig& appConfig) :
QDialog(parent), QDialog(parent),
ui(new Ui::ActivationDialog), ui(new Ui::ActivationDialog),
m_appConfig (&appConfig) m_appConfig(&appConfig)
{ {
ui->setupUi(this); ui->setupUi(this);
ui->m_pTextEditSerialKey->setFocus(); ui->m_pTextEditSerialKey->setFocus();
@ -68,13 +68,13 @@ void ActivationDialog::accept()
try { try {
QString serialKey = ui->m_pTextEditSerialKey->toPlainText(); QString serialKey = ui->m_pTextEditSerialKey->toPlainText();
if (!m_appConfig->setSerialKey (serialKey, error)) { if (!m_appConfig->setSerialKey(serialKey, error)) {
message.critical(this, "Invalid Serial Key", tr("%1").arg(error)); message.critical(this, "Invalid Serial Key", tr("%1").arg(error));
return; return;
} }
SubscriptionManager subscriptionManager (this, *m_appConfig, edition); SubscriptionManager subscriptionManager(this, *m_appConfig, edition);
if (!subscriptionManager.activateSerial (serialKey)) { if (!subscriptionManager.activateSerial(serialKey)) {
return; return;
} }
m_appConfig->setActivateEmail(""); m_appConfig->setActivateEmail("");
@ -82,7 +82,7 @@ void ActivationDialog::accept()
} }
catch (std::exception& e) { catch (std::exception& e) {
message.critical (this, "Unknown Error", message.critical(this, "Unknown Error",
tr("An error occurred while trying to activate Synergy. " tr("An error occurred while trying to activate Synergy. "
"Please contact the helpdesk, and provide the " "Please contact the helpdesk, and provide the "
"following details.\n\n%1").arg(e.what())); "following details.\n\n%1").arg(e.what()));
@ -93,6 +93,6 @@ void ActivationDialog::accept()
m_appConfig->saveSettings(); m_appConfig->saveSettings();
message.information(this, "Activated!", message.information(this, "Activated!",
tr("Thanks for activating %1!").arg (getEditionName (edition))); tr("Thanks for activating %1!").arg(getEditionName(edition)));
QDialog::accept(); QDialog::accept();
} }