summaryrefslogtreecommitdiffabout
authorulf69 <ulf69>2004-08-13 16:52:31 (UTC)
committer ulf69 <ulf69>2004-08-13 16:52:31 (UTC)
commit0e46d151bca931ff5c69a637d91cfcc381094e0b (patch) (unidiff)
tree8a821a892aaa3035a17b843ab5dbead0353398e5
parent2de1d7732f0f44895b353bb61520f725ede484ea (diff)
downloadkdepimpi-0e46d151bca931ff5c69a637d91cfcc381094e0b.zip
kdepimpi-0e46d151bca931ff5c69a637d91cfcc381094e0b.tar.gz
kdepimpi-0e46d151bca931ff5c69a637d91cfcc381094e0b.tar.bz2
fixed a bug. I passed the QString parameters as latin1 representation, which was not correct.
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
@@ -292,25 +292,25 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS
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
@@ -349,25 +349,25 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e
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
@@ -425,25 +425,25 @@ bool ExternalAppHandler::callByPhone( const QString& phonenumber )
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
@@ -480,25 +480,25 @@ bool ExternalAppHandler::callBySMS( const QString& phonenumber )
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
@@ -535,25 +535,25 @@ bool ExternalAppHandler::callByPager( const QString& pagernumber )
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
@@ -590,25 +590,25 @@ bool ExternalAppHandler::callByFax( const QString& faxnumber )
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
@@ -656,25 +656,26 @@ void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& paramete
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