summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/opimcontactfields.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/core/opimcontactfields.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/opimcontactfields.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/libopie2/opiepim/core/opimcontactfields.cpp b/libopie2/opiepim/core/opimcontactfields.cpp
index 120beb6..5d45d1f 100644
--- a/libopie2/opiepim/core/opimcontactfields.cpp
+++ b/libopie2/opiepim/core/opimcontactfields.cpp
@@ -28,12 +28,14 @@
28*/ 28*/
29 29
30#include "opimcontactfields.h" 30#include "opimcontactfields.h"
31 31
32/* OPIE */ 32/* OPIE */
33#include <opie2/opimcontact.h> 33#include <opie2/opimcontact.h>
34#include <opie2/odebug.h>
35
34#include <qpe/config.h> 36#include <qpe/config.h>
35 37
36/* QT */ 38/* QT */
37#include <qobject.h> 39#include <qobject.h>
38 40
39 41
@@ -439,61 +441,61 @@ OPimContactFields::~OPimContactFields()
439 441
440 442
441 443
442void OPimContactFields::saveToRecord( OPimContact &cnt ) 444void OPimContactFields::saveToRecord( OPimContact &cnt )
443{ 445{
444 446
445 qDebug( "ocontactfields saveToRecord: >%s<", fieldOrder.latin1() ); 447 odebug << "ocontactfields saveToRecord: >" << fieldOrder << "<" << oendl;
446 448
447 // Store fieldorder into this contact. 449 // Store fieldorder into this contact.
448 cnt.setCustomField( CONTACT_FIELD_ORDER_NAME, fieldOrder ); 450 cnt.setCustomField( CONTACT_FIELD_ORDER_NAME, fieldOrder );
449 451
450 globalFieldOrder = fieldOrder; 452 globalFieldOrder = fieldOrder;
451 changedFieldOrder = true; 453 changedFieldOrder = true;
452 454
453} 455}
454 456
455void OPimContactFields::loadFromRecord( const OPimContact &cnt ) 457void OPimContactFields::loadFromRecord( const OPimContact &cnt )
456{ 458{
457 qDebug( "ocontactfields loadFromRecord" ); 459 odebug << "ocontactfields loadFromRecord" << oendl;
458 qDebug( "loading >%s<", cnt.fullName().latin1() ); 460 odebug << "loading >" << cnt.fullName() << "<" << oendl;
459 461
460 // Get fieldorder for this contact. If none is defined, 462 // Get fieldorder for this contact. If none is defined,
461 // we will use the global one from the config file.. 463 // we will use the global one from the config file..
462 464
463 fieldOrder = cnt.customField( CONTACT_FIELD_ORDER_NAME ); 465 fieldOrder = cnt.customField( CONTACT_FIELD_ORDER_NAME );
464 466
465 qDebug( "fieldOrder from contact>%s<", fieldOrder.latin1() ); 467 odebug << "fieldOrder from contact>" << fieldOrder << "<" << oendl;
466 468
467 if ( fieldOrder.isEmpty() ) 469 if ( fieldOrder.isEmpty() )
468 { 470 {
469 fieldOrder = globalFieldOrder; 471 fieldOrder = globalFieldOrder;
470 } 472 }
471 473
472 474
473 qDebug( "effective fieldOrder in loadFromRecord >%s<", fieldOrder.latin1() ); 475 odebug << "effective fieldOrder in loadFromRecord >" << fieldOrder << "<" << oendl;
474} 476}
475 477
476void OPimContactFields::setFieldOrder( int num, int index ) 478void OPimContactFields::setFieldOrder( int num, int index )
477{ 479{
478 qDebug( "qcontactfields setfieldorder pos %i -> %i", num, index ); 480 odebug << "qcontactfields setfieldorder pos " << num << " -> " << index << "" << oendl;
479 481
480 fieldOrder[ num ] = QString::number( index, 16 ) [ 0 ]; 482 fieldOrder[ num ] = QString::number( index, 16 ) [ 0 ];
481 483
482 // We will store this new fieldorder globally to 484 // We will store this new fieldorder globally to
483 // remember it for contacts which have none 485 // remember it for contacts which have none
484 globalFieldOrder = fieldOrder; 486 globalFieldOrder = fieldOrder;
485 changedFieldOrder = true; 487 changedFieldOrder = true;
486 488
487 qDebug( "fieldOrder >%s<", fieldOrder.latin1() ); 489 odebug << "fieldOrder >" << fieldOrder << "<" << oendl;
488} 490}
489 491
490int OPimContactFields::getFieldOrder( int num, int defIndex ) 492int OPimContactFields::getFieldOrder( int num, int defIndex )
491{ 493{
492 qDebug( "ocontactfields getFieldOrder" ); 494 odebug << "ocontactfields getFieldOrder" << oendl;
493 qDebug( "fieldOrder >%s<", fieldOrder.latin1() ); 495 odebug << "fieldOrder >" << fieldOrder << "<" << oendl;
494 496
495 // Get index of combo as char.. 497 // Get index of combo as char..
496 QChar poschar = fieldOrder[ num ]; 498 QChar poschar = fieldOrder[ num ];
497 499
498 bool ok; 500 bool ok;
499 int ret = 0; 501 int ret = 0;
@@ -504,13 +506,13 @@ int OPimContactFields::getFieldOrder( int num, int defIndex )
504 ok = false; 506 ok = false;
505 507
506 // Return default value if index for 508 // Return default value if index for
507 // num was not set or if anything else happened.. 509 // num was not set or if anything else happened..
508 if ( !ok ) ret = defIndex; 510 if ( !ok ) ret = defIndex;
509 511
510 qDebug( "returning >%i<", ret ); 512 odebug << "returning >" << ret << "<" << oendl;
511 513
512 return ret; 514 return ret;
513 515
514} 516}
515 517
516} 518}