summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/externalapphandler.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp
index 1093abf..35638b1 100644
--- a/libkdepim/externalapphandler.cpp
+++ b/libkdepim/externalapphandler.cpp
@@ -288,33 +288,33 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS
288 DefaultAppItem* dai = getDefaultItem(EMAIL, client); 288 DefaultAppItem* dai = getDefaultItem(EMAIL, client);
289 if (!dai) 289 if (!dai)
290 { 290 {
291 qDebug("could not find configured email application."); 291 qDebug("could not find configured email application.");
292 return false; 292 return false;
293 } 293 }
294 channel = dai->_channel; 294 channel = dai->_channel;
295 message2 = dai->_message2; 295 message2 = dai->_message2;
296 parameters2 = dai->_parameters2; 296 parameters2 = dai->_parameters2;
297 } 297 }
298 298
299 //first check if one of the mailers need the emails right in the message. 299 //first check if one of the mailers need the emails right in the message.
300 message2 = translateMessage(message2, emails, urls); 300 message2 = translateMessage(message2, emails, urls);
301 301
302 302
303 qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message2.latin1()); 303 qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message2.latin1());
304 qDebug("passing emailadresses:(%s), attachmenturls:(%s) as parameters in the form %s to QCopEnvelope", emails.latin1() , urls.latin1(), parameters2.latin1()); 304 qDebug("passing emailadresses(%s), attachmenturls(%s) as parameters in the form %s to QCopEnvelope", emails.latin1() , urls.latin1(), parameters2.latin1());
305 305
306 306
307 QCopEnvelope e(channel.latin1(), message2.latin1()); 307 QCopEnvelope e(channel.latin1(), message2.latin1());
308 //US we need no names in the To field. The emailadresses are enough 308 //US we need no names in the To field. The emailadresses are enough
309 309
310 passParameters(&e, parameters2, emails, urls); 310 passParameters(&e, parameters2, emails, urls);
311 311
312 312
313 313
314#else 314#else
315 KMessageBox::sorry( 0, i18n( "This version does not support the sending of emails." ) ); 315 KMessageBox::sorry( 0, i18n( "This version does not support the sending of emails." ) );
316#endif 316#endif
317 317
318 return true; 318 return true;
319} 319}
320 320
@@ -345,33 +345,33 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e
345 if (!dai) 345 if (!dai)
346 { 346 {
347 qDebug("could not find configured email application."); 347 qDebug("could not find configured email application.");
348 return false; 348 return false;
349 } 349 }
350 channel = dai->_channel; 350 channel = dai->_channel;
351 message = dai->_message; 351 message = dai->_message;
352 parameters = dai->_parameters; 352 parameters = dai->_parameters;
353 } 353 }
354 354
355 355
356 //first check if one of the mailers need the emails right in the message. 356 //first check if one of the mailers need the emails right in the message.
357 message = translateMessage(message, name, emailadress); 357 message = translateMessage(message, name, emailadress);
358 358
359 359
360 qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); 360 qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
361 qDebug("passing name:(%s), emailadresses:(%s) as parameters in the form %s to QCopEnvelope", name.latin1(), emailadress.latin1(), parameters.latin1()); 361 qDebug("passing name(%s), emailadresses(%s) as parameters in the form %s to QCopEnvelope", name.latin1(), emailadress.latin1(), parameters.latin1());
362 362
363 QCopEnvelope e(channel.latin1(), message.latin1()); 363 QCopEnvelope e(channel.latin1(), message.latin1());
364 //US we need no names in the To field. The emailadresses are enough 364 //US we need no names in the To field. The emailadresses are enough
365 365
366 passParameters(&e, parameters, name, emailadress); 366 passParameters(&e, parameters, name, emailadress);
367 367
368 368
369#else 369#else
370 KMessageBox::sorry( 0, i18n( "This version does not support the sending of emails." ) ); 370 KMessageBox::sorry( 0, i18n( "This version does not support the sending of emails." ) );
371#endif 371#endif
372 372
373 373
374 return true; 374 return true;
375} 375}
376 376
377/************************************************************************** 377/**************************************************************************
@@ -421,33 +421,33 @@ bool ExternalAppHandler::callByPhone( const QString& phonenumber )
421 if (!dai) 421 if (!dai)
422 { 422 {
423 qDebug("could not find configured phone application."); 423 qDebug("could not find configured phone application.");
424 return false; 424 return false;
425 } 425 }
426 channel = dai->_channel; 426 channel = dai->_channel;
427 message = dai->_message; 427 message = dai->_message;
428 parameters = dai->_parameters; 428 parameters = dai->_parameters;
429 } 429 }
430 430
431 431
432 //first check if one of the mailers need the emails right in the message. 432 //first check if one of the mailers need the emails right in the message.
433 message = translateMessage(message, phonenumber, ""); 433 message = translateMessage(message, phonenumber, "");
434 434
435 435
436 qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); 436 qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
437 qDebug("passing phonenumber:(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1()); 437 qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1());
438 438
439 QCopEnvelope e(channel.latin1(), message.latin1()); 439 QCopEnvelope e(channel.latin1(), message.latin1());
440 //US we need no names in the To field. The emailadresses are enough 440 //US we need no names in the To field. The emailadresses are enough
441 441
442 passParameters(&e, parameters, phonenumber, ""); 442 passParameters(&e, parameters, phonenumber, "");
443 443
444 444
445#else 445#else
446 KMessageBox::sorry( 0, i18n( "This version does not support phonecalls." ) ); 446 KMessageBox::sorry( 0, i18n( "This version does not support phonecalls." ) );
447#endif 447#endif
448 448
449 449
450 return true; 450 return true;
451} 451}
452 452
453/************************************************************************** 453/**************************************************************************
@@ -476,33 +476,33 @@ bool ExternalAppHandler::callBySMS( const QString& phonenumber )
476 if (!dai) 476 if (!dai)
477 { 477 {
478 qDebug("could not find configured sms application."); 478 qDebug("could not find configured sms application.");
479 return false; 479 return false;
480 } 480 }
481 channel = dai->_channel; 481 channel = dai->_channel;
482 message = dai->_message; 482 message = dai->_message;
483 parameters = dai->_parameters; 483 parameters = dai->_parameters;
484 } 484 }
485 485
486 486
487 //first check if one of the mailers need the emails right in the message. 487 //first check if one of the mailers need the emails right in the message.
488 message = translateMessage(message, phonenumber, ""); 488 message = translateMessage(message, phonenumber, "");
489 489
490 490
491 qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); 491 qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
492 qDebug("passing phonenumber:(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1()); 492 qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1());
493 493
494 QCopEnvelope e(channel.latin1(), message.latin1()); 494 QCopEnvelope e(channel.latin1(), message.latin1());
495 //US we need no names in the To field. The emailadresses are enough 495 //US we need no names in the To field. The emailadresses are enough
496 496
497 passParameters(&e, parameters, phonenumber, ""); 497 passParameters(&e, parameters, phonenumber, "");
498 498
499 499
500#else 500#else
501 KMessageBox::sorry( 0, i18n( "This version does not support the sending of sms." ) ); 501 KMessageBox::sorry( 0, i18n( "This version does not support the sending of sms." ) );
502#endif 502#endif
503 503
504 504
505 return true; 505 return true;
506} 506}
507 507
508/************************************************************************** 508/**************************************************************************
@@ -531,33 +531,33 @@ bool ExternalAppHandler::callByPager( const QString& pagernumber )
531 if (!dai) 531 if (!dai)
532 { 532 {
533 qDebug("could not find configured pager application."); 533 qDebug("could not find configured pager application.");
534 return false; 534 return false;
535 } 535 }
536 channel = dai->_channel; 536 channel = dai->_channel;
537 message = dai->_message; 537 message = dai->_message;
538 parameters = dai->_parameters; 538 parameters = dai->_parameters;
539 } 539 }
540 540
541 541
542 //first check if one of the mailers need the emails right in the message. 542 //first check if one of the mailers need the emails right in the message.
543 message = translateMessage(message, pagernumber, ""); 543 message = translateMessage(message, pagernumber, "");
544 544
545 545
546 qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); 546 qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
547 qDebug("passing pagernumber:(%s) as parameter in the form %s to QCopEnvelope", pagernumber.latin1(), parameters.latin1()); 547 qDebug("passing pagernumber(%s) as parameter in the form %s to QCopEnvelope", pagernumber.latin1(), parameters.latin1());
548 548
549 QCopEnvelope e(channel.latin1(), message.latin1()); 549 QCopEnvelope e(channel.latin1(), message.latin1());
550 //US we need no names in the To field. The emailadresses are enough 550 //US we need no names in the To field. The emailadresses are enough
551 551
552 passParameters(&e, parameters, pagernumber, ""); 552 passParameters(&e, parameters, pagernumber, "");
553 553
554 554
555#else 555#else
556 KMessageBox::sorry( 0, i18n( "This version does not support paging." ) ); 556 KMessageBox::sorry( 0, i18n( "This version does not support paging." ) );
557#endif 557#endif
558 558
559 559
560 return true; 560 return true;
561} 561}
562 562
563/************************************************************************** 563/**************************************************************************
@@ -586,33 +586,33 @@ bool ExternalAppHandler::callByFax( const QString& faxnumber )
586 if (!dai) 586 if (!dai)
587 { 587 {
588 qDebug("could not find configured fax application."); 588 qDebug("could not find configured fax application.");
589 return false; 589 return false;
590 } 590 }
591 channel = dai->_channel; 591 channel = dai->_channel;
592 message = dai->_message; 592 message = dai->_message;
593 parameters = dai->_parameters; 593 parameters = dai->_parameters;
594 } 594 }
595 595
596 596
597 //first check if one of the mailers need the emails right in the message. 597 //first check if one of the mailers need the emails right in the message.
598 message = translateMessage(message, faxnumber, ""); 598 message = translateMessage(message, faxnumber, "");
599 599
600 600
601 qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); 601 qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
602 qDebug("passing faxnumber:(%s) as parameter in the form %s to QCopEnvelope", faxnumber.latin1(), parameters.latin1()); 602 qDebug("passing faxnumber(%s) as parameter in the form %s to QCopEnvelope", faxnumber.latin1(), parameters.latin1());
603 603
604 QCopEnvelope e(channel.latin1(), message.latin1()); 604 QCopEnvelope e(channel.latin1(), message.latin1());
605 //US we need no names in the To field. The emailadresses are enough 605 //US we need no names in the To field. The emailadresses are enough
606 606
607 passParameters(&e, parameters, faxnumber, ""); 607 passParameters(&e, parameters, faxnumber, "");
608 608
609 609
610#else 610#else
611 KMessageBox::sorry( 0, i18n( "This version does not support the sending of faxes." ) ); 611 KMessageBox::sorry( 0, i18n( "This version does not support the sending of faxes." ) );
612#endif 612#endif
613 613
614 614
615 return true; 615 return true;
616} 616}
617 617
618/************************************************************************** 618/**************************************************************************
@@ -652,29 +652,30 @@ void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& paramete
652 QString key = (*it2); 652 QString key = (*it2);
653 key = key.replace( QRegExp("%1"), param1 ); 653 key = key.replace( QRegExp("%1"), param1 );
654 key = key.replace( QRegExp("%2"), param2 ); 654 key = key.replace( QRegExp("%2"), param2 );
655 ++it2; 655 ++it2;
656 656
657 if(it2 != keyvallist.end()) 657 if(it2 != keyvallist.end())
658 { 658 {
659 QString value = (*it2); 659 QString value = (*it2);
660 value = value.replace( QRegExp("%1"), param1 ); 660 value = value.replace( QRegExp("%1"), param1 );
661 value = value.replace( QRegExp("%2"), param2 ); 661 value = value.replace( QRegExp("%2"), param2 );
662 662
663 valmap.insert(key, value); 663 valmap.insert(key, value);
664 useValMap = true; 664 useValMap = true;
665 } 665 }
666 else 666 else
667 { 667 {
668 (*e) << key.latin1(); 668 // qDebug("pass parameter << %s", key.latin1());
669 (*e) << key;
669 } 670 }
670 } 671 }
671 672
672 if (useValMap == true) 673 if (useValMap == true)
673 (*e) << valmap; 674 (*e) << valmap;
674 675
675#endif 676#endif
676 677
677} 678}
678 679
679 680
680 681