-rw-r--r-- | noncore/net/mail/libmailwrapper/settings.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/net/mail/libmailwrapper/settings.cpp b/noncore/net/mail/libmailwrapper/settings.cpp index 3279f39..65ca387 100644 --- a/noncore/net/mail/libmailwrapper/settings.cpp +++ b/noncore/net/mail/libmailwrapper/settings.cpp | |||
@@ -80,64 +80,65 @@ void Settings::updateAccounts() | |||
80 | accounts.append( account ); | 80 | accounts.append( account ); |
81 | } | 81 | } |
82 | 82 | ||
83 | readAccounts(); | 83 | readAccounts(); |
84 | } | 84 | } |
85 | 85 | ||
86 | void Settings::saveAccounts() | 86 | void Settings::saveAccounts() |
87 | { | 87 | { |
88 | checkDirectory(); | 88 | checkDirectory(); |
89 | Account *it; | 89 | Account *it; |
90 | 90 | ||
91 | for ( it = accounts.first(); it; it = accounts.next() ) { | 91 | for ( it = accounts.first(); it; it = accounts.next() ) { |
92 | it->save(); | 92 | it->save(); |
93 | } | 93 | } |
94 | } | 94 | } |
95 | 95 | ||
96 | void Settings::readAccounts() | 96 | void Settings::readAccounts() |
97 | { | 97 | { |
98 | checkDirectory(); | 98 | checkDirectory(); |
99 | Account *it; | 99 | Account *it; |
100 | 100 | ||
101 | for ( it = accounts.first(); it; it = accounts.next() ) { | 101 | for ( it = accounts.first(); it; it = accounts.next() ) { |
102 | it->read(); | 102 | it->read(); |
103 | } | 103 | } |
104 | } | 104 | } |
105 | 105 | ||
106 | Account::Account() | 106 | Account::Account() |
107 | { | 107 | { |
108 | accountName = "changeMe"; | 108 | accountName = "changeMe"; |
109 | type = "changeMe"; | 109 | type = "changeMe"; |
110 | ssl = false; | 110 | ssl = false; |
111 | connectionType = 1; | 111 | connectionType = 1; |
112 | offline = false; | ||
112 | } | 113 | } |
113 | 114 | ||
114 | void Account::remove() | 115 | void Account::remove() |
115 | { | 116 | { |
116 | QFile file( getFileName() ); | 117 | QFile file( getFileName() ); |
117 | file.remove(); | 118 | file.remove(); |
118 | } | 119 | } |
119 | 120 | ||
120 | IMAPaccount::IMAPaccount() | 121 | IMAPaccount::IMAPaccount() |
121 | : Account() | 122 | : Account() |
122 | { | 123 | { |
123 | file = IMAPaccount::getUniqueFileName(); | 124 | file = IMAPaccount::getUniqueFileName(); |
124 | accountName = "New IMAP Account"; | 125 | accountName = "New IMAP Account"; |
125 | ssl = false; | 126 | ssl = false; |
126 | connectionType = 1; | 127 | connectionType = 1; |
127 | type = "IMAP"; | 128 | type = "IMAP"; |
128 | port = IMAP_PORT; | 129 | port = IMAP_PORT; |
129 | } | 130 | } |
130 | 131 | ||
131 | IMAPaccount::IMAPaccount( QString filename ) | 132 | IMAPaccount::IMAPaccount( QString filename ) |
132 | : Account() | 133 | : Account() |
133 | { | 134 | { |
134 | file = filename; | 135 | file = filename; |
135 | accountName = "New IMAP Account"; | 136 | accountName = "New IMAP Account"; |
136 | ssl = false; | 137 | ssl = false; |
137 | connectionType = 1; | 138 | connectionType = 1; |
138 | type = "IMAP"; | 139 | type = "IMAP"; |
139 | port = IMAP_PORT; | 140 | port = IMAP_PORT; |
140 | } | 141 | } |
141 | 142 | ||
142 | QString IMAPaccount::getUniqueFileName() | 143 | QString IMAPaccount::getUniqueFileName() |
143 | { | 144 | { |