summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-10-22 02:36:36 (UTC)
committer zautrix <zautrix>2004-10-22 02:36:36 (UTC)
commitd93d3e94f78543c912528ca043a6d78bc82b12b2 (patch) (unidiff)
tree0af6581ee739a3da67c849892585fe5fff751f0d
parentc17118a0b2da49ec633e21cdcd51798c0c38644a (diff)
downloadkdepimpi-d93d3e94f78543c912528ca043a6d78bc82b12b2.zip
kdepimpi-d93d3e94f78543c912528ca043a6d78bc82b12b2.tar.gz
kdepimpi-d93d3e94f78543c912528ca043a6d78bc82b12b2.tar.bz2
bugfix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/vcard/VCardEntity.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/kabc/vcard/VCardEntity.cpp b/kabc/vcard/VCardEntity.cpp
index b676cc7..2a9e275 100644
--- a/kabc/vcard/VCardEntity.cpp
+++ b/kabc/vcard/VCardEntity.cpp
@@ -111,48 +111,49 @@ VCardEntity::_parse()
111 int len = strRep_.length(); 111 int len = strRep_.length();
112 int num = 0; 112 int num = 0;
113 while (i < len ) { 113 while (i < len ) {
114 while( i < len ) { 114 while( i < len ) {
115 int add = 1; 115 int add = 1;
116 if ( strRep_.at(i) == 'B' ) { 116 if ( strRep_.at(i) == 'B' ) {
117 if ( i+add < len && strRep_.at(i+add++) == 'E') 117 if ( i+add < len && strRep_.at(i+add++) == 'E')
118 if ( i+add < len && strRep_.at(i+add++) == 'G') 118 if ( i+add < len && strRep_.at(i+add++) == 'G')
119 if ( i+add < len && strRep_.at(i+add++) == 'I') 119 if ( i+add < len && strRep_.at(i+add++) == 'I')
120 if ( i+add < len && strRep_.at(i+add++) == 'N') 120 if ( i+add < len && strRep_.at(i+add++) == 'N')
121 if ( i+add < len && strRep_.at(i+add++) == ':') 121 if ( i+add < len && strRep_.at(i+add++) == ':')
122 if ( i+add < len && strRep_.at(i+add++) == 'V') 122 if ( i+add < len && strRep_.at(i+add++) == 'V')
123 if ( i+add < len && strRep_.at(i+add++) == 'C') 123 if ( i+add < len && strRep_.at(i+add++) == 'C')
124 if ( i+add < len && strRep_.at(i+add++) == 'A') 124 if ( i+add < len && strRep_.at(i+add++) == 'A')
125 if ( i+add < len && strRep_.at(i+add++) == 'R') 125 if ( i+add < len && strRep_.at(i+add++) == 'R')
126 if ( i+add < len && strRep_.at(i+add++) == 'D') 126 if ( i+add < len && strRep_.at(i+add++) == 'D')
127 if ( i+add < len && (strRep_.at(i+add) == '\r' || strRep_.at(i+add) == '\n' ))
127 break; 128 break;
128 } 129 }
129 ++i; 130 ++i;
130 } 131 }
131 if ( i <= len ) { 132 if ( i <= len ) {
132 ++num; 133 ++num;
133 char* dat = strRep_.data()+start; 134 char* dat = strRep_.data()+start;
134 VCard * v = new VCard( QCString ( dat,i-start ) ); 135 VCard * v = new VCard( QCString ( dat,i-start ) );
135 start = i; 136 start = i;
136 cardList_.append(v); 137 cardList_.append(v);
137 v->parse(); 138 v->parse();
138 } 139 }
139 i+= 11; 140 i+= 11;
140 } 141 }
141#endif 142#endif
142 //qDebug("***time %d found %d", tim.elapsed(), num); 143 qDebug("***time %d found %d", tim.elapsed(), num);
143} 144}
144 145
145 void 146 void
146VCardEntity::_assemble() 147VCardEntity::_assemble()
147{ 148{
148 VCardListIterator it(cardList_); 149 VCardListIterator it(cardList_);
149 150
150 for (; it.current(); ++it) 151 for (; it.current(); ++it)
151 strRep_ += it.current()->asString() + "\r\n"; // One CRLF for luck. 152 strRep_ += it.current()->asString() + "\r\n"; // One CRLF for luck.
152} 153}
153 154
154 VCardList & 155 VCardList &
155VCardEntity::cardList() 156VCardEntity::cardList()
156{ 157{
157 parse(); 158 parse();
158 return cardList_; 159 return cardList_;