summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/vcard/ContentLine.cpp10
-rw-r--r--kabc/vcard/VCardv.cpp12
-rw-r--r--kabc/vcard/include/VCardDefines.h3
-rw-r--r--kabc/vcardformatimpl.cpp2
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 @@
#include <VCardDefines.h>
using namespace VCARD;
ContentLine::ContentLine()
: Entity(),
- value_(0)
+ value_(0),
+ paramType_( ParamUnknown ),
+ valueType_( ValueUnknown ),
+ entityType_( EntityUnknown )
{
paramList_.setAutoDelete( TRUE );
}
ContentLine::ContentLine(const ContentLine & x)
: Entity(x),
@@ -94,13 +97,16 @@ ContentLine::ContentLine(const ContentLine & x)
}
}
ContentLine::ContentLine(const QCString & s)
: Entity(s),
- value_(0)
+ value_(0),
+ paramType_( ParamUnknown ),
+ valueType_( ValueUnknown ),
+ entityType_( EntityUnknown )
{
paramList_.setAutoDelete( TRUE );
}
ContentLine &
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()
refolded.append(cur);
}
QStrListIterator it2(refolded);
for (; it2.current(); ++it2) {
-
- vDebug("New contentline using \"" + QCString(it2.current()) + "\"");
+ vDebug("New contentline using \"" + QCString(it2.current()) + "\"");
ContentLine * cl = new ContentLine(it2.current());
cl->parse();
-
- contentLineList_.append(cl);
+ if (cl->value() == 0)
+ {
+ qDebug("Content line could not be parsed. Discarded: %s" + QCString(it2.current()));
+ delete cl;
+ }
+ else
+ contentLineList_.append(cl);
}
///////////////////////////////////////////////////////////////
// LAST LINE
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 @@
#ifndef VCARD_DEFINES_H
#define VCARD_DEFINES_H
#include <kdebug.h>
#ifdef VCARD_DEBUG
-#define vDebug(a) kdDebug(5710) << a << endl;
+//US #define vDebug(a) kdDebug(5710) << a << endl;
+#define vDebug(a) qDebug(a);
#else
#define vDebug(a)
#endif
#if 0
#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 )
addressee.setSound( readSoundValue( cl, addressee ) );
break;
default:
kdDebug(5700) << "VCardFormat::load(): Unsupported entity: "
<< int( type ) << ": " << cl->asString() << endl;
+ qDebug("VCardFormat::load(): Unsupported entity: %i: %s ", int(type), (const char*)cl->asString());
break;
}
}
for( cl = contentLines.first(); cl; cl = contentLines.next() ) {
EntityType type = cl->entityType();
@@ -636,12 +637,13 @@ QString VCardFormatImpl::readTextValue( ContentLine *cl )
{
VCARD::Value *value = cl->value();
if ( value ) {
return QString::fromUtf8( value->asString() );
} else {
kdDebug(5700) << "No value: " << cl->asString() << endl;
+ qDebug("No value: %s", (const char*)(cl->asString()));
return QString::null;
}
}
QDate VCardFormatImpl::readDateValue( ContentLine *cl )
{