-rw-r--r-- | kmicromail/libmailwrapper/pop3wrapper.cpp | 2 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/settings.cpp | 10 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/settings.h | 9 |
3 files changed, 20 insertions, 1 deletions
diff --git a/kmicromail/libmailwrapper/pop3wrapper.cpp b/kmicromail/libmailwrapper/pop3wrapper.cpp index 8d2f778..1edec9e 100644 --- a/kmicromail/libmailwrapper/pop3wrapper.cpp +++ b/kmicromail/libmailwrapper/pop3wrapper.cpp | |||
@@ -122,7 +122,7 @@ void POP3wrapper::login() | |||
122 | uint16_t port; | 122 | uint16_t port; |
123 | int err = MAILPOP3_NO_ERROR; | 123 | int err = MAILPOP3_NO_ERROR; |
124 | 124 | ||
125 | server = account->getServer().latin1(); | 125 | server = account->getServer(); |
126 | port = account->getPort().toUInt(); | 126 | port = account->getPort().toUInt(); |
127 | 127 | ||
128 | if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { | 128 | if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { |
diff --git a/kmicromail/libmailwrapper/settings.cpp b/kmicromail/libmailwrapper/settings.cpp index b0a539e..90e32fa 100644 --- a/kmicromail/libmailwrapper/settings.cpp +++ b/kmicromail/libmailwrapper/settings.cpp | |||
@@ -255,6 +255,11 @@ void POP3account::read() | |||
255 | user = conf->readEntry( "User" ); | 255 | user = conf->readEntry( "User" ); |
256 | password = conf->readEntryCrypt( "Password" ); | 256 | password = conf->readEntryCrypt( "Password" ); |
257 | offline = conf->readBoolEntry("Offline",false); | 257 | offline = conf->readBoolEntry("Offline",false); |
258 | localFolder = conf->readEntry( "LocalFolder" ); | ||
259 | maxMailSize = conf->readNumEntry( "MaxSize",0 ); | ||
260 | int lf = conf->readNumEntry( "LastFetch",0 ); | ||
261 | QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) ); | ||
262 | lastFetch = dt.addSecs( lf ); | ||
258 | delete conf; | 263 | delete conf; |
259 | } | 264 | } |
260 | 265 | ||
@@ -272,6 +277,11 @@ void POP3account::save() | |||
272 | conf->writeEntry( "User", user ); | 277 | conf->writeEntry( "User", user ); |
273 | conf->writeEntryCrypt( "Password", password ); | 278 | conf->writeEntryCrypt( "Password", password ); |
274 | conf->writeEntry( "Offline",offline); | 279 | conf->writeEntry( "Offline",offline); |
280 | conf->writeEntry( "LocalFolder", localFolder ); | ||
281 | conf->writeEntry( "MaxSize", maxMailSize ); | ||
282 | QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) ); | ||
283 | int lf = dt.secsTo ( lastFetch ); | ||
284 | conf->writeEntry( "LastFetch", lf ); | ||
275 | conf->write(); | 285 | conf->write(); |
276 | delete conf; | 286 | delete conf; |
277 | } | 287 | } |
diff --git a/kmicromail/libmailwrapper/settings.h b/kmicromail/libmailwrapper/settings.h index ba3ec89..c33c403 100644 --- a/kmicromail/libmailwrapper/settings.h +++ b/kmicromail/libmailwrapper/settings.h | |||
@@ -8,6 +8,7 @@ | |||
8 | /* QT */ | 8 | /* QT */ |
9 | #include <qobject.h> | 9 | #include <qobject.h> |
10 | #include <qlist.h> | 10 | #include <qlist.h> |
11 | #include <qdatetime.h> | ||
11 | 12 | ||
12 | class Account | 13 | class Account |
13 | { | 14 | { |
@@ -24,6 +25,9 @@ public: | |||
24 | void setServer(const QString&str){ server = str; } | 25 | void setServer(const QString&str){ server = str; } |
25 | const QString&getServer()const{ return server; } | 26 | const QString&getServer()const{ return server; } |
26 | 27 | ||
28 | void setLocalFolder( QString name ) { localFolder = name; } | ||
29 | const QString& getLocalFolder()const{ return localFolder; } | ||
30 | |||
27 | void setPort(const QString&str) { port = str; } | 31 | void setPort(const QString&str) { port = str; } |
28 | const QString&getPort()const{ return port; } | 32 | const QString&getPort()const{ return port; } |
29 | 33 | ||
@@ -39,6 +43,8 @@ public: | |||
39 | void setConnectionType( int x ) { connectionType = x; } | 43 | void setConnectionType( int x ) { connectionType = x; } |
40 | int ConnectionType() { return connectionType; } | 44 | int ConnectionType() { return connectionType; } |
41 | 45 | ||
46 | void setMaxMailSize( int x ) { maxMailSize = x; } | ||
47 | int getMaxMailSize() { return maxMailSize; } | ||
42 | 48 | ||
43 | void setOffline(bool b) {offline = b;} | 49 | void setOffline(bool b) {offline = b;} |
44 | bool getOffline()const{return offline;} | 50 | bool getOffline()const{return offline;} |
@@ -53,6 +59,9 @@ protected: | |||
53 | int connectionType; | 59 | int connectionType; |
54 | bool offline; | 60 | bool offline; |
55 | MAILLIB::ATYPE type; | 61 | MAILLIB::ATYPE type; |
62 | QString localFolder; | ||
63 | int maxMailSize; | ||
64 | QDateTime lastFetch; | ||
56 | }; | 65 | }; |
57 | 66 | ||
58 | class IMAPaccount : public Account | 67 | class IMAPaccount : public Account |