summaryrefslogtreecommitdiffabout
path: root/kmicromail
Side-by-side diff
Diffstat (limited to 'kmicromail') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/composemail.cpp11
-rw-r--r--kmicromail/kmicromail.pro77
-rw-r--r--kmicromail/libetpan/libetpan.pro274
-rw-r--r--kmicromail/libmailwrapper/generatemail.h5
-rw-r--r--kmicromail/libmailwrapper/libmailwrapper.pro64
-rw-r--r--kmicromail/libmailwrapper/mailwrapper.h2
-rw-r--r--kmicromail/libmailwrapper/mhwrapper.cpp20
-rw-r--r--kmicromail/libmailwrapper/mhwrapper.h6
-rw-r--r--kmicromail/libmailwrapper/settings.h1
-rw-r--r--kmicromail/libmailwrapper/smtpwrapper.cpp15
-rw-r--r--kmicromail/libmailwrapper/smtpwrapper.h2
-rw-r--r--kmicromail/libmailwrapper/storemail.h2
-rw-r--r--kmicromail/mainwindow.cpp4
-rw-r--r--kmicromail/mainwindow.h1
-rw-r--r--kmicromail/opiemail.cpp6
-rw-r--r--kmicromail/qpe/global.cpp12
-rw-r--r--kmicromail/qpe/global.h12
-rw-r--r--kmicromail/qpe/qpeapplication.h5
-rw-r--r--kmicromail/viewmail.cpp1
19 files changed, 486 insertions, 34 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index 8eb6d27..0cd0b23 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -32,6 +32,6 @@
#ifdef DESKTOP_VERSION
+#include <qapplication.h>
#include <kabc/addresseedialog.h>
-#else //DESKTOP_VERSION
-#include <libkdepim/externalapphandler.h>
#endif //DESKTOP_VERSION
+#include <libkdepim/externalapphandler.h>
@@ -116,8 +116,9 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
icon = SmallIcon("filesave");
- if ( QApplication::desktop()->width() < 320 )
+ SaveButton->setIconSet (icon ) ;
+ if ( QApplication::desktop()->width() < 320 ) {
SaveButton->setText ("") ;
+ SaveButton->setMaximumSize ( SaveButton->sizeHint().height(),SaveButton->sizeHint().height()) ;
+ }
else
SaveButton->setText (i18n("Save")) ;
- SaveButton->setIconSet (icon ) ;
- SaveButton->setMaximumSize ( SaveButton->sizeHint().height(),SaveButton->sizeHint().height()) ;
#ifndef DESKTOP_VERSION
diff --git a/kmicromail/kmicromail.pro b/kmicromail/kmicromail.pro
new file mode 100644
index 0000000..cd5a3c1
--- a/dev/null
+++ b/kmicromail/kmicromail.pro
@@ -0,0 +1,77 @@
+CONFIG += qt warn_on
+TEMPLATE = app
+HEADERS = defines.h \
+ editaccounts.h \
+ composemail.h \
+ accountview.h \
+ accountitem.h \
+ mainwindow.h \
+ viewmail.h \
+ viewmailbase.h \
+ opiemail.h \
+ mailistviewitem.h \
+ settingsdialog.h \
+ statuswidget.h \
+ newmaildir.h \
+ selectstore.h \
+ selectsmtp.h \
+ nntpgroups.h \
+ koprefs.h \
+ koprefsdialog.h \
+ nntpgroupsdlg.h
+
+SOURCES = main.cpp \
+ opiemail.cpp \
+ mainwindow.cpp \
+ accountview.cpp \
+ accountitem.cpp \
+ composemail.cpp \
+ editaccounts.cpp \
+ viewmail.cpp \
+ viewmailbase.cpp \
+ mailistviewitem.cpp \
+ settingsdialog.cpp \
+ statuswidget.cpp \
+ newmaildir.cpp \
+ selectstore.cpp \
+ selectsmtp.cpp \
+ nntpgroups.cpp \
+ koprefs.cpp\
+ koprefsdialog.cpp\
+ nntpgroupsdlg.cpp
+
+INTERFACES = editaccountsui.ui \
+ selectmailtypeui.ui \
+ imapconfigui.ui \
+ pop3configui.ui \
+ nntpconfigui.ui \
+ smtpconfigui.ui \
+ composemailui.ui \
+ settingsdialogui.ui \
+ statuswidgetui.ui \
+ newmaildirui.ui \
+ selectstoreui.ui \
+ nntpgroupsui.ui
+
+
+INCLUDEPATH += . .. ../libkdepim ../microkde ../microkde/kdecore libetpan/include ../microkde/kdeui
+LIBS += -L../bin -lmicromailwrapper -lmicrolibetpan -lmicrokde -lssl -lcrypto -lmicrokdepim -lmicrokabc
+
+DESTDIR= ../bin
+TARGET = ompi
+
+DEFINES += DESKTOP_VERSION
+unix : {
+OBJECTS_DIR = obj/unix
+MOC_DIR = moc/unix
+}
+win32: {
+DEFINES += _WIN32_
+LIBS += mfc71u.lib
+QMAKE_LINK += /NODEFAULTLIB:LIBC
+#QMAKE_LINK += /NODEFAULTLIB:MSVCRT
+#QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib
+OBJECTS_DIR = obj/win
+MOC_DIR = moc/win
+}
+
diff --git a/kmicromail/libetpan/libetpan.pro b/kmicromail/libetpan/libetpan.pro
new file mode 100644
index 0000000..dfafa07
--- a/dev/null
+++ b/kmicromail/libetpan/libetpan.pro
@@ -0,0 +1,274 @@
+######################################################################
+# Automatically generated by qmake (1.07a) Thu Jul 1 00:54:03 2004
+######################################################################
+
+TEMPLATE = lib
+TARGET = microlibetpan
+
+OBJECTS_DIR = obj
+MOC_DIR = moc
+DESTDIR=../../bin
+
+DEPENDPATH += generic \
+ imap \
+ imf \
+ maildir \
+ mbox \
+ mh \
+ mime \
+ nntp \
+ pop3 \
+ smtp \
+ tests \
+ tools \
+ include/libetpan
+INCLUDEPATH += . \
+ generic \
+ include \
+ tools \
+ imf \
+ imap \
+ mime \
+ maildir \
+ mbox \
+ mh \
+ nntp \
+ pop3 \
+ smtp \
+ tests
+
+# Input
+HEADERS += generic/data_message_driver.h \
+ generic/generic_cache.h \
+ generic/generic_cache_types.h \
+ generic/imapdriver.h \
+ generic/imapdriver_cached.h \
+ generic/imapdriver_cached_message.h \
+ generic/imapdriver_message.h \
+ generic/imapdriver_tools.h \
+ generic/imapdriver_types.h \
+ generic/imapstorage.h \
+ generic/imfcache.h \
+ generic/libetpan.h \
+ generic/libetpan_version.h \
+ generic/maildirdriver.h \
+ generic/maildirdriver_cached.h \
+ generic/maildirdriver_cached_message.h \
+ generic/maildirdriver_message.h \
+ generic/maildirdriver_tools.h \
+ generic/maildirdriver_types.h \
+ generic/maildirstorage.h \
+ generic/maildriver.h \
+ generic/maildriver_errors.h \
+ generic/maildriver_tools.h \
+ generic/maildriver_types.h \
+ generic/maildriver_types_helper.h \
+ generic/mailfolder.h \
+ generic/mailmessage.h \
+ generic/mailmessage_tools.h \
+ generic/mailmessage_types.h \
+ generic/mailstorage.h \
+ generic/mailstorage_tools.h \
+ generic/mailstorage_types.h \
+ generic/mailthread.h \
+ generic/mailthread_types.h \
+ generic/mboxdriver.h \
+ generic/mboxdriver_cached.h \
+ generic/mboxdriver_cached_message.h \
+ generic/mboxdriver_message.h \
+ generic/mboxdriver_tools.h \
+ generic/mboxdriver_types.h \
+ generic/mboxstorage.h \
+ generic/mhdriver.h \
+ generic/mhdriver_cached.h \
+ generic/mhdriver_cached_message.h \
+ generic/mhdriver_message.h \
+ generic/mhdriver_tools.h \
+ generic/mhdriver_types.h \
+ generic/mhstorage.h \
+ generic/mime_message_driver.h \
+ generic/nntpdriver.h \
+ generic/nntpdriver_cached.h \
+ generic/nntpdriver_cached_message.h \
+ generic/nntpdriver_message.h \
+ generic/nntpdriver_tools.h \
+ generic/nntpdriver_types.h \
+ generic/nntpstorage.h \
+ generic/pop3driver.h \
+ generic/pop3driver_cached.h \
+ generic/pop3driver_cached_message.h \
+ generic/pop3driver_message.h \
+ generic/pop3driver_tools.h \
+ generic/pop3driver_types.h \
+ generic/pop3storage.h \
+ imap/mailimap.h \
+ imap/mailimap_helper.h \
+ imap/mailimap_keywords.h \
+ imap/mailimap_parser.h \
+ imap/mailimap_print.h \
+ imap/mailimap_sender.h \
+ imap/mailimap_socket.h \
+ imap/mailimap_ssl.h \
+ imap/mailimap_types.h \
+ imap/mailimap_types_helper.h \
+ imf/mailimf.h \
+ imf/mailimf_types.h \
+ imf/mailimf_types_helper.h \
+ imf/mailimf_write.h \
+ maildir/maildir.h \
+ maildir/maildir_types.h \
+ mbox/mailmbox.h \
+ mbox/mailmbox_parse.h \
+ mbox/mailmbox_types.h \
+ mh/mailmh.h \
+ mime/mailmime.h \
+ mime/mailmime_content.h \
+ mime/mailmime_decode.h \
+ mime/mailmime_disposition.h \
+ mime/mailmime_types.h \
+ mime/mailmime_types_helper.h \
+ mime/mailmime_write.h \
+ nntp/newsnntp.h \
+ nntp/newsnntp_socket.h \
+ nntp/newsnntp_ssl.h \
+ nntp/newsnntp_types.h \
+ pop3/mailpop3.h \
+ pop3/mailpop3_helper.h \
+ pop3/mailpop3_socket.h \
+ pop3/mailpop3_ssl.h \
+ pop3/mailpop3_types.h \
+ smtp/mailsmtp.h \
+ smtp/mailsmtp_helper.h \
+ smtp/mailsmtp_socket.h \
+ smtp/mailsmtp_ssl.h \
+ smtp/mailsmtp_types.h \
+ tools/base64.h \
+ tools/carray.h \
+ tools/charconv.h \
+ tools/chash.h \
+ tools/cinthash.h \
+ tools/clist.h \
+ tools/connect.h \
+ tools/hmac-md5.h \
+ tools/mail.h \
+ tools/mail_cache_db.h \
+ tools/mail_cache_db_types.h \
+ tools/maillock.h \
+ tools/mailstream.h \
+ tools/mailstream_helper.h \
+ tools/mailstream_low.h \
+ tools/mailstream_socket.h \
+ tools/mailstream_ssl.h \
+ tools/mailstream_types.h \
+ tools/mapping.h \
+ tools/md5.h \
+ tools/md5global.h \
+ tools/mmapstring.h \
+
+SOURCES += generic/data_message_driver.c \
+ generic/generic_cache.c \
+ generic/imapdriver.c \
+ generic/imapdriver_cached.c \
+ generic/imapdriver_cached_message.c \
+ generic/imapdriver_message.c \
+ generic/imapdriver_tools.c \
+ generic/imapstorage.c \
+ generic/imfcache.c \
+ generic/libetpan_version.c \
+ generic/maildirdriver.c \
+ generic/maildirdriver_cached.c \
+ generic/maildirdriver_cached_message.c \
+ generic/maildirdriver_message.c \
+ generic/maildirdriver_tools.c \
+ generic/maildirstorage.c \
+ generic/maildriver.c \
+ generic/maildriver_tools.c \
+ generic/maildriver_types.c \
+ generic/maildriver_types_helper.c \
+ generic/mailfolder.c \
+ generic/mailmessage.c \
+ generic/mailmessage_tools.c \
+ generic/mailmessage_types.c \
+ generic/mailstorage.c \
+ generic/mailstorage_tools.c \
+ generic/mailthread.c \
+ generic/mailthread_types.c \
+ generic/mboxdriver.c \
+ generic/mboxdriver_cached.c \
+ generic/mboxdriver_cached_message.c \
+ generic/mboxdriver_message.c \
+ generic/mboxdriver_tools.c \
+ generic/mboxstorage.c \
+ generic/mhdriver.c \
+ generic/mhdriver_cached.c \
+ generic/mhdriver_cached_message.c \
+ generic/mhdriver_message.c \
+ generic/mhdriver_tools.c \
+ generic/mhstorage.c \
+ generic/mime_message_driver.c \
+ generic/nntpdriver.c \
+ generic/nntpdriver_cached.c \
+ generic/nntpdriver_cached_message.c \
+ generic/nntpdriver_message.c \
+ generic/nntpdriver_tools.c \
+ generic/nntpstorage.c \
+ generic/pop3driver.c \
+ generic/pop3driver_cached.c \
+ generic/pop3driver_cached_message.c \
+ generic/pop3driver_message.c \
+ generic/pop3driver_tools.c \
+ generic/pop3storage.c \
+ imap/mailimap.c \
+ imap/mailimap_helper.c \
+ imap/mailimap_keywords.c \
+ imap/mailimap_parser.c \
+ imap/mailimap_print.c \
+ imap/mailimap_sender.c \
+ imap/mailimap_socket.c \
+ imap/mailimap_ssl.c \
+ imap/mailimap_types.c \
+ imap/mailimap_types_helper.c \
+ imf/mailimf.c \
+ imf/mailimf_types.c \
+ imf/mailimf_types_helper.c \
+ imf/mailimf_write.c \
+ maildir/maildir.c \
+ mbox/mailmbox.c \
+ mbox/mailmbox_parse.c \
+ mbox/mailmbox_types.c \
+ mh/mailmh.c \
+ mime/mailmime.c \
+ mime/mailmime_content.c \
+ mime/mailmime_decode.c \
+ mime/mailmime_disposition.c \
+ mime/mailmime_types.c \
+ mime/mailmime_types_helper.c \
+ mime/mailmime_write.c \
+ nntp/newsnntp.c \
+ nntp/newsnntp_socket.c \
+ nntp/newsnntp_ssl.c \
+ pop3/mailpop3.c \
+ pop3/mailpop3_helper.c \
+ pop3/mailpop3_socket.c \
+ pop3/mailpop3_ssl.c \
+ smtp/mailsmtp.c \
+ smtp/mailsmtp_helper.c \
+ smtp/mailsmtp_socket.c \
+ smtp/mailsmtp_ssl.c \
+ tools/base64.c \
+ tools/carray.c \
+ tools/charconv.c \
+ tools/chash.c \
+ tools/cinthash.c \
+ tools/clist.c \
+ tools/connect.c \
+ tools/mail_cache_db.c \
+ tools/maillock.c \
+ tools/mailstream.c \
+ tools/mailstream_helper.c \
+ tools/mailstream_low.c \
+ tools/mailstream_socket.c \
+ tools/mailstream_ssl.c \
+ tools/mapping.c \
+ tools/md5.c \
+ tools/mmapstring.c
diff --git a/kmicromail/libmailwrapper/generatemail.h b/kmicromail/libmailwrapper/generatemail.h
index a767b61..b9f8285 100644
--- a/kmicromail/libmailwrapper/generatemail.h
+++ b/kmicromail/libmailwrapper/generatemail.h
@@ -3,3 +3,3 @@
-#include <qpe/applnk.h>
+//#include <qpe/applnk.h>
@@ -7,2 +7,3 @@
#include <libetpan/clist.h>
+#include "mailwrapper.h"
@@ -12,3 +13,3 @@ class Mail;
class RecMail;
-class Attachment;
+
struct mailimf_fields;
diff --git a/kmicromail/libmailwrapper/libmailwrapper.pro b/kmicromail/libmailwrapper/libmailwrapper.pro
new file mode 100644
index 0000000..2b005d8
--- a/dev/null
+++ b/kmicromail/libmailwrapper/libmailwrapper.pro
@@ -0,0 +1,64 @@
+TEMPLATE = lib
+CONFIG += qt warn_on
+
+HEADERS = mailwrapper.h \
+ imapwrapper.h \
+ mailtypes.h \
+ pop3wrapper.h \
+ abstractmail.h \
+ smtpwrapper.h \
+ genericwrapper.h \
+ mboxwrapper.h \
+ settings.h \
+ logindialog.h \
+ sendmailprogress.h \
+ statusmail.h \
+ mhwrapper.h \
+ nntpwrapper.h \
+ generatemail.h \
+ storemail.h \
+ ../qpe/global.h
+
+SOURCES = imapwrapper.cpp \
+ mailwrapper.cpp \
+ mailtypes.cpp \
+ pop3wrapper.cpp \
+ abstractmail.cpp \
+ smtpwrapper.cpp \
+ genericwrapper.cpp \
+ mboxwrapper.cpp \
+ settings.cpp \
+ logindialog.cpp \
+ sendmailprogress.cpp \
+ statusmail.cpp \
+ mhwrapper.cpp \
+ nntpwrapper.cpp \
+ generatemail.cpp \
+ storemail.cpp \
+ ../qpe/global.cpp
+
+INTERFACES = logindialogui.ui \
+ sendmailprogressui.ui
+
+INCLUDEPATH += .. ../../microkde ../../microkde/kdecore ../libetpan/include
+LIBS += -lssl -lcrypto
+
+#-lqpe -letpan
+
+DESTDIR = ../../bin
+TARGET = micromailwrapper
+
+DEFINES += DESKTOP_VERSION
+unix : {
+OBJECTS_DIR = obj/unix
+MOC_DIR = moc/unix
+}
+win32: {
+DEFINES += _WIN32_
+LIBS += mfc71u.lib
+QMAKE_LINK += /NODEFAULTLIB:LIBC
+#QMAKE_LINK += /NODEFAULTLIB:MSVCRT
+#QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib
+OBJECTS_DIR = obj/win
+MOC_DIR = moc/win
+}
diff --git a/kmicromail/libmailwrapper/mailwrapper.h b/kmicromail/libmailwrapper/mailwrapper.h
index 2ba908b..88f10da 100644
--- a/kmicromail/libmailwrapper/mailwrapper.h
+++ b/kmicromail/libmailwrapper/mailwrapper.h
@@ -3,3 +3,3 @@
-#include <qpe/applnk.h>
+//#include <qpe/applnk.h>
diff --git a/kmicromail/libmailwrapper/mhwrapper.cpp b/kmicromail/libmailwrapper/mhwrapper.cpp
index f4133c0..de6d220 100644
--- a/kmicromail/libmailwrapper/mhwrapper.cpp
+++ b/kmicromail/libmailwrapper/mhwrapper.cpp
@@ -9,4 +9,4 @@
#include <qpe/global.h>
-#include <oprocess.h>
#include <klocale.h>
+#include <kglobal.h>
//#include <opie2/odebug.h>
@@ -317,2 +317,5 @@ int MHwrapper::deleteMbox(const FolderP&tfolder)
}
+ QString delDir = locateLocal( "apps", "kopiemail")+ "localmail";
+ qDebug("*****************\ndel %s %s ", delDir.latin1(),tfolder->getName().latin1() );
+#if 0
QString cmd = "rm -rf "+tfolder->getName();
@@ -324,2 +327,3 @@ int MHwrapper::deleteMbox(const FolderP&tfolder)
+ /*
connect(process, SIGNAL(processExited(Opie::Core::OProcess*)),
@@ -328,3 +332,3 @@ int MHwrapper::deleteMbox(const FolderP&tfolder)
this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int)));
-
+ */
*process << command;
@@ -335,2 +339,3 @@ int MHwrapper::deleteMbox(const FolderP&tfolder)
}
+#endif
qDebug("mail box deleted ");
@@ -339,13 +344,2 @@ int MHwrapper::deleteMbox(const FolderP&tfolder)
-void MHwrapper::processEnded(OProcess *p)
-{
- if (p) delete p;
-}
-
-void MHwrapper::oprocessStderr(OProcess*, char *buffer, int )
-{
- QString lineStr = buffer;
- QMessageBox::warning( 0, i18n("Error"), lineStr ,i18n("Ok") );
- removeMboxfailed = true;
-}
diff --git a/kmicromail/libmailwrapper/mhwrapper.h b/kmicromail/libmailwrapper/mhwrapper.h
index d1b7d1f..87f8ca1 100644
--- a/kmicromail/libmailwrapper/mhwrapper.h
+++ b/kmicromail/libmailwrapper/mhwrapper.h
@@ -11,4 +11,2 @@ class encodedString;
struct mailmbox_folder;
-namespace Opie {namespace Core {class OProcess;}}
-
class MHwrapper : public Genericwrapper
@@ -47,5 +45,3 @@ public:
public slots:
- /* for deleting maildirs we are using a system call */
- virtual void oprocessStderr(Opie::Core::OProcess*, char *buffer, int );
- virtual void processEnded(Opie::Core::OProcess *);
+
protected:
diff --git a/kmicromail/libmailwrapper/settings.h b/kmicromail/libmailwrapper/settings.h
index 61051dd..79567ef 100644
--- a/kmicromail/libmailwrapper/settings.h
+++ b/kmicromail/libmailwrapper/settings.h
@@ -10,2 +10,3 @@
#include <qlist.h>
+#include <qstringlist.h>
#include <qdatetime.h>
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
@@ -12,7 +12,10 @@
#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>
@@ -26,3 +29,3 @@ SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp )
m_SmtpAccount = aSmtp;
- Config cfg( "mail" );
+ KConfig cfg( locateLocal("config", "kopiemail" ) );
cfg.setGroup( "Status" );
@@ -40,4 +43,6 @@ SMTPwrapper::~SMTPwrapper()
void SMTPwrapper::emitQCop( int queued ) {
+#ifndef DESKTOP_VERSION
QCopEnvelope env( "QPE/Pim", "outgoingMails(int)" );
env << queued;
+#endif
}
@@ -129,3 +134,3 @@ bool SMTPwrapper::smtpSend( mailmime *mail,bool later) {
free( data );
- Config cfg( "mail" );
+ KConfig cfg( locateLocal("config", "kopiemail" ) );
cfg.setGroup( "Status" );
@@ -449,3 +454,3 @@ bool SMTPwrapper::flushOutbox() {
}
- Config cfg( "mail" );
+ KConfig cfg( locateLocal("config", "kopiemail" ) );
cfg.setGroup( "Status" );
diff --git a/kmicromail/libmailwrapper/smtpwrapper.h b/kmicromail/libmailwrapper/smtpwrapper.h
index ec42b56..bdca000 100644
--- a/kmicromail/libmailwrapper/smtpwrapper.h
+++ b/kmicromail/libmailwrapper/smtpwrapper.h
@@ -4,3 +4,3 @@
-#include <qpe/applnk.h>
+//#include <qpe/applnk.h>
diff --git a/kmicromail/libmailwrapper/storemail.h b/kmicromail/libmailwrapper/storemail.h
index 4433de0..e449f57 100644
--- a/kmicromail/libmailwrapper/storemail.h
+++ b/kmicromail/libmailwrapper/storemail.h
@@ -3,3 +3,3 @@
-#include <qpe/applnk.h>
+//#include <qpe/applnk.h>
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index c77345b..b19dbbe 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -11,3 +11,5 @@
-#ifndef DESKTOP_VERSION
+#ifdef DESKTOP_VERSION
+#include <qapplication.h>
+#else
#include <qpe/qpeapplication.h>
diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h
index 35b9c8c..f5ab69b 100644
--- a/kmicromail/mainwindow.h
+++ b/kmicromail/mainwindow.h
@@ -12,2 +12,3 @@
#include <qmenubar.h>
+#define QPEMenuBar QMenuBar
#else
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index a32983c..153c7c0 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -17,2 +17,4 @@
#include <qtimer.h>
+#include <qcursor.h>
+#include <qregexp.h>
#include <libkdepim/externalapphandler.h>
@@ -20,3 +22,7 @@
+#ifdef DESKTOP_VERSION
+#include <qapplication.h>
+#else
#include <qpe/qpeapplication.h>
+#endif
#include <libmailwrapper/smtpwrapper.h>
diff --git a/kmicromail/qpe/global.cpp b/kmicromail/qpe/global.cpp
new file mode 100644
index 0000000..f4c6f60
--- a/dev/null
+++ b/kmicromail/qpe/global.cpp
@@ -0,0 +1,12 @@
+
+#include "global.h"
+
+namespace Global{
+
+ void statusMessage(QString message)
+ {
+
+ qDebug("statusMessage %s ", message.latin1());
+ }
+}
+
diff --git a/kmicromail/qpe/global.h b/kmicromail/qpe/global.h
new file mode 100644
index 0000000..ecc5b1b
--- a/dev/null
+++ b/kmicromail/qpe/global.h
@@ -0,0 +1,12 @@
+#ifndef __GLOBAL_H__
+#define __GLOBAL_H__
+
+#include <qstring.h>
+
+namespace Global{
+
+ void statusMessage(QString message);
+
+}
+
+#endif
diff --git a/kmicromail/qpe/qpeapplication.h b/kmicromail/qpe/qpeapplication.h
new file mode 100644
index 0000000..0eadfd1
--- a/dev/null
+++ b/kmicromail/qpe/qpeapplication.h
@@ -0,0 +1,5 @@
+
+#include <qapplication.h>
+#include <qcursor.h>
+#include <qregexp.h>
+
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp
index 7cf5c8e..0b4c322 100644
--- a/kmicromail/viewmail.cpp
+++ b/kmicromail/viewmail.cpp
@@ -29,2 +29,3 @@
#include <klocale.h>
+#include <kglobal.h>