summaryrefslogtreecommitdiffabout
path: root/kabc/vcard
Side-by-side diff
Diffstat (limited to 'kabc/vcard') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/vcard/ContentLine.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp
index f7e04a9..c368172 100644
--- a/kabc/vcard/ContentLine.cpp
+++ b/kabc/vcard/ContentLine.cpp
@@ -262,59 +262,60 @@ ContentLine::_parse()
case ValueDate: value_ = new DateValue; break;
case ValueTextList: value_ = new TextListValue; break;
case ValueGeo: value_ = new GeoValue; break;
case ValueText:
case ValueUnknown:
default: value_ = new TextValue; break;
}
*value_ = valuePart;
}
void
ContentLine::_assemble()
{
vDebug("Assemble (argl) - my name is \"" + name_ + "\"");
strRep_.truncate(0);
QCString line;
if (!group_.isEmpty())
line += group_ + '.';
line += name_;
vDebug("Adding parameters");
ParamListIterator it(paramList_);
for (; it.current(); ++it)
line += ";" + it.current()->asString();
vDebug("Adding value");
if (value_ != 0)
line += ":" + value_->asString();
else
vDebug("No value");
// Quote newlines
line = line.replace( QRegExp( "\n" ), "\\n" );
// Fold lines longer than 72 chars
const int maxLen = 72;
uint cursor = 0;
while( line.length() > ( cursor + 1 ) * maxLen ) {
strRep_ += line.mid( cursor * maxLen, maxLen );
strRep_ += "\r\n ";
++cursor;
}
strRep_ += line.mid( cursor * maxLen );
+ //qDebug("ContentLine::_assemble()\n%s*****", strRep_.data());
}
void
ContentLine::clear()
{
group_.truncate(0);
name_.truncate(0);
paramList_.clear();
delete value_;
value_ = 0;
}