-rw-r--r-- | kabc/vcard/VCardv.cpp | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/kabc/vcard/VCardv.cpp b/kabc/vcard/VCardv.cpp index bad2ef1..5dd675d 100644 --- a/kabc/vcard/VCardv.cpp +++ b/kabc/vcard/VCardv.cpp @@ -21,11 +21,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include <qcstring.h> -#include <qstrlist.h> +#include <q3cstring.h> +#include <q3strlist.h> #include <qstringlist.h> #include <qstring.h> -#include <qvaluelist.h> +#include <q3valuelist.h> #include <VCardEntity.h> #include <VCardVCard.h> @@ -48,7 +48,7 @@ VCard::VCard(const VCard & x) { contentLineList_.setAutoDelete( TRUE ); - QPtrListIterator<ContentLine> it(x.contentLineList_); + Q3PtrListIterator<ContentLine> it(x.contentLineList_); for (; it.current(); ++it) { ContentLine * c = new ContentLine(*it.current()); contentLineList_.append(c); @@ -56,7 +56,7 @@ VCard::VCard(const VCard & x) } -VCard::VCard(const QCString & s) +VCard::VCard(const Q3CString & s) : Entity(s) { contentLineList_.setAutoDelete( TRUE ); @@ -68,7 +68,7 @@ VCard::operator = (VCard & x) if (*this == x) return *this; group_ = x.group(); - QPtrListIterator<ContentLine> it(x.contentLineList_); + Q3PtrListIterator<ContentLine> it(x.contentLineList_); for (; it.current(); ++it) { ContentLine * c = new ContentLine(*it.current()); contentLineList_.append(c); @@ -79,7 +79,7 @@ VCard::operator = (VCard & x) } VCard & -VCard::operator = (const QCString & s) +VCard::operator = (const Q3CString & s) { Entity::operator = (s); return *this; @@ -101,7 +101,7 @@ VCard::_parse() { QStringList l; - QStrList sl; + Q3StrList sl; RTokenise(strRep_, "\r\n", sl); @@ -109,7 +109,8 @@ VCard::_parse() //qDebug("invalid vcard "); return; } - l = QStringList::fromStrList( sl ); + for(Q3StrList::iterator i=sl.begin();i!=sl.end();++i) + l.push_back(*i); // Get the first line QString beginLine = l[0].stripWhiteSpace(); @@ -180,7 +181,7 @@ VCard::_parse() } QStringList::Iterator it2 = refolded.begin(); for (; it2 != refolded.end(); ++it2) { - ContentLine * cl = new ContentLine(QCString((*it2).latin1())); + ContentLine * cl = new ContentLine(Q3CString((*it2).latin1())); cl->parse(); if (cl->value() == 0) { @@ -228,7 +229,7 @@ VCard::_assemble() strRep_ = "BEGIN:VCARD\r\n"; strRep_ += "VERSION:3.0\r\n"; - QPtrListIterator<ContentLine> it(contentLineList_); + Q3PtrListIterator<ContentLine> it(contentLineList_); for (; it.current(); ++it) strRep_ += it.current()->asString() + "\r\n"; @@ -244,7 +245,7 @@ VCard::has(EntityType t) } bool -VCard::has(const QCString & s) +VCard::has(const Q3CString & s) { parse(); return contentLine(s) == 0 ? false : true; @@ -259,7 +260,7 @@ VCard::add(const ContentLine & cl) } void -VCard::add(const QCString & s) +VCard::add(const Q3CString & s) { parse(); ContentLine * c = new ContentLine(s); @@ -270,7 +271,7 @@ VCard::add(const QCString & s) VCard::contentLine(EntityType t) { parse(); - QPtrListIterator<ContentLine> it(contentLineList_); + Q3PtrListIterator<ContentLine> it(contentLineList_); for (; it.current(); ++it) if (it.current()->entityType() == t) @@ -280,10 +281,10 @@ VCard::contentLine(EntityType t) } ContentLine * -VCard::contentLine(const QCString & s) +VCard::contentLine(const Q3CString & s) { parse(); - QPtrListIterator<ContentLine> it(contentLineList_); + Q3PtrListIterator<ContentLine> it(contentLineList_); for (; it.current(); ++it) if (it.current()->entityType() == EntityNameToEntityType(s)) |