Skip to content
Snippets Groups Projects
Commit dde6a1a4 authored by Mathieu Leduc-Hamel's avatar Mathieu Leduc-Hamel
Browse files

cleaning the file

parent b9087b45
No related branches found
No related tags found
No related merge requests found
...@@ -80,6 +80,7 @@ void Account::initItemWidget() ...@@ -80,6 +80,7 @@ void Account::initItemWidget()
itemWidget = new AccountItemWidget(); itemWidget = new AccountItemWidget();
itemWidget->setEnabled(enabled); itemWidget->setEnabled(enabled);
itemWidget->setAccountText(getAccountDetail(ACCOUNT_ALIAS)); itemWidget->setAccountText(getAccountDetail(ACCOUNT_ALIAS));
if(isNew() || !enabled) if(isNew() || !enabled)
{ {
itemWidget->setState(AccountItemWidget::Unregistered); itemWidget->setState(AccountItemWidget::Unregistered);
...@@ -100,7 +101,7 @@ Account * Account::buildExistingAccountFromId(QString _accountId) ...@@ -100,7 +101,7 @@ Account * Account::buildExistingAccountFromId(QString _accountId)
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
Account * a = new Account(); Account * a = new Account();
a->accountId = new QString(_accountId); a->accountId = new QString(_accountId);
a->accountDetails = new MapStringString( configurationManager.getAccountDetails(_accountId).value() ); a->accountDetails = new MapStringString( configurationManager.getAccountDetails(_accountId).value() );
a->initItem(); a->initItem();
return a; return a;
} }
...@@ -216,17 +217,18 @@ void Account::setAccountId(QString id) ...@@ -216,17 +217,18 @@ void Account::setAccountId(QString id)
void Account::setEnabled(bool checked) void Account::setEnabled(bool checked)
{ {
qDebug() << "setEnabled = " << checked;
setAccountDetail(ACCOUNT_ENABLED, checked ? ACCOUNT_ENABLED_TRUE : ACCOUNT_ENABLED_FALSE); setAccountDetail(ACCOUNT_ENABLED, checked ? ACCOUNT_ENABLED_TRUE : ACCOUNT_ENABLED_FALSE);
} }
bool Account::isEnabled() const bool Account::isEnabled() const
{ {
qDebug() << "isEnabled = " << getAccountDetail(ACCOUNT_ENABLED);
return (getAccountDetail(ACCOUNT_ENABLED) == ACCOUNT_ENABLED_TRUE); return (getAccountDetail(ACCOUNT_ENABLED) == ACCOUNT_ENABLED_TRUE);
} }
bool Account::isRegistered() const bool Account::isRegistered() const
{ {
qDebug() << "isRegistered = " << getAccountDetail(ACCOUNT_STATUS);
return (getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_REGISTERED); return (getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_REGISTERED);
} }
...@@ -263,3 +265,5 @@ bool Account::operator==(const Account& a)const ...@@ -263,3 +265,5 @@ bool Account::operator==(const Account& a)const
{ {
return *accountId == *a.accountId; return *accountId == *a.accountId;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment