summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/ocontact.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/ocontact.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/ocontact.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/libopie2/opiepim/ocontact.cpp b/libopie2/opiepim/ocontact.cpp
index 6aec62e..38cba72 100644
--- a/libopie2/opiepim/ocontact.cpp
+++ b/libopie2/opiepim/ocontact.cpp
@@ -13,24 +13,25 @@
13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14** 14**
15** See http://www.trolltech.com/gpl/ for GPL licensing information. 15** See http://www.trolltech.com/gpl/ for GPL licensing information.
16** 16**
17** Contact info@trolltech.com if any conditions of this licensing are 17** Contact info@trolltech.com if any conditions of this licensing are
18** not clear to you. 18** not clear to you.
19** 19**
20**********************************************************************/ 20**********************************************************************/
21 21
22#define QTOPIA_INTERNAL_CONTACT_MRE 22#define QTOPIA_INTERNAL_CONTACT_MRE
23 23
24#include "ocontact.h" 24#include "ocontact.h"
25#include "opimresolver.h"
25 26
26#include <qpe/stringutil.h> 27#include <qpe/stringutil.h>
27#include <qpe/timeconversion.h> 28#include <qpe/timeconversion.h>
28#include <qpe/timestring.h> 29#include <qpe/timestring.h>
29 30
30#include <qobject.h> 31#include <qobject.h>
31#include <qregexp.h> 32#include <qregexp.h>
32#include <qstylesheet.h> 33#include <qstylesheet.h>
33#include <qfileinfo.h> 34#include <qfileinfo.h>
34#include <qmap.h> 35#include <qmap.h>
35 36
36#include <stdio.h> 37#include <stdio.h>
@@ -820,25 +821,25 @@ void OContact::save( QString &buf ) const
820 buf += customToXml(); 821 buf += customToXml();
821 if ( categories().count() > 0 ) 822 if ( categories().count() > 0 )
822 buf += "Categories=\"" + idsToString( categories() ) + "\" "; 823 buf += "Categories=\"" + idsToString( categories() ) + "\" ";
823 buf += "Uid=\"" + QString::number( uid() ) + "\" "; 824 buf += "Uid=\"" + QString::number( uid() ) + "\" ";
824 // You need to close this yourself 825 // You need to close this yourself
825} 826}
826 827
827 828
828/*! 829/*!
829 \internal 830 \internal
830 Returns the list of fields belonging to a contact 831 Returns the list of fields belonging to a contact
831 Never change order of this list ! It has to be regarding 832 Never change order of this list ! It has to be regarding
832 enum AddressBookFields !! 833 enum AddressBookFields !!
833*/ 834*/
834QStringList OContact::fields() 835QStringList OContact::fields()
835{ 836{
836 QStringList list; 837 QStringList list;
837 838
838 list.append( "Title" ); // Not Used! 839 list.append( "Title" ); // Not Used!
839 list.append( "FirstName" ); 840 list.append( "FirstName" );
840 list.append( "MiddleName" ); 841 list.append( "MiddleName" );
841 list.append( "LastName" ); 842 list.append( "LastName" );
842 list.append( "Suffix" ); 843 list.append( "Suffix" );
843 list.append( "FileAs" ); 844 list.append( "FileAs" );
844 845
@@ -1091,19 +1092,19 @@ void OContact::setDefaultEmail( const QString &v )
1091 1092
1092 if ( !e.isEmpty() ) 1093 if ( !e.isEmpty() )
1093 insertEmail( e ); 1094 insertEmail( e );
1094 1095
1095} 1096}
1096 1097
1097void OContact::insertEmails( const QStringList &v ) 1098void OContact::insertEmails( const QStringList &v )
1098{ 1099{
1099 for ( QStringList::ConstIterator it = v.begin(); it != v.end(); ++it ) 1100 for ( QStringList::ConstIterator it = v.begin(); it != v.end(); ++it )
1100 insertEmail( *it ); 1101 insertEmail( *it );
1101} 1102}
1102int OContact::rtti() { 1103int OContact::rtti() {
1103 return 2; 1104 return OPimResolver::AddressBook;
1104} 1105}
1105void OContact::setUid( int i ) 1106void OContact::setUid( int i )
1106{ 1107{
1107 OPimRecord::setUid(i); 1108 OPimRecord::setUid(i);
1108 replace( Qtopia::AddressUid , QString::number(i)); 1109 replace( Qtopia::AddressUid , QString::number(i));
1109} 1110}