-rw-r--r-- | kabc/vcard/ContentLine.cpp | 10 | ||||
-rw-r--r-- | kabc/vcard/VCardv.cpp | 12 | ||||
-rw-r--r-- | kabc/vcard/include/VCardDefines.h | 3 | ||||
-rw-r--r-- | kabc/vcardformatimpl.cpp | 2 |
4 files changed, 20 insertions, 7 deletions
diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp index 0fb5b5d..f7e04a9 100644 --- a/kabc/vcard/ContentLine.cpp +++ b/kabc/vcard/ContentLine.cpp | |||
@@ -63,13 +63,16 @@ | |||
63 | #include <VCardDefines.h> | 63 | #include <VCardDefines.h> |
64 | 64 | ||
65 | using namespace VCARD; | 65 | using namespace VCARD; |
66 | 66 | ||
67 | ContentLine::ContentLine() | 67 | ContentLine::ContentLine() |
68 | :Entity(), | 68 | :Entity(), |
69 | value_(0) | 69 | value_(0), |
70 | paramType_( ParamUnknown ), | ||
71 | valueType_( ValueUnknown ), | ||
72 | entityType_( EntityUnknown ) | ||
70 | { | 73 | { |
71 | paramList_.setAutoDelete( TRUE ); | 74 | paramList_.setAutoDelete( TRUE ); |
72 | } | 75 | } |
73 | 76 | ||
74 | ContentLine::ContentLine(const ContentLine & x) | 77 | ContentLine::ContentLine(const ContentLine & x) |
75 | :Entity(x), | 78 | :Entity(x), |
@@ -94,13 +97,16 @@ ContentLine::ContentLine(const ContentLine & x) | |||
94 | } | 97 | } |
95 | 98 | ||
96 | } | 99 | } |
97 | 100 | ||
98 | ContentLine::ContentLine(const QCString & s) | 101 | ContentLine::ContentLine(const QCString & s) |
99 | :Entity(s), | 102 | :Entity(s), |
100 | value_(0) | 103 | value_(0), |
104 | paramType_( ParamUnknown ), | ||
105 | valueType_( ValueUnknown ), | ||
106 | entityType_( EntityUnknown ) | ||
101 | { | 107 | { |
102 | paramList_.setAutoDelete( TRUE ); | 108 | paramList_.setAutoDelete( TRUE ); |
103 | } | 109 | } |
104 | 110 | ||
105 | ContentLine & | 111 | ContentLine & |
106 | ContentLine::operator = (ContentLine & x) | 112 | ContentLine::operator = (ContentLine & x) |
diff --git a/kabc/vcard/VCardv.cpp b/kabc/vcard/VCardv.cpp index 391a69e..d19a004 100644 --- a/kabc/vcard/VCardv.cpp +++ b/kabc/vcard/VCardv.cpp | |||
@@ -185,19 +185,23 @@ VCard::_parse() | |||
185 | refolded.append(cur); | 185 | refolded.append(cur); |
186 | } | 186 | } |
187 | 187 | ||
188 | QStrListIterator it2(refolded); | 188 | QStrListIterator it2(refolded); |
189 | 189 | ||
190 | for (; it2.current(); ++it2) { | 190 | for (; it2.current(); ++it2) { |
191 | 191 | vDebug("New contentline using \"" + QCString(it2.current()) + "\""); | |
192 | vDebug("New contentline using \"" + QCString(it2.current()) + "\""); | ||
193 | ContentLine * cl = new ContentLine(it2.current()); | 192 | ContentLine * cl = new ContentLine(it2.current()); |
194 | 193 | ||
195 | cl->parse(); | 194 | cl->parse(); |
196 | 195 | if (cl->value() == 0) | |
197 | contentLineList_.append(cl); | 196 | { |
197 | qDebug("Content line could not be parsed. Discarded: %s" + QCString(it2.current())); | ||
198 | delete cl; | ||
199 | } | ||
200 | else | ||
201 | contentLineList_.append(cl); | ||
198 | } | 202 | } |
199 | 203 | ||
200 | /////////////////////////////////////////////////////////////// | 204 | /////////////////////////////////////////////////////////////// |
201 | // LAST LINE | 205 | // LAST LINE |
202 | 206 | ||
203 | split = endLine.find(':'); | 207 | split = endLine.find(':'); |
diff --git a/kabc/vcard/include/VCardDefines.h b/kabc/vcard/include/VCardDefines.h index dd38ae2..557410f 100644 --- a/kabc/vcard/include/VCardDefines.h +++ b/kabc/vcard/include/VCardDefines.h | |||
@@ -24,13 +24,14 @@ | |||
24 | #ifndef VCARD_DEFINES_H | 24 | #ifndef VCARD_DEFINES_H |
25 | #define VCARD_DEFINES_H | 25 | #define VCARD_DEFINES_H |
26 | 26 | ||
27 | #include <kdebug.h> | 27 | #include <kdebug.h> |
28 | 28 | ||
29 | #ifdef VCARD_DEBUG | 29 | #ifdef VCARD_DEBUG |
30 | #define vDebug(a) kdDebug(5710) << a << endl; | 30 | //US #define vDebug(a) kdDebug(5710) << a << endl; |
31 | #define vDebug(a) qDebug(a); | ||
31 | #else | 32 | #else |
32 | #define vDebug(a) | 33 | #define vDebug(a) |
33 | #endif | 34 | #endif |
34 | 35 | ||
35 | #if 0 | 36 | #if 0 |
36 | #ifndef NDEBUG | 37 | #ifndef NDEBUG |
diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp index 2d6eb3d..1bf2cde 100644 --- a/kabc/vcardformatimpl.cpp +++ b/kabc/vcardformatimpl.cpp | |||
@@ -258,12 +258,13 @@ bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCard *v ) | |||
258 | addressee.setSound( readSoundValue( cl, addressee ) ); | 258 | addressee.setSound( readSoundValue( cl, addressee ) ); |
259 | break; | 259 | break; |
260 | 260 | ||
261 | default: | 261 | default: |
262 | kdDebug(5700) << "VCardFormat::load(): Unsupported entity: " | 262 | kdDebug(5700) << "VCardFormat::load(): Unsupported entity: " |
263 | << int( type ) << ": " << cl->asString() << endl; | 263 | << int( type ) << ": " << cl->asString() << endl; |
264 | qDebug("VCardFormat::load(): Unsupported entity: %i: %s ", int(type), (const char*)cl->asString()); | ||
264 | break; | 265 | break; |
265 | } | 266 | } |
266 | } | 267 | } |
267 | 268 | ||
268 | for( cl = contentLines.first(); cl; cl = contentLines.next() ) { | 269 | for( cl = contentLines.first(); cl; cl = contentLines.next() ) { |
269 | EntityType type = cl->entityType(); | 270 | EntityType type = cl->entityType(); |
@@ -636,12 +637,13 @@ QString VCardFormatImpl::readTextValue( ContentLine *cl ) | |||
636 | { | 637 | { |
637 | VCARD::Value *value = cl->value(); | 638 | VCARD::Value *value = cl->value(); |
638 | if ( value ) { | 639 | if ( value ) { |
639 | return QString::fromUtf8( value->asString() ); | 640 | return QString::fromUtf8( value->asString() ); |
640 | } else { | 641 | } else { |
641 | kdDebug(5700) << "No value: " << cl->asString() << endl; | 642 | kdDebug(5700) << "No value: " << cl->asString() << endl; |
643 | qDebug("No value: %s", (const char*)(cl->asString())); | ||
642 | return QString::null; | 644 | return QString::null; |
643 | } | 645 | } |
644 | } | 646 | } |
645 | 647 | ||
646 | QDate VCardFormatImpl::readDateValue( ContentLine *cl ) | 648 | QDate VCardFormatImpl::readDateValue( ContentLine *cl ) |
647 | { | 649 | { |