summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper
Unidiff
Diffstat (limited to 'kmicromail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/pop3wrapper.cpp2
-rw-r--r--kmicromail/libmailwrapper/settings.cpp10
-rw-r--r--kmicromail/libmailwrapper/settings.h9
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
@@ -121,9 +121,9 @@ void POP3wrapper::login()
121 QString server,user, pass; 121 QString server,user, pass;
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() ) {
129 qApp->processEvents(); 129 qApp->processEvents();
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
@@ -254,8 +254,13 @@ void POP3account::read()
254 connectionType = conf->readNumEntry( "ConnectionType" ); 254 connectionType = conf->readNumEntry( "ConnectionType" );
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
261void POP3account::save() 266void POP3account::save()
@@ -271,8 +276,13 @@ void POP3account::save()
271 conf->writeEntry( "ConnectionType", connectionType ); 276 conf->writeEntry( "ConnectionType", connectionType );
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}
278 288
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
@@ -7,8 +7,9 @@
7 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
12class Account 13class Account
13{ 14{
14 15
@@ -23,8 +24,11 @@ public:
23 24
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
30 void setUser(const QString&str){ user = str; } 34 void setUser(const QString&str){ user = str; }
@@ -38,8 +42,10 @@ public:
38 42
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;}
45 51
@@ -52,8 +58,11 @@ protected:
52 bool ssl; 58 bool ssl;
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
58class IMAPaccount : public Account 67class IMAPaccount : public Account
59{ 68{