summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-10-22 02:36:36 (UTC)
committer zautrix <zautrix>2004-10-22 02:36:36 (UTC)
commitd93d3e94f78543c912528ca043a6d78bc82b12b2 (patch) (side-by-side diff)
tree0af6581ee739a3da67c849892585fe5fff751f0d
parentc17118a0b2da49ec633e21cdcd51798c0c38644a (diff)
downloadkdepimpi-d93d3e94f78543c912528ca043a6d78bc82b12b2.zip
kdepimpi-d93d3e94f78543c912528ca043a6d78bc82b12b2.tar.gz
kdepimpi-d93d3e94f78543c912528ca043a6d78bc82b12b2.tar.bz2
bugfix
Diffstat (more/less context) (show 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()
int len = strRep_.length();
int num = 0;
while (i < len ) {
while( i < len ) {
int add = 1;
if ( strRep_.at(i) == 'B' ) {
if ( i+add < len && strRep_.at(i+add++) == 'E')
if ( i+add < len && strRep_.at(i+add++) == 'G')
if ( i+add < len && strRep_.at(i+add++) == 'I')
if ( i+add < len && strRep_.at(i+add++) == 'N')
if ( i+add < len && strRep_.at(i+add++) == ':')
if ( i+add < len && strRep_.at(i+add++) == 'V')
if ( i+add < len && strRep_.at(i+add++) == 'C')
if ( i+add < len && strRep_.at(i+add++) == 'A')
if ( i+add < len && strRep_.at(i+add++) == 'R')
if ( i+add < len && strRep_.at(i+add++) == 'D')
+ if ( i+add < len && (strRep_.at(i+add) == '\r' || strRep_.at(i+add) == '\n' ))
break;
}
++i;
}
if ( i <= len ) {
++num;
char* dat = strRep_.data()+start;
VCard * v = new VCard( QCString ( dat,i-start ) );
start = i;
cardList_.append(v);
v->parse();
}
i+= 11;
}
#endif
- //qDebug("***time %d found %d", tim.elapsed(), num);
+ qDebug("***time %d found %d", tim.elapsed(), num);
}
void
VCardEntity::_assemble()
{
VCardListIterator it(cardList_);
for (; it.current(); ++it)
strRep_ += it.current()->asString() + "\r\n"; // One CRLF for luck.
}
VCardList &
VCardEntity::cardList()
{
parse();
return cardList_;