summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper
Unidiff
Diffstat (limited to 'kmicromail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/settings.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kmicromail/libmailwrapper/settings.cpp b/kmicromail/libmailwrapper/settings.cpp
index 04afe7c..19093b1 100644
--- a/kmicromail/libmailwrapper/settings.cpp
+++ b/kmicromail/libmailwrapper/settings.cpp
@@ -29,50 +29,50 @@ Settings::Settings()
29void Settings::checkDirectory() 29void Settings::checkDirectory()
30{ 30{
31 return; 31 return;
32 locateLocal("data", "kopiemail" ); 32 locateLocal("data", "kopiemail" );
33 /* 33 /*
34 if ( !QDir( (QString) getenv( "HOME" ) + "/Applications/opiemail/" ).exists() ) { 34 if ( !QDir( (QString) getenv( "HOME" ) + "/Applications/opiemail/" ).exists() ) {
35 system( "mkdir -p $HOME/Applications/opiemail" ); 35 system( "mkdir -p $HOME/Applications/opiemail" );
36 qDebug("$HOME/Applications/opiemail created "); 36 qDebug("$HOME/Applications/opiemail created ");
37 } 37 }
38 */ 38 */
39} 39}
40 40
41QList<Account> Settings::getAccounts() 41QList<Account> Settings::getAccounts()
42{ 42{
43 return accounts; 43 return accounts;
44} 44}
45 45
46void Settings::addAccount( Account *account ) 46void Settings::addAccount( Account *account )
47{ 47{
48 accounts.append( account ); 48 accounts.append( account );
49} 49}
50 50
51void Settings::delAccount( Account *account ) 51void Settings::delAccount( Account *account )
52{ 52{
53 accounts.remove( account );
54 account->remove(); 53 account->remove();
54 accounts.remove( account );
55} 55}
56 56
57void Settings::updateAccounts() 57void Settings::updateAccounts()
58{ 58{
59 accounts.clear(); 59 accounts.clear();
60 QDir dir( locateLocal("data", "kopiemail" ) ); 60 QDir dir( locateLocal("data", "kopiemail" ) );
61 QStringList::Iterator it; 61 QStringList::Iterator it;
62 62
63 QStringList imap = dir.entryList( "imap-*" ); 63 QStringList imap = dir.entryList( "imap-*" );
64 for ( it = imap.begin(); it != imap.end(); it++ ) { 64 for ( it = imap.begin(); it != imap.end(); it++ ) {
65 IMAPaccount *account = new IMAPaccount( (*it).replace(0, 5, "") ); 65 IMAPaccount *account = new IMAPaccount( (*it).replace(0, 5, "") );
66 accounts.append( account ); 66 accounts.append( account );
67 } 67 }
68 68
69 QStringList pop3 = dir.entryList( "pop3-*" ); 69 QStringList pop3 = dir.entryList( "pop3-*" );
70 for ( it = pop3.begin(); it != pop3.end(); it++ ) { 70 for ( it = pop3.begin(); it != pop3.end(); it++ ) {
71 POP3account *account = new POP3account( (*it).replace(0, 5, "") ); 71 POP3account *account = new POP3account( (*it).replace(0, 5, "") );
72 accounts.append( account ); 72 accounts.append( account );
73 } 73 }
74 74
75 QStringList smtp = dir.entryList( "smtp-*" ); 75 QStringList smtp = dir.entryList( "smtp-*" );
76 for ( it = smtp.begin(); it != smtp.end(); it++ ) { 76 for ( it = smtp.begin(); it != smtp.end(); it++ ) {
77 SMTPaccount *account = new SMTPaccount( (*it).replace(0, 5, "") ); 77 SMTPaccount *account = new SMTPaccount( (*it).replace(0, 5, "") );
78 accounts.append( account ); 78 accounts.append( account );