summaryrefslogtreecommitdiff
path: root/noncore/net/mail/editaccounts.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/editaccounts.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/editaccounts.cpp30
1 files changed, 24 insertions, 6 deletions
diff --git a/noncore/net/mail/editaccounts.cpp b/noncore/net/mail/editaccounts.cpp
index 28d531b..5c4bdf7 100644
--- a/noncore/net/mail/editaccounts.cpp
+++ b/noncore/net/mail/editaccounts.cpp
@@ -16,7 +16,25 @@ AccountListItem::AccountListItem( QListView *parent, Account *a)
16{ 16{
17 account = a; 17 account = a;
18 setText( 0, account->getAccountName() ); 18 setText( 0, account->getAccountName() );
19 setText( 1, account->getType() ); 19 QString ttext = "";
20 switch (account->getType()) {
21 case MAILLIB::A_NNTP:
22 ttext="NNTP";
23 break;
24 case MAILLIB::A_POP3:
25 ttext = "POP3";
26 break;
27 case MAILLIB::A_IMAP:
28 ttext = "IMAP";
29 break;
30 case MAILLIB::A_SMTP:
31 ttext = "SMTP";
32 break;
33 default:
34 ttext = "UNKNOWN";
35 break;
36 }
37 setText( 1, ttext);
20} 38}
21 39
22EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) 40EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags )
@@ -49,7 +67,7 @@ void EditAccounts::slotFillLists()
49 Account *it; 67 Account *it;
50 for ( it = accounts.first(); it; it = accounts.next() ) 68 for ( it = accounts.first(); it; it = accounts.next() )
51 { 69 {
52 if ( it->getType().compare( "NNTP" ) == 0 ) 70 if ( it->getType()==MAILLIB::A_NNTP )
53 { 71 {
54 (void) new AccountListItem( newsList, it ); 72 (void) new AccountListItem( newsList, it );
55 } 73 }
@@ -143,7 +161,7 @@ void EditAccounts::slotNewAccount( const QString &type )
143 161
144void EditAccounts::slotEditAccount( Account *account ) 162void EditAccounts::slotEditAccount( Account *account )
145{ 163{
146 if ( account->getType().compare( "IMAP" ) == 0 ) 164 if ( account->getType() == MAILLIB::A_IMAP )
147 { 165 {
148 IMAPaccount *imapAcc = static_cast<IMAPaccount *>(account); 166 IMAPaccount *imapAcc = static_cast<IMAPaccount *>(account);
149 IMAPconfig imap( imapAcc, this, 0, true, WStyle_ContextHelp ); 167 IMAPconfig imap( imapAcc, this, 0, true, WStyle_ContextHelp );
@@ -152,7 +170,7 @@ void EditAccounts::slotEditAccount( Account *account )
152 slotFillLists(); 170 slotFillLists();
153 } 171 }
154 } 172 }
155 else if ( account->getType().compare( "POP3" ) == 0 ) 173 else if ( account->getType()==MAILLIB::A_POP3 )
156 { 174 {
157 POP3account *pop3Acc = static_cast<POP3account *>(account); 175 POP3account *pop3Acc = static_cast<POP3account *>(account);
158 POP3config pop3( pop3Acc, this, 0, true, WStyle_ContextHelp ); 176 POP3config pop3( pop3Acc, this, 0, true, WStyle_ContextHelp );
@@ -161,7 +179,7 @@ void EditAccounts::slotEditAccount( Account *account )
161 slotFillLists(); 179 slotFillLists();
162 } 180 }
163 } 181 }
164 else if ( account->getType().compare( "SMTP" ) == 0 ) 182 else if ( account->getType()==MAILLIB::A_SMTP )
165 { 183 {
166 SMTPaccount *smtpAcc = static_cast<SMTPaccount *>(account); 184 SMTPaccount *smtpAcc = static_cast<SMTPaccount *>(account);
167 SMTPconfig smtp( smtpAcc, this, 0, true, WStyle_ContextHelp ); 185 SMTPconfig smtp( smtpAcc, this, 0, true, WStyle_ContextHelp );
@@ -170,7 +188,7 @@ void EditAccounts::slotEditAccount( Account *account )
170 slotFillLists(); 188 slotFillLists();
171 } 189 }
172 } 190 }
173 else if ( account->getType().compare( "NNTP" ) == 0 ) 191 else if ( account->getType()==MAILLIB::A_NNTP)
174 { 192 {
175 NNTPaccount *nntpAcc = static_cast<NNTPaccount *>(account); 193 NNTPaccount *nntpAcc = static_cast<NNTPaccount *>(account);
176 NNTPconfig nntp( nntpAcc, this, 0, true, WStyle_ContextHelp ); 194 NNTPconfig nntp( nntpAcc, this, 0, true, WStyle_ContextHelp );