diff options
Diffstat (limited to 'kopete/protocols/jabber/libiris/iris/xmpp-core')
13 files changed, 88 insertions, 86 deletions
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp index 3c8e5435..a8ad7bd9 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp @@ -55,8 +55,8 @@ using namespace XMPP; //---------------------------------------------------------------------------- // Connector //---------------------------------------------------------------------------- -Connector::Connector(TQObject *parent) -:TQObject(parent) +Connector::Connector(TQObject *tqparent) +:TQObject(tqparent) { setUseSSL(false); setPeerAddressNone(); @@ -81,7 +81,7 @@ TQHostAddress Connector::peerAddress() const return addr; } -Q_UINT16 Connector::peerPort() const +TQ_UINT16 Connector::peerPort() const { return port; } @@ -98,7 +98,7 @@ void Connector::setPeerAddressNone() port = 0; } -void Connector::setPeerAddress(const TQHostAddress &_addr, Q_UINT16 _port) +void Connector::setPeerAddress(const TQHostAddress &_addr, TQ_UINT16 _port) { haveaddr = true; addr = _addr; @@ -129,7 +129,7 @@ TQString AdvancedConnector::Proxy::host() const return v_host; } -Q_UINT16 AdvancedConnector::Proxy::port() const +TQ_UINT16 AdvancedConnector::Proxy::port() const { return v_port; } @@ -154,14 +154,14 @@ int AdvancedConnector::Proxy::pollInterval() const return v_poll; } -void AdvancedConnector::Proxy::setHttpConnect(const TQString &host, Q_UINT16 port) +void AdvancedConnector::Proxy::setHttpConnect(const TQString &host, TQ_UINT16 port) { t = HttpConnect; v_host = host; v_port = port; } -void AdvancedConnector::Proxy::setHttpPoll(const TQString &host, Q_UINT16 port, const TQString &url) +void AdvancedConnector::Proxy::setHttpPoll(const TQString &host, TQ_UINT16 port, const TQString &url) { t = HttpPoll; v_host = host; @@ -169,7 +169,7 @@ void AdvancedConnector::Proxy::setHttpPoll(const TQString &host, Q_UINT16 port, v_url = url; } -void AdvancedConnector::Proxy::setSocks(const TQString &host, Q_UINT16 port) +void AdvancedConnector::Proxy::setSocks(const TQString &host, TQ_UINT16 port) { t = Socks; v_host = host; @@ -223,8 +223,8 @@ public: SafeDelete sd; }; -AdvancedConnector::AdvancedConnector(TQObject *parent) -:Connector(parent) +AdvancedConnector::AdvancedConnector(TQObject *tqparent) +:Connector(tqparent) { d = new Private; d->bs = 0; @@ -285,7 +285,7 @@ void AdvancedConnector::setProxy(const Proxy &proxy) d->proxy = proxy; } -void AdvancedConnector::setOptHostPort(const TQString &host, Q_UINT16 _port) +void AdvancedConnector::setOptHostPort(const TQString &host, TQ_UINT16 _port) { if(d->mode != Idle) return; @@ -409,7 +409,7 @@ void AdvancedConnector::dns_done() //if(!d->qdns) // return; - // apparently we sometimes get this signal even though the results aren' t ready + // aptqparently we sometimes get this signal even though the results aren' t ready //if(d->qdns->isWorking()) // return; diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp index 4c8307cb..1b1dc1c7 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp @@ -104,8 +104,8 @@ static void ensureEndian() * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined. */ -typedef Q_UINT8 md5_byte_t; /* 8-bit byte */ -typedef Q_UINT32 md5_word_t; /* 32-bit word */ +typedef TQ_UINT8 md5_byte_t; /* 8-bit byte */ +typedef TQ_UINT32 md5_word_t; /* 32-bit word */ /* Define the state of the MD5 Algorithm. */ typedef struct md5_state_s { @@ -437,14 +437,14 @@ md5_finish(md5_state_t *pms, md5_byte_t digest[16]) struct SHA1_CONTEXT { - Q_UINT32 state[5]; - Q_UINT32 count[2]; + TQ_UINT32 state[5]; + TQ_UINT32 count[2]; unsigned char buffer[64]; }; typedef union { unsigned char c[64]; - Q_UINT32 l[16]; + TQ_UINT32 l[16]; } CHAR64LONG16; class SHA1Context : public QCA_HashContext @@ -480,7 +480,7 @@ public: *out = b; } - unsigned long blk0(Q_UINT32 i) + unsigned long blk0(TQ_UINT32 i) { if(bigEndian) return block->l[i]; @@ -489,9 +489,9 @@ public: } // Hash a single 512-bit block. This is the core of the algorithm. - void transform(Q_UINT32 state[5], unsigned char buffer[64]) + void transform(TQ_UINT32 state[5], unsigned char buffer[64]) { - Q_UINT32 a, b, c, d, e; + TQ_UINT32 a, b, c, d, e; block = (CHAR64LONG16*)buffer; @@ -548,9 +548,9 @@ public: } // Run your data through this - void sha1_update(SHA1_CONTEXT* context, unsigned char* data, Q_UINT32 len) + void sha1_update(SHA1_CONTEXT* context, unsigned char* data, TQ_UINT32 len) { - Q_UINT32 i, j; + TQ_UINT32 i, j; j = (context->count[0] >> 3) & 63; if((context->count[0] += len << 3) < (len << 3)) @@ -573,7 +573,7 @@ public: // Add padding and return the message digest void sha1_final(unsigned char digest[20], SHA1_CONTEXT* context) { - Q_UINT32 i, j; + TQ_UINT32 i, j; unsigned char finalcount[8]; for (i = 0; i < 8; i++) { diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp index 090cc9df..90cf1364 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp @@ -42,7 +42,7 @@ public: StringPrepCache *that = get_instance(); - Result *r = that->nameprep_table.find(in); + Result *r = that->nameprep_table.tqfind(in); if(r) { if(!r->norm) @@ -78,7 +78,7 @@ public: StringPrepCache *that = get_instance(); - Result *r = that->nodeprep_table.find(in); + Result *r = that->nodeprep_table.tqfind(in); if(r) { if(!r->norm) @@ -114,7 +114,7 @@ public: StringPrepCache *that = get_instance(); - Result *r = that->resourceprep_table.find(in); + Result *r = that->resourceprep_table.tqfind(in); if(r) { if(!r->norm) @@ -248,7 +248,7 @@ void Jid::set(const TQString &s) { TQString rest, domain, node, resource; TQString norm_domain, norm_node, norm_resource; - int x = s.find('/'); + int x = s.tqfind('/'); if(x != -1) { rest = s.mid(0, x); resource = s.mid(x+1); @@ -262,7 +262,7 @@ void Jid::set(const TQString &s) return; } - x = rest.find('@'); + x = rest.tqfind('@'); if(x != -1) { node = rest.mid(0, x); domain = rest.mid(x+1); diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp index 4c10bd53..ba14f404 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp @@ -22,7 +22,7 @@ TODO: For XMPP::Parser to be "perfect", some things must be solved/changed in the - Qt library: + TQt library: - Fix weird TQDomElement::haveAttributeNS() bug (patch submitted to Trolltech on Aug 31st, 2003). @@ -31,7 +31,7 @@ the final '>' is reached. - Fix incremental parsing bugs in TQXmlSimpleReader. At the moment, the only bug I've found is related to attribute parsing, but there might - be more (search for '###' in $QTDIR/src/xml/qxml.cpp). + be more (search for '###' in $TQTDIR/src/xml/qxml.cpp). We have workarounds for all of the above problems in the code below. @@ -44,7 +44,7 @@ - Make TQXmlInputSource capable of accepting data incrementally, to ensure proper text encoding detection and processing over a network. This is technically not a bug, as we have our own subclass below to do it, but - it would be nice if Qt had this already. + it would be nice if TQt had this already. */ #include"parser.h" @@ -61,7 +61,7 @@ static bool qt_bug_have; //---------------------------------------------------------------------------- // StreamInput //---------------------------------------------------------------------------- -class StreamInput : public QXmlInputSource +class StreamInput : public TQXmlInputSource { public: StreamInput() @@ -232,10 +232,10 @@ private: if(mightChangeEncoding) { while(1) { - int n = out.find('<'); + int n = out.tqfind('<'); if(n != -1) { // we need a closing bracket - int n2 = out.find('>', n); + int n2 = out.tqfind('>', n); if(n2 != -1) { ++n2; TQString h = out.mid(n, n2-n); @@ -278,8 +278,8 @@ private: if(h.left(5) != "<?xml") return ""; - int endPos = h.find(">"); - int startPos = h.find("encoding"); + int endPos = h.tqfind(">"); + int startPos = h.tqfind("encoding"); if(startPos < endPos && startPos != -1) { TQString encoding; do { @@ -335,7 +335,7 @@ private: bool checkForBadChars(const TQString &s) { - int len = s.find('<'); + int len = s.tqfind('<'); if(len == -1) len = s.length(); else @@ -354,7 +354,7 @@ private: //---------------------------------------------------------------------------- namespace XMPP { - class ParserHandler : public QXmlDefaultHandler + class ParserHandler : public TQXmlDefaultHandler { public: ParserHandler(StreamInput *_in, TQDomDocument *_doc) @@ -465,7 +465,7 @@ namespace XMPP current = TQDomElement(); } else - current = current.parentNode().toElement(); + current = current.tqparentNode().toElement(); } if(in->lastRead() == '/') @@ -610,7 +610,7 @@ TQString Parser::Event::nsprefix(const TQString &s) const return (*it2); ++it2; } - return TQString::null; + return TQString(); } TQString Parser::Event::namespaceURI() const @@ -737,7 +737,7 @@ Parser::Parser() { d = new Private; - // check for evil bug in Qt <= 3.2.1 + // check for evil bug in TQt <= 3.2.1 if(!qt_bug_check) { qt_bug_check = true; TQDomElement e = d->doc->createElementNS("someuri", "somename"); diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h index b702ad55..55dcdde9 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h @@ -45,7 +45,7 @@ namespace XMPP int type() const; // for document open - TQString nsprefix(const TQString &s=TQString::null) const; + TQString nsprefix(const TQString &s=TQString()) const; // for document open / close TQString namespaceURI() const; diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp index 76d3c781..5a6bc64f 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp @@ -39,7 +39,7 @@ using namespace XMPP; // // This function prints out an array of bytes as latin characters, converting // non-printable bytes into hex values as necessary. Useful for displaying -// QByteArrays for debugging purposes. +// TQByteArrays for debugging purposes. static TQString printArray(const TQByteArray &a) { TQString s; @@ -440,7 +440,7 @@ void BasicProtocol::handleDocOpen(const Parser::Event &pe) int minor = 0; TQString verstr = atts.value("version"); if(!verstr.isEmpty()) { - int n = verstr.find('.'); + int n = verstr.tqfind('.'); if(n != -1) { major = verstr.mid(0, n).toInt(); minor = verstr.mid(n+1).toInt(); @@ -1109,7 +1109,7 @@ bool CoreProtocol::normalStep(const TQDomElement &e) e.setAttribute("mechanism", sasl_mech); if(!sasl_step.isEmpty()) { #ifdef XMPP_TEST - TD::msg(TQString("SASL OUT: [%1]").arg(printArray(sasl_step))); + TD::msg(TQString("SASL OUT: [%1]").tqarg(printArray(sasl_step))); #endif e.appendChild(doc.createTextNode(Base64::arrayToString(sasl_step))); } @@ -1143,7 +1143,7 @@ bool CoreProtocol::normalStep(const TQDomElement &e) else { TQByteArray stepData = sasl_step; #ifdef XMPP_TEST - TD::msg(TQString("SASL OUT: [%1]").arg(printArray(sasl_step))); + TD::msg(TQString("SASL OUT: [%1]").tqarg(printArray(sasl_step))); #endif TQDomElement e = doc.createElementNS(NS_SASL, "response"); if(!stepData.isEmpty()) @@ -1289,7 +1289,7 @@ bool CoreProtocol::normalStep(const TQDomElement &e) #ifdef XMPP_TEST TQString s = "SASL mechs:"; for(TQStringList::ConstIterator it = f.sasl_mechs.begin(); it != f.sasl_mechs.end(); ++it) - s += TQString(" [%1]").arg((*it)); + s += TQString(" [%1]").tqarg((*it)); TD::msg(s); #endif } @@ -1341,7 +1341,7 @@ bool CoreProtocol::normalStep(const TQDomElement &e) if(e.tagName() == "challenge") { TQByteArray a = Base64::stringToArray(e.text()); #ifdef XMPP_TEST - TD::msg(TQString("SASL IN: [%1]").arg(printArray(a))); + TD::msg(TQString("SASL IN: [%1]").tqarg(printArray(a))); #endif sasl_step = a; need = NSASLNext; diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h index 6eda17f9..9f4fa1fb 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h @@ -141,7 +141,7 @@ public: struct QCA_SASLHostPort { TQHostAddress addr; - Q_UINT16 port; + TQ_UINT16 port; }; struct QCA_SASLNeedParams diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp index f7d44db4..40872ce0 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp @@ -109,9 +109,10 @@ int LayerTracker::finished(int encoded) //---------------------------------------------------------------------------- // SecureStream //---------------------------------------------------------------------------- -class SecureLayer : public QObject +class SecureLayer : public TQObject { Q_OBJECT + TQ_OBJECT public: enum { TLS, SASL, TLSH }; int type; diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h index 844fd3d1..f76bd617 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h @@ -36,6 +36,7 @@ namespace XMPP class SecureStream : public ByteStream { Q_OBJECT + TQ_OBJECT public: enum Error { ErrTLS = ErrCustom, ErrSASL }; SecureStream(ByteStream *s); diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp index c825a2ca..da78fef1 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp @@ -78,7 +78,7 @@ public: PropList list; int at = 0; while(1) { - int n = str.find('=', at); + int n = str.tqfind('=', at); if(n == -1) break; TQCString var, val; @@ -86,14 +86,14 @@ public: at = n + 1; if(str[at] == '\"') { ++at; - n = str.find('\"', at); + n = str.tqfind('\"', at); if(n == -1) break; val = str.mid(at, n-at); at = n + 1; } else { - n = str.find(',', at); + n = str.tqfind(',', at); if(n != -1) { val = str.mid(at, n-at); at = n; diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp index d3182ffe..fe7275ad 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp @@ -488,8 +488,8 @@ void Stanza::clearError() // Stream //---------------------------------------------------------------------------- static XmlProtocol *foo = 0; -Stream::Stream(TQObject *parent) -:TQObject(parent) +Stream::Stream(TQObject *tqparent) +:TQObject(tqparent) { } @@ -574,7 +574,7 @@ public: bool allowPlain, mutualAuth; bool haveLocalAddr; TQHostAddress localAddr; - Q_UINT16 localPort; + TQ_UINT16 localPort; int minimumSSF, maximumSSF; TQString sasl_mech; bool doBinding; @@ -612,8 +612,8 @@ public: int noop_time; }; -ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, TQObject *parent) -:Stream(parent) +ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, TQObject *tqparent) +:Stream(tqparent) { d = new Private; d->mode = Client; @@ -627,8 +627,8 @@ ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, TQObject *pa d->tlsHandler = tlsHandler; } -ClientStream::ClientStream(const TQString &host, const TQString &defRealm, ByteStream *bs, QCA::TLS *tls, TQObject *parent) -:Stream(parent) +ClientStream::ClientStream(const TQString &host, const TQString &defRealm, ByteStream *bs, QCA::TLS *tls, TQObject *tqparent) +:Stream(tqparent) { d = new Private; d->mode = Server; @@ -832,7 +832,7 @@ void ClientStream::setSASLMechanism(const TQString &s) d->sasl_mech = s; } -void ClientStream::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port) +void ClientStream::setLocalAddr(const TQHostAddress &addr, TQ_UINT16 port) { d->haveLocalAddr = true; d->localAddr = addr; @@ -1115,7 +1115,7 @@ void ClientStream::sasl_authCheck(const TQString &user, const TQString &) // printf("authcheck: [%s], [%s]\n", user.latin1(), authzid.latin1()); //#endif TQString u = user; - int n = u.find('@'); + int n = u.tqfind('@'); if(n != -1) u.truncate(n); d->srv.user = u; @@ -1241,7 +1241,7 @@ void ClientStream::srvProcessNext() printf("Break (RecvOpen)\n"); // calculate key - TQCString str = QCA::SHA1::hashToString("secret").utf8(); + TQCString str = QCA::SHA1::hashToString(TQCString("secret")).utf8(); str = QCA::SHA1::hashToString(str + "im.pyxa.org").utf8(); str = QCA::SHA1::hashToString(str + d->srv.id.utf8()).utf8(); d->srv.setDialbackKey(str); @@ -1358,9 +1358,9 @@ void ClientStream::processNext() #endif #ifdef XMPP_TEST - TQString s = TQString("handshake success (lang=[%1]").arg(d->client.lang); + TQString s = TQString("handshake success (lang=[%1]").tqarg(d->client.lang); if(!d->client.from.isEmpty()) - s += TQString(", from=[%1]").arg(d->client.from); + s += TQString(", from=[%1]").tqarg(d->client.from); s += ')'; TD::msg(s); #endif diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp index 313c6b6a..996727ea 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp @@ -28,8 +28,8 @@ using namespace XMPP; //---------------------------------------------------------------------------- // TLSHandler //---------------------------------------------------------------------------- -TLSHandler::TLSHandler(TQObject *parent) -:TQObject(parent) +TLSHandler::TLSHandler(TQObject *tqparent) +:TQObject(tqparent) { } @@ -48,11 +48,11 @@ public: int state, err; }; -QCATLSHandler::QCATLSHandler(QCA::TLS *parent) -:TLSHandler(parent) +QCATLSHandler::QCATLSHandler(QCA::TLS *tqparent) +:TLSHandler(tqparent) { d = new Private; - d->tls = parent; + d->tls = tqparent; connect(d->tls, TQT_SIGNAL(handshaken()), TQT_SLOT(tls_handshaken())); connect(d->tls, TQT_SIGNAL(readyRead()), TQT_SLOT(tls_readyRead())); connect(d->tls, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(tls_readyReadOutgoing(int))); 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 <?xml .. ?> processing +// This function creates three TQStrings, one being an <?xml .. ?> processing // instruction, and the others being the opening and closing tags of an // element, <foo> and </foo>. 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 |