author | zautrix <zautrix> | 2004-08-10 19:35:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-10 19:35:18 (UTC) |
commit | 9f73ddc03d2b02934906193cf8db5ff0813fce0b (patch) (side-by-side diff) | |
tree | 6b6ea1a76481c677381419064c9a2d23e850db51 | |
parent | dc9010997d770229dbee6b023f41ea74e0809027 (diff) | |
download | kdepimpi-9f73ddc03d2b02934906193cf8db5ff0813fce0b.zip kdepimpi-9f73ddc03d2b02934906193cf8db5ff0813fce0b.tar.gz kdepimpi-9f73ddc03d2b02934906193cf8db5ff0813fce0b.tar.bz2 |
Made externalapphandler compile on desktop
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | libkdepim/externalapphandler.cpp | 36 |
2 files changed, 22 insertions, 16 deletions
@@ -1,7 +1,7 @@ ############################################################################# # Makefile for building: kopi-desktop -# Generated by qmake (1.07a) (Qt 3.3.3) on: Mon Aug 9 13:18:13 2004 +# Generated by qmake (1.07a) (Qt 3.3.3) on: Tue Aug 10 18:20:15 2004 # Project: kopi-desktop.pro # Template: subdirs # Command: $(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro ############################################################################# diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp index 6f812d0..0128cf7 100644 --- a/libkdepim/externalapphandler.cpp +++ b/libkdepim/externalapphandler.cpp @@ -30,14 +30,16 @@ $Id$ #include <stdlib.h> #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" @@ -167,9 +169,10 @@ 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; @@ -197,16 +200,18 @@ 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; } @@ -215,9 +220,9 @@ 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; @@ -256,9 +261,9 @@ bool ExternalAppHandler::mailToContacts( const QString& emails ) passParameter(&e, parameters, 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 return true; @@ -267,9 +272,9 @@ 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; @@ -308,9 +313,9 @@ bool ExternalAppHandler::callByPhone( const QString& phonenumber ) passParameter(&e, parameters, phonenumber); #else - KMessageBox::sorry( this, i18n( "This version does not support phonecalls." ) ); + KMessageBox::sorry( 0, i18n( "This version does not support phonecalls." ) ); #endif return true; @@ -318,9 +323,9 @@ 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; @@ -359,9 +364,9 @@ bool ExternalAppHandler::callBySMS( const QString& phonenumber ) passParameter(&e, parameters, 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 return true; @@ -369,9 +374,9 @@ 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; @@ -410,9 +415,9 @@ bool ExternalAppHandler::callByPager( const QString& pagernumber ) passParameter(&e, parameters, pagernumber); #else - KMessageBox::sorry( this, i18n( "This version does not support paging." ) ); + KMessageBox::sorry( 0, i18n( "This version does not support paging." ) ); #endif return true; @@ -420,9 +425,9 @@ 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; @@ -461,9 +466,9 @@ bool ExternalAppHandler::callByFax( const QString& faxnumber ) passParameter(&e, parameters, 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 return true; @@ -480,8 +485,9 @@ 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; // first extract all parts of the parameters. @@ -517,9 +523,9 @@ void ExternalAppHandler::passParameter(QCopEnvelope* e, const QString& parameter if (useValMap == true) (*e) << valmap; - +#endif } |