author | zautrix <zautrix> | 2005-01-15 09:31:52 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-15 09:31:52 (UTC) |
commit | f9f60d23806530a5bccae372e5eeebee6d528f20 (patch) (side-by-side diff) | |
tree | caa83ca3e29a14a3423a6f4a7f22119148eaef04 | |
parent | a423c235d0cbc39292102042ed8f4a953e0e37f9 (diff) | |
download | kdepimpi-f9f60d23806530a5bccae372e5eeebee6d528f20.zip kdepimpi-f9f60d23806530a5bccae372e5eeebee6d528f20.tar.gz kdepimpi-f9f60d23806530a5bccae372e5eeebee6d528f20.tar.bz2 |
crash fix
-rw-r--r-- | kabc/vcard/VCardv.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kabc/vcard/VCardv.cpp b/kabc/vcard/VCardv.cpp index 49bfe43..1166aac 100644 --- a/kabc/vcard/VCardv.cpp +++ b/kabc/vcard/VCardv.cpp @@ -76,97 +76,97 @@ VCard::operator = (VCard & x) Entity::operator = (x); return *this; } VCard & VCard::operator = (const QCString & s) { Entity::operator = (s); return *this; } bool VCard::operator == (VCard & x) { x.parse(); return false; } VCard::~VCard() { } void VCard::_parse() { QStringList l; QStrList sl; RTokenise(strRep_, "\r\n", sl); if (sl.count() < 3) { // Invalid VCARD ! //qDebug("invalid vcard "); return; } l = QStringList::fromStrList( sl ); // Get the first line QString beginLine = l[0].stripWhiteSpace(); // Remove extra blank lines while (l.last().isEmpty()) l.remove(l.last()); // Now we know this is the last line QString endLine = l.last(); // Trash the first and last lines as we have seen them. - l.remove(l.first()); + l.remove(l.begin()); l.remove(l.last()); /////////////////////////////////////////////////////////////// // FIRST LINE int split = beginLine.find(':'); if (split == -1) { // invalid, no BEGIN vDebug("No split"); return; } QString firstPart(beginLine.left(split)); QString valuePart(beginLine.mid(split + 1)); split = firstPart.find('.'); if (split != -1) { group_ = firstPart.left(split); firstPart = firstPart.right(firstPart.length() - split - 1); } if (firstPart.left(5) != "BEGIN" ) { // No BEGIN ! qDebug("no BEGIN in vcard "); return; } if (valuePart.left(5) != "VCARD") { // Not a vcard ! qDebug("not a VCARD "); return; } /////////////////////////////////////////////////////////////// // CONTENT LINES // vDebug("Content lines"); // Handle folded lines. QStringList refolded; QStringList::Iterator it = l.begin(); QString cur; for (; it != l.end(); ++it) { cur = (*it); |