-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 @@ -20,13 +20,13 @@ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 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> #include <VCardContentLine.h> @@ -47,17 +47,17 @@ VCard::VCard(const VCard & x) group_(x.group_) { 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); } } -VCard::VCard(const QCString & s) +VCard::VCard(const Q3CString & s) : Entity(s) { contentLineList_.setAutoDelete( TRUE ); } @@ -67,9 +67,9 @@ 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); } @@ -78,9 +78,9 @@ VCard::operator = (VCard & x) return *this; } VCard & -VCard::operator = (const QCString & s) +VCard::operator = (const Q3CString & s) { Entity::operator = (s); return *this; } @@ -100,17 +100,18 @@ VCard::~VCard() VCard::_parse() { QStringList l; - QStrList sl; + Q3StrList sl; RTokenise(strRep_, "\r\n", sl); if (sl.count() < 3) { // Invalid VCARD ! //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(); // Remove extra blank lines @@ -179,9 +180,9 @@ VCard::_parse() refolded.append(cur); } 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) { qDebug("Content line could not be parsed. Discarded: %s", (*it2).latin1()); @@ -227,9 +228,9 @@ VCard::_assemble() vDebug("Assembling vcard"); 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"; @@ -243,9 +244,9 @@ VCard::has(EntityType t) return contentLine(t) == 0 ? false : true; } bool -VCard::has(const QCString & s) +VCard::has(const Q3CString & s) { parse(); return contentLine(s) == 0 ? false : true; } @@ -258,9 +259,9 @@ VCard::add(const ContentLine & cl) contentLineList_.append(c); } void -VCard::add(const QCString & s) +VCard::add(const Q3CString & s) { parse(); ContentLine * c = new ContentLine(s); contentLineList_.append(c); @@ -269,9 +270,9 @@ VCard::add(const QCString & s) ContentLine * VCard::contentLine(EntityType t) { parse(); - QPtrListIterator<ContentLine> it(contentLineList_); + Q3PtrListIterator<ContentLine> it(contentLineList_); for (; it.current(); ++it) if (it.current()->entityType() == t) return it.current(); @@ -279,12 +280,12 @@ VCard::contentLine(EntityType t) return 0; } 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)) return it.current(); |