summaryrefslogtreecommitdiffabout
path: root/kabc
authorzautrix <zautrix>2004-10-09 10:29:56 (UTC)
committer zautrix <zautrix>2004-10-09 10:29:56 (UTC)
commited1eac5e36e675b030cb5a5aa90fb2d44eb40c73 (patch) (unidiff)
tree2d4dd35819f17c4b5758b64defd40e7a4bf3cbde /kabc
parent69af2ac56474e3a1e3e59be318caf53f5d357f94 (diff)
downloadkdepimpi-ed1eac5e36e675b030cb5a5aa90fb2d44eb40c73.zip
kdepimpi-ed1eac5e36e675b030cb5a5aa90fb2d44eb40c73.tar.gz
kdepimpi-ed1eac5e36e675b030cb5a5aa90fb2d44eb40c73.tar.bz2
phone fixes
Diffstat (limited to 'kabc') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 1a06956..1050f55 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -1,138 +1,139 @@
1/* 1/*
2 This file is part of libkabc. 2 This file is part of libkabc.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28/*US 28/*US
29 29
30#include <qfile.h> 30#include <qfile.h>
31#include <qregexp.h> 31#include <qregexp.h>
32#include <qtimer.h> 32#include <qtimer.h>
33 33
34#include <kapplication.h> 34#include <kapplication.h>
35#include <kinstance.h> 35#include <kinstance.h>
36#include <kstandarddirs.h> 36#include <kstandarddirs.h>
37 37
38#include "errorhandler.h" 38#include "errorhandler.h"
39*/ 39*/
40#include <qptrlist.h> 40#include <qptrlist.h>
41#include <qtextstream.h> 41#include <qtextstream.h>
42#include <qfile.h> 42#include <qfile.h>
43#include <qregexp.h>
43 44
44#include <kglobal.h> 45#include <kglobal.h>
45#include <klocale.h> 46#include <klocale.h>
46#include <kmessagebox.h> 47#include <kmessagebox.h>
47#include <kdebug.h> 48#include <kdebug.h>
48#include <libkcal/syncdefines.h> 49#include <libkcal/syncdefines.h>
49#include "addressbook.h" 50#include "addressbook.h"
50#include "resource.h" 51#include "resource.h"
51#include "vcardconverter.h" 52#include "vcardconverter.h"
52#include "vcardparser/vcardtool.h" 53#include "vcardparser/vcardtool.h"
53 54
54//US #include "addressbook.moc" 55//US #include "addressbook.moc"
55 56
56using namespace KABC; 57using namespace KABC;
57 58
58struct AddressBook::AddressBookData 59struct AddressBook::AddressBookData
59{ 60{
60 Addressee::List mAddressees; 61 Addressee::List mAddressees;
61 Addressee::List mRemovedAddressees; 62 Addressee::List mRemovedAddressees;
62 Field::List mAllFields; 63 Field::List mAllFields;
63 KConfig *mConfig; 64 KConfig *mConfig;
64 KRES::Manager<Resource> *mManager; 65 KRES::Manager<Resource> *mManager;
65//US ErrorHandler *mErrorHandler; 66//US ErrorHandler *mErrorHandler;
66}; 67};
67 68
68struct AddressBook::Iterator::IteratorData 69struct AddressBook::Iterator::IteratorData
69{ 70{
70 Addressee::List::Iterator mIt; 71 Addressee::List::Iterator mIt;
71}; 72};
72 73
73struct AddressBook::ConstIterator::ConstIteratorData 74struct AddressBook::ConstIterator::ConstIteratorData
74{ 75{
75 Addressee::List::ConstIterator mIt; 76 Addressee::List::ConstIterator mIt;
76}; 77};
77 78
78AddressBook::Iterator::Iterator() 79AddressBook::Iterator::Iterator()
79{ 80{
80 d = new IteratorData; 81 d = new IteratorData;
81} 82}
82 83
83AddressBook::Iterator::Iterator( const AddressBook::Iterator &i ) 84AddressBook::Iterator::Iterator( const AddressBook::Iterator &i )
84{ 85{
85 d = new IteratorData; 86 d = new IteratorData;
86 d->mIt = i.d->mIt; 87 d->mIt = i.d->mIt;
87} 88}
88 89
89AddressBook::Iterator &AddressBook::Iterator::operator=( const AddressBook::Iterator &i ) 90AddressBook::Iterator &AddressBook::Iterator::operator=( const AddressBook::Iterator &i )
90{ 91{
91 if( this == &i ) return *this; // guard against self assignment 92 if( this == &i ) return *this; // guard against self assignment
92 delete d; // delete the old data the Iterator was completely constructed before 93 delete d; // delete the old data the Iterator was completely constructed before
93 d = new IteratorData; 94 d = new IteratorData;
94 d->mIt = i.d->mIt; 95 d->mIt = i.d->mIt;
95 return *this; 96 return *this;
96} 97}
97 98
98AddressBook::Iterator::~Iterator() 99AddressBook::Iterator::~Iterator()
99{ 100{
100 delete d; 101 delete d;
101} 102}
102 103
103const Addressee &AddressBook::Iterator::operator*() const 104const Addressee &AddressBook::Iterator::operator*() const
104{ 105{
105 return *(d->mIt); 106 return *(d->mIt);
106} 107}
107 108
108Addressee &AddressBook::Iterator::operator*() 109Addressee &AddressBook::Iterator::operator*()
109{ 110{
110 return *(d->mIt); 111 return *(d->mIt);
111} 112}
112 113
113Addressee *AddressBook::Iterator::operator->() 114Addressee *AddressBook::Iterator::operator->()
114{ 115{
115 return &(*(d->mIt)); 116 return &(*(d->mIt));
116} 117}
117 118
118AddressBook::Iterator &AddressBook::Iterator::operator++() 119AddressBook::Iterator &AddressBook::Iterator::operator++()
119{ 120{
120 (d->mIt)++; 121 (d->mIt)++;
121 return *this; 122 return *this;
122} 123}
123 124
124AddressBook::Iterator &AddressBook::Iterator::operator++(int) 125AddressBook::Iterator &AddressBook::Iterator::operator++(int)
125{ 126{
126 (d->mIt)++; 127 (d->mIt)++;
127 return *this; 128 return *this;
128} 129}
129 130
130AddressBook::Iterator &AddressBook::Iterator::operator--() 131AddressBook::Iterator &AddressBook::Iterator::operator--()
131{ 132{
132 (d->mIt)--; 133 (d->mIt)--;
133 return *this; 134 return *this;
134} 135}
135 136
136AddressBook::Iterator &AddressBook::Iterator::operator--(int) 137AddressBook::Iterator &AddressBook::Iterator::operator--(int)
137{ 138{
138 (d->mIt)--; 139 (d->mIt)--;