Diffstat (limited to 'libopie2/opiepim/ocontactfields.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/ocontactfields.cpp | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/libopie2/opiepim/ocontactfields.cpp b/libopie2/opiepim/ocontactfields.cpp index deaa1e5..bec00f7 100644 --- a/libopie2/opiepim/ocontactfields.cpp +++ b/libopie2/opiepim/ocontactfields.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) The Main Author <main-author@whereever.org> | 3 | Copyright (C) Stefan Eilers <eilers.stefan@epost.de> |
4 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> | 4 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> |
5 | .=l. | 5 | .=l. |
@@ -28,15 +28,18 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <opie2/ocontactfields.h> | 30 | #include "ocontactfields.h" |
31 | 31 | ||
32 | #include <qstringlist.h> | 32 | /* OPIE */ |
33 | #include <opie2/ocontact.h> | ||
34 | #include <qpe/recordfields.h> // We should use our own enum in the future .. | ||
35 | #include <qpe/config.h> | ||
36 | |||
37 | /* QT */ | ||
33 | #include <qobject.h> | 38 | #include <qobject.h> |
39 | #include <qstringlist.h> | ||
34 | 40 | ||
35 | // We should use our own enum in the future .. | ||
36 | #include <qpe/recordfields.h> | ||
37 | #include <qpe/config.h> | ||
38 | #include <opie2/ocontact.h> | ||
39 | 41 | ||
40 | namespace Opie { | 42 | namespace Opie |
43 | { | ||
41 | /*! | 44 | /*! |
42 | \internal | 45 | \internal |
@@ -424,9 +427,11 @@ OContactFields::OContactFields(): | |||
424 | } | 427 | } |
425 | 428 | ||
426 | OContactFields::~OContactFields(){ | 429 | OContactFields::~OContactFields() |
430 | { | ||
427 | 431 | ||
428 | // We will store the fieldorder into the config file | 432 | // We will store the fieldorder into the config file |
429 | // to reuse it for the future.. | 433 | // to reuse it for the future.. |
430 | if ( changedFieldOrder ){ | 434 | if ( changedFieldOrder ) |
435 | { | ||
431 | Config cfg ( "AddressBook" ); | 436 | Config cfg ( "AddressBook" ); |
432 | cfg.setGroup( "ContactFieldOrder" ); | 437 | cfg.setGroup( "ContactFieldOrder" ); |
@@ -437,5 +442,6 @@ OContactFields::~OContactFields(){ | |||
437 | 442 | ||
438 | 443 | ||
439 | void OContactFields::saveToRecord( OContact &cnt ){ | 444 | void OContactFields::saveToRecord( OContact &cnt ) |
445 | { | ||
440 | 446 | ||
441 | qDebug("ocontactfields saveToRecord: >%s<",fieldOrder.latin1()); | 447 | qDebug("ocontactfields saveToRecord: >%s<",fieldOrder.latin1()); |
@@ -449,5 +455,6 @@ void OContactFields::saveToRecord( OContact &cnt ){ | |||
449 | } | 455 | } |
450 | 456 | ||
451 | void OContactFields::loadFromRecord( const OContact &cnt ){ | 457 | void OContactFields::loadFromRecord( const OContact &cnt ) |
458 | { | ||
452 | qDebug("ocontactfields loadFromRecord"); | 459 | qDebug("ocontactfields loadFromRecord"); |
453 | qDebug("loading >%s<",cnt.fullName().latin1()); | 460 | qDebug("loading >%s<",cnt.fullName().latin1()); |
@@ -460,5 +467,6 @@ void OContactFields::loadFromRecord( const OContact &cnt ){ | |||
460 | qDebug("fieldOrder from contact>%s<",fieldOrder.latin1()); | 467 | qDebug("fieldOrder from contact>%s<",fieldOrder.latin1()); |
461 | 468 | ||
462 | if (fieldOrder.isEmpty()){ | 469 | if ( fieldOrder.isEmpty() ) |
470 | { | ||
463 | fieldOrder = globalFieldOrder; | 471 | fieldOrder = globalFieldOrder; |
464 | } | 472 | } |
@@ -468,5 +476,6 @@ void OContactFields::loadFromRecord( const OContact &cnt ){ | |||
468 | } | 476 | } |
469 | 477 | ||
470 | void OContactFields::setFieldOrder( int num, int index ){ | 478 | void OContactFields::setFieldOrder( int num, int index ) |
479 | { | ||
471 | qDebug("qcontactfields setfieldorder pos %i -> %i",num,index); | 480 | qDebug("qcontactfields setfieldorder pos %i -> %i",num,index); |
472 | 481 | ||
@@ -481,5 +490,6 @@ void OContactFields::setFieldOrder( int num, int index ){ | |||
481 | } | 490 | } |
482 | 491 | ||
483 | int OContactFields::getFieldOrder( int num, int defIndex ){ | 492 | int OContactFields::getFieldOrder( int num, int defIndex ) |
493 | { | ||
484 | qDebug("ocontactfields getFieldOrder"); | 494 | qDebug("ocontactfields getFieldOrder"); |
485 | qDebug("fieldOrder >%s<",fieldOrder.latin1()); | 495 | qDebug("fieldOrder >%s<",fieldOrder.latin1()); |