Diffstat (limited to 'kmicromail/libmailwrapper/smtpwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/libmailwrapper/smtpwrapper.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp index dee1477..eb07ef1 100644 --- a/kmicromail/libmailwrapper/smtpwrapper.cpp +++ b/kmicromail/libmailwrapper/smtpwrapper.cpp | |||
@@ -10,11 +10,14 @@ | |||
10 | #include <qapplication.h> | 10 | #include <qapplication.h> |
11 | #include <qmessagebox.h> | 11 | #include <qmessagebox.h> |
12 | #include <stdlib.h> | 12 | #include <stdlib.h> |
13 | #include <qpe/config.h> | 13 | #ifndef DESKTOP_VERSION |
14 | //#include <qpe/config.h> | ||
14 | #include <qpe/qcopenvelope_qws.h> | 15 | #include <qpe/qcopenvelope_qws.h> |
15 | 16 | #endif | |
16 | #include <libetpan/libetpan.h> | 17 | #include <libetpan/libetpan.h> |
17 | #include <klocale.h> | 18 | #include <klocale.h> |
19 | #include <kglobal.h> | ||
20 | #include <kconfig.h> | ||
18 | 21 | ||
19 | 22 | ||
20 | using namespace Opie::Core; | 23 | using namespace Opie::Core; |
@@ -24,7 +27,7 @@ SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp ) | |||
24 | : Generatemail() | 27 | : Generatemail() |
25 | { | 28 | { |
26 | m_SmtpAccount = aSmtp; | 29 | m_SmtpAccount = aSmtp; |
27 | Config cfg( "mail" ); | 30 | KConfig cfg( locateLocal("config", "kopiemail" ) ); |
28 | cfg.setGroup( "Status" ); | 31 | cfg.setGroup( "Status" ); |
29 | m_queuedMail = cfg.readNumEntry( "outgoing", 0 ); | 32 | m_queuedMail = cfg.readNumEntry( "outgoing", 0 ); |
30 | emit queuedMails( m_queuedMail ); | 33 | emit queuedMails( m_queuedMail ); |
@@ -38,8 +41,10 @@ SMTPwrapper::~SMTPwrapper() | |||
38 | } | 41 | } |
39 | 42 | ||
40 | void SMTPwrapper::emitQCop( int queued ) { | 43 | void SMTPwrapper::emitQCop( int queued ) { |
44 | #ifndef DESKTOP_VERSION | ||
41 | QCopEnvelope env( "QPE/Pim", "outgoingMails(int)" ); | 45 | QCopEnvelope env( "QPE/Pim", "outgoingMails(int)" ); |
42 | env << queued; | 46 | env << queued; |
47 | #endif | ||
43 | } | 48 | } |
44 | 49 | ||
45 | QString SMTPwrapper::mailsmtpError( int errnum ) { | 50 | QString SMTPwrapper::mailsmtpError( int errnum ) { |
@@ -127,7 +132,7 @@ bool SMTPwrapper::smtpSend( mailmime *mail,bool later) { | |||
127 | storeMail(data,size,"Outgoing"); | 132 | storeMail(data,size,"Outgoing"); |
128 | if (data) | 133 | if (data) |
129 | free( data ); | 134 | free( data ); |
130 | Config cfg( "mail" ); | 135 | KConfig cfg( locateLocal("config", "kopiemail" ) ); |
131 | cfg.setGroup( "Status" ); | 136 | cfg.setGroup( "Status" ); |
132 | cfg.writeEntry( "outgoing", ++m_queuedMail ); | 137 | cfg.writeEntry( "outgoing", ++m_queuedMail ); |
133 | emit queuedMails( m_queuedMail ); | 138 | emit queuedMails( m_queuedMail ); |
@@ -447,7 +452,7 @@ bool SMTPwrapper::flushOutbox() { | |||
447 | m_SmtpAccount->setUser(oldUser); | 452 | m_SmtpAccount->setUser(oldUser); |
448 | m_SmtpAccount->setPassword(oldPw); | 453 | m_SmtpAccount->setPassword(oldPw); |
449 | } | 454 | } |
450 | Config cfg( "mail" ); | 455 | KConfig cfg( locateLocal("config", "kopiemail" ) ); |
451 | cfg.setGroup( "Status" ); | 456 | cfg.setGroup( "Status" ); |
452 | m_queuedMail = 0; | 457 | m_queuedMail = 0; |
453 | cfg.writeEntry( "outgoing", m_queuedMail ); | 458 | cfg.writeEntry( "outgoing", m_queuedMail ); |