Diffstat (limited to 'libkdepim/externalapphandler.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libkdepim/externalapphandler.cpp | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp index 6f812d0..0128cf7 100644 --- a/libkdepim/externalapphandler.cpp +++ b/libkdepim/externalapphandler.cpp @@ -31,12 +31,14 @@ $Id$ #include <qfile.h> #include <qmap.h> +#include <qregexp.h> - +#ifndef DESKTOP_VERSION #include <qtopia/qcopenvelope_qws.h> - +#endif #include <kstaticdeleter.h> +#include <kmessagebox.h> #include "externalapphandler.h" @@ -168,7 +170,8 @@ DefaultAppItem* ExternalAppHandler::getDefaultItem(Types type, int clientid) //calls the emailapplication with a number of attachments that need to be send (Seperated by Comma) bool ExternalAppHandler::mailAttachments( const QString& urls ) { -#ifndef QT_NO_COP + +#ifndef DESKTOP_VERSION QString channel; QString message2; QString parameters2; @@ -198,14 +201,16 @@ bool ExternalAppHandler::mailAttachments( const QString& urls ) qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message2.latin1()); qDebug("passing attachmenturls:(%s) as parameter in the form %s to QCopEnvelope", urls.latin1(), parameters2.latin1()); + QCopEnvelope e(channel.latin1(), message2.latin1()); //US we need no names in the To field. The emailadresses are enough passParameter(&e, parameters2, urls); + #else - KMessageBox::sorry( this, i18n( "This version does not support the sending of emails." ) ); + KMessageBox::sorry( 0, i18n( "This version does not support the sending of emails." ) ); #endif return true; @@ -216,7 +221,7 @@ bool ExternalAppHandler::mailAttachments( const QString& urls ) //calls the emailapplication and creates a mail with parameter emails as recipients bool ExternalAppHandler::mailToContacts( const QString& emails ) { -#ifndef QT_NO_COP +#ifndef DESKTOP_VERSION QString channel; QString message; QString parameters; @@ -257,7 +262,7 @@ bool ExternalAppHandler::mailToContacts( const QString& emails ) #else - KMessageBox::sorry( this, i18n( "This version does not support the sending of emails." ) ); + KMessageBox::sorry( 0, i18n( "This version does not support the sending of emails." ) ); #endif @@ -268,7 +273,7 @@ bool ExternalAppHandler::mailToContacts( const QString& emails ) //calls the phoneapplication with the number bool ExternalAppHandler::callByPhone( const QString& phonenumber ) { -#ifndef QT_NO_COP +#ifndef DESKTOP_VERSION QString channel; QString message; QString parameters; @@ -309,7 +314,7 @@ bool ExternalAppHandler::callByPhone( const QString& phonenumber ) #else - KMessageBox::sorry( this, i18n( "This version does not support phonecalls." ) ); + KMessageBox::sorry( 0, i18n( "This version does not support phonecalls." ) ); #endif @@ -319,7 +324,7 @@ bool ExternalAppHandler::callByPhone( const QString& phonenumber ) //calls the smsapplication with the number bool ExternalAppHandler::callBySMS( const QString& phonenumber ) { -#ifndef QT_NO_COP +#ifndef DESKTOP_VERSION QString channel; QString message; QString parameters; @@ -360,7 +365,7 @@ bool ExternalAppHandler::callBySMS( const QString& phonenumber ) #else - KMessageBox::sorry( this, i18n( "This version does not support the sending of sms." ) ); + KMessageBox::sorry( 0, i18n( "This version does not support the sending of sms." ) ); #endif @@ -370,7 +375,7 @@ bool ExternalAppHandler::callBySMS( const QString& phonenumber ) //calls the pagerapplication with the number bool ExternalAppHandler::callByPager( const QString& pagernumber ) { -#ifndef QT_NO_COP +#ifndef DESKTOP_VERSION QString channel; QString message; QString parameters; @@ -411,7 +416,7 @@ bool ExternalAppHandler::callByPager( const QString& pagernumber ) #else - KMessageBox::sorry( this, i18n( "This version does not support paging." ) ); + KMessageBox::sorry( 0, i18n( "This version does not support paging." ) ); #endif @@ -421,7 +426,7 @@ bool ExternalAppHandler::callByPager( const QString& pagernumber ) //calls the faxapplication with the number bool ExternalAppHandler::callByFax( const QString& faxnumber ) { -#ifndef QT_NO_COP +#ifndef DESKTOP_VERSION QString channel; QString message; QString parameters; @@ -462,7 +467,7 @@ bool ExternalAppHandler::callByFax( const QString& faxnumber ) #else - KMessageBox::sorry( this, i18n( "This version does not support the sending of faxes." ) ); + KMessageBox::sorry( 0, i18n( "This version does not support the sending of faxes." ) ); #endif @@ -481,6 +486,7 @@ QString& ExternalAppHandler::translateMessage(QString& message, const QString& p void ExternalAppHandler::passParameter(QCopEnvelope* e, const QString& parameters, const QString& param1) const { +#ifndef DESKTOP_VERSION QMap<QString, QString> valmap; bool useValMap = false; @@ -518,7 +524,7 @@ void ExternalAppHandler::passParameter(QCopEnvelope* e, const QString& parameter if (useValMap == true) (*e) << valmap; - +#endif } |