summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/smtpwrapper.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/libmailwrapper/smtpwrapper.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/smtpwrapper.cpp15
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
@@ -9,13 +9,16 @@
//#include <qt.h>
#include <qapplication.h>
#include <qmessagebox.h>
#include <stdlib.h>
-#include <qpe/config.h>
+#ifndef DESKTOP_VERSION
+//#include <qpe/config.h>
#include <qpe/qcopenvelope_qws.h>
-
+#endif
#include <libetpan/libetpan.h>
#include <klocale.h>
+#include <kglobal.h>
+#include <kconfig.h>
using namespace Opie::Core;
progressMailSend*SMTPwrapper::sendProgress = 0;
@@ -23,9 +26,9 @@ progressMailSend*SMTPwrapper::sendProgress = 0;
SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp )
: Generatemail()
{
m_SmtpAccount = aSmtp;
- Config cfg( "mail" );
+ KConfig cfg( locateLocal("config", "kopiemail" ) );
cfg.setGroup( "Status" );
m_queuedMail = cfg.readNumEntry( "outgoing", 0 );
emit queuedMails( m_queuedMail );
connect( this, SIGNAL( queuedMails(int) ), this, SLOT( emitQCop(int) ) );
@@ -37,10 +40,12 @@ SMTPwrapper::~SMTPwrapper()
disc_server();
}
void SMTPwrapper::emitQCop( int queued ) {
+#ifndef DESKTOP_VERSION
QCopEnvelope env( "QPE/Pim", "outgoingMails(int)" );
env << queued;
+#endif
}
QString SMTPwrapper::mailsmtpError( int errnum ) {
switch ( errnum ) {
@@ -126,9 +131,9 @@ bool SMTPwrapper::smtpSend( mailmime *mail,bool later) {
if (later) {
storeMail(data,size,"Outgoing");
if (data)
free( data );
- Config cfg( "mail" );
+ KConfig cfg( locateLocal("config", "kopiemail" ) );
cfg.setGroup( "Status" );
cfg.writeEntry( "outgoing", ++m_queuedMail );
emit queuedMails( m_queuedMail );
return true;
@@ -446,9 +451,9 @@ bool SMTPwrapper::flushOutbox() {
if (reset_user_value) {
m_SmtpAccount->setUser(oldUser);
m_SmtpAccount->setPassword(oldPw);
}
- Config cfg( "mail" );
+ KConfig cfg( locateLocal("config", "kopiemail" ) );
cfg.setGroup( "Status" );
m_queuedMail = 0;
cfg.writeEntry( "outgoing", m_queuedMail );
emit queuedMails( m_queuedMail );