summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/sms/smseditaccountwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/sms/smseditaccountwidget.cpp')
-rw-r--r--kopete/protocols/sms/smseditaccountwidget.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/kopete/protocols/sms/smseditaccountwidget.cpp b/kopete/protocols/sms/smseditaccountwidget.cpp
index 5994534d..6283c2dd 100644
--- a/kopete/protocols/sms/smseditaccountwidget.cpp
+++ b/kopete/protocols/sms/smseditaccountwidget.cpp
@@ -92,18 +92,28 @@ bool SMSEditAccountWidget::validateData()
Kopete::Account* SMSEditAccountWidget::apply()
{
- if (!account())
- setAccount( new SMSAccount( m_protocol, preferencesDialog->accountId->text() ) );
+ SMSAccount *smsAccount;
+
+ if (account()) {
+ smsAccount = dynamic_cast<SMSAccount*>(account());
+ } else {
+ smsAccount = new SMSAccount( m_protocol,
+ preferencesDialog->accountId->text() );
+ setAccount( smsAccount );
+ }
+ Q_ASSERT( smsAccount );
if (service)
service->setAccount(account());
-
+
TDEConfigGroup *c = account()->configGroup();
c->writeEntry("ServiceName", preferencesDialog->serviceName->currentText());
c->writeEntry("SubEnable", preferencesDialog->subEnable->isChecked() ? "true" : "false");
c->writeEntry("SubCode", preferencesDialog->subCode->text());
c->writeEntry("MsgAction", preferencesDialog->ifMessageTooLong->currentItem());
+ smsAccount->loadConfig();
+
emit saved();
return account();
}