author | zautrix <zautrix> | 2004-10-13 05:15:03 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-13 05:15:03 (UTC) |
commit | f08cf9044213a60c87e2bf299665d13a335feff5 (patch) (side-by-side diff) | |
tree | c9c0e8b0f7f7a48dcee8fbdd5b9a467985c78fdd /kabc/vcard | |
parent | 308bc78a3ab0d27718070a5ebdf3f019ac570c6b (diff) | |
download | kdepimpi-f08cf9044213a60c87e2bf299665d13a335feff5.zip kdepimpi-f08cf9044213a60c87e2bf299665d13a335feff5.tar.gz kdepimpi-f08cf9044213a60c87e2bf299665d13a335feff5.tar.bz2 |
fixed some newline probs
-rw-r--r-- | kabc/vcard/ContentLine.cpp | 1 |
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; } |