From 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 22 Jun 2011 00:30:31 +0000 Subject: TQt4 port kdenetwork This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- .../jabber/libiris/iris/xmpp-core/xmlprotocol.cpp | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp') diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp index de321e7c..0f8b17a7 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp @@ -28,14 +28,14 @@ using namespace XMPP; // // This function removes namespace information from various nodes for // display purposes only (the element is pretty much useless for processing -// after this). We do this because QXml is a bit overzealous about outputting +// after this). We do this because TQXml is a bit overzealous about outputting // redundant namespaces. static TQDomElement stripExtraNS(const TQDomElement &e) { - // find closest parent with a namespace - TQDomNode par = e.parentNode(); + // find closest tqparent with a namespace + TQDomNode par = e.tqparentNode(); while(!par.isNull() && par.namespaceURI().isNull()) - par = par.parentNode(); + par = par.tqparentNode(); bool noShowNS = false; if(!par.isNull() && par.namespaceURI() == e.namespaceURI()) noShowNS = true; @@ -66,7 +66,7 @@ static TQDomElement stripExtraNS(const TQDomElement &e) i.setAttributeNodeNS(a); } - // copy children + // copy tqchildren TQDomNodeList nl = e.childNodes(); for(x = 0; x < nl.count(); ++x) { TQDomNode n = nl.item(x); @@ -82,13 +82,13 @@ static TQDomElement stripExtraNS(const TQDomElement &e) // // This function converts a TQDomElement into a TQString, using stripExtraNS // to make it pretty. -static TQString xmlToString(const TQDomElement &e, const TQString &fakeNS, const TQString &fakeQName, bool clip) +static TQString xmlToString(const TQDomElement &e, const TQString &fakeNS, const TQString &fakeTQName, bool clip) { TQDomElement i = e.cloneNode().toElement(); - // It seems QDom can only have one namespace attribute at a time (see docElement 'HACK'). + // It seems TQDom can only have one namespace attribute at a time (see docElement 'HACK'). // Fortunately we only need one kind depending on the input, so it is specified here. - TQDomElement fake = e.ownerDocument().createElementNS(fakeNS, fakeQName); + TQDomElement fake = e.ownerDocument().createElementNS(fakeNS, fakeTQName); fake.appendChild(i); fake = stripExtraNS(fake); TQString out; @@ -98,7 +98,7 @@ static TQString xmlToString(const TQDomElement &e, const TQString &fakeNS, const } // 'clip' means to remove any unwanted (and unneeded) characters, such as a trailing newline if(clip) { - int n = out.findRev('>'); + int n = out.tqfindRev('>'); out.truncate(n+1); } return out; @@ -106,11 +106,11 @@ static TQString xmlToString(const TQDomElement &e, const TQString &fakeNS, const // createRootXmlTags // -// This function creates three QStrings, one being an processing +// This function creates three TQStrings, one being an processing // instruction, and the others being the opening and closing tags of an // element, and . This basically allows us to get the raw XML // text needed to open/close an XML stream, without resorting to generating -// the XML ourselves. This function uses QDom to do the generation, which +// the XML ourselves. This function uses TQDom to do the generation, which // ensures proper encoding and entity output. static void createRootXmlTags(const TQDomElement &root, TQString *xmlHeader, TQString *tagOpen, TQString *tagClose) { @@ -128,12 +128,12 @@ static void createRootXmlTags(const TQDomElement &root, TQString *xmlHeader, TQS } // parse the tags out - int n = str.find('<'); - int n2 = str.find('>', n); + int n = str.tqfind('<'); + int n2 = str.tqfind('>', n); ++n2; *tagOpen = str.mid(n, n2-n); - n2 = str.findRev('>'); - n = str.findRev('<'); + n2 = str.tqfindRev('>'); + n = str.tqfindRev('<'); ++n2; *tagClose = str.mid(n, n2-n); @@ -329,7 +329,7 @@ TQString XmlProtocol::elementToString(const TQDomElement &e, bool clip) for(n = 0; n < al.count(); ++n) { TQDomAttr a = al.item(n).toAttr(); TQString s = a.name(); - int x = s.find(':'); + int x = s.tqfind(':'); if(x != -1) s = s.mid(x+1); else -- cgit v1.2.1