diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/protocols/jabber/libiris/iris | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip |
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
Diffstat (limited to 'kopete/protocols/jabber/libiris/iris')
29 files changed, 474 insertions, 439 deletions
diff --git a/kopete/protocols/jabber/libiris/iris/include/im.h b/kopete/protocols/jabber/libiris/iris/include/im.h index f4905057..12b9ad55 100644 --- a/kopete/protocols/jabber/libiris/iris/include/im.h +++ b/kopete/protocols/jabber/libiris/iris/include/im.h @@ -136,11 +136,11 @@ namespace XMPP SubType value; }; - class Status + class tqStatus { public: - Status(const TQString &show="", const TQString &status="", int priority=0, bool available=true); - ~Status(); + tqStatus(const TQString &show="", const TQString &status="", int priority=0, bool available=true); + ~tqStatus(); int priority() const; const TQString & show() const; @@ -162,7 +162,7 @@ namespace XMPP void setPriority(int); void setShow(const TQString &); - void setStatus(const TQString &); + void settqStatus(const TQString &); void setTimeStamp(const TQDateTime &); void setKeyID(const TQString &); void setIsAvailable(bool); @@ -197,19 +197,19 @@ namespace XMPP class Resource { public: - Resource(const TQString &name="", const Status &s=Status()); + Resource(const TQString &name="", const tqStatus &s=tqStatus()); ~Resource(); const TQString & name() const; int priority() const; - const Status & status() const; + const tqStatus & status() const; void setName(const TQString &); - void setStatus(const Status &); + void settqStatus(const tqStatus &); private: TQString v_name; - Status v_status; + tqStatus v_status; class ResourcePrivate *d; }; @@ -220,10 +220,10 @@ namespace XMPP ResourceList(); ~ResourceList(); - ResourceList::Iterator find(const TQString &); + ResourceList::Iterator tqfind(const TQString &); ResourceList::Iterator priority(); - ResourceList::ConstIterator find(const TQString &) const; + ResourceList::ConstIterator tqfind(const TQString &) const; ResourceList::ConstIterator priority() const; private: @@ -273,8 +273,8 @@ namespace XMPP Roster(); ~Roster(); - Roster::Iterator find(const Jid &); - Roster::ConstIterator find(const Jid &) const; + Roster::Iterator tqfind(const Jid &); + Roster::ConstIterator tqfind(const Jid &) const; private: class RosterPrivate *d; @@ -492,16 +492,17 @@ namespace XMPP class JidLinkManager; class FileTransferManager; - class Task : public QObject + class Task : public TQObject { Q_OBJECT + TQ_OBJECT public: enum { ErrDisc }; - Task(Task *parent); + Task(Task *tqparent); Task(Client *, bool isRoot); virtual ~Task(); - Task *parent() const; + Task *tqparent() const; Client *client() const; TQDomDocument *doc() const; TQString id() const; @@ -539,12 +540,13 @@ namespace XMPP TaskPrivate *d; }; - class Client : public QObject + class Client : public TQObject { Q_OBJECT + TQ_OBJECT public: - Client(TQObject *parent=0); + Client(TQObject *tqparent=0); ~Client(); bool isActive() const; @@ -568,7 +570,7 @@ namespace XMPP void rosterRequest(); void sendMessage(const Message &); void sendSubscription(const Jid &, const TQString &); - void setPresence(const Status &); + void setPresence(const tqStatus &); void debug(const TQString &); TQString genUniqueId(); @@ -608,8 +610,8 @@ namespace XMPP bool groupChatJoin(const TQString &host, const TQString &room, const TQString &nick); bool groupChatJoin(const TQString &host, const TQString &room, const TQString &nick, const TQString &password); - void groupChatSetStatus(const TQString &host, const TQString &room, const Status &); - void groupChatChangeNick(const TQString &host, const TQString &room, const TQString &nick, const Status &); + void groupChatSettqStatus(const TQString &host, const TQString &room, const tqStatus &); + void groupChatChangeNick(const TQString &host, const TQString &room, const TQString &nick, const tqStatus &); void groupChatLeave(const TQString &host, const TQString &room); signals: @@ -630,7 +632,7 @@ namespace XMPP void xmlOutgoing(const TQString &); void groupChatJoined(const Jid &); void groupChatLeft(const Jid &); - void groupChatPresence(const Jid &, const Status &); + void groupChatPresence(const Jid &, const tqStatus &); void groupChatError(const Jid &, int, const TQString &); void incomingJidLink(); @@ -639,7 +641,7 @@ namespace XMPP //void streamConnected(); //void streamHandshaken(); //void streamError(const StreamError &); - //void streamSSLCertificateReady(const QSSLCert &); + //void streamSSLCertificateReady(const TQSSLCert &); //void streamCloseFinished(); void streamError(int); void streamReadyRead(); @@ -650,7 +652,7 @@ namespace XMPP // basic daemons void ppSubscription(const Jid &, const TQString &); - void ppPresence(const Jid &, const Status &); + void ppPresence(const Jid &, const tqStatus &); void pmMessage(const Message &); void prRoster(const Roster &); @@ -664,8 +666,8 @@ namespace XMPP void distribute(const TQDomElement &); void importRoster(const Roster &); void importRosterItem(const RosterItem &); - void updateSelfPresence(const Jid &, const Status &); - void updatePresence(LiveRosterItem *, const Jid &, const Status &); + void updateSelfPresence(const Jid &, const tqStatus &); + void updatePresence(LiveRosterItem *, const Jid &, const tqStatus &); class ClientPrivate; ClientPrivate *d; @@ -687,15 +689,15 @@ namespace XMPP ResourceList::ConstIterator priority() const; bool isAvailable() const; - const Status & lastUnavailableStatus() const; + const tqStatus & lastUnavailabletqStatus() const; bool flagForDelete() const; - void setLastUnavailableStatus(const Status &); + void setLastUnavailabletqStatus(const tqStatus &); void setFlagForDelete(bool); private: ResourceList v_resourceList; - Status v_lastUnavailableStatus; + tqStatus v_lastUnavailabletqStatus; bool v_flagForDelete; class LiveRosterItemPrivate; @@ -709,8 +711,8 @@ namespace XMPP ~LiveRoster(); void flagAllForDelete(); - LiveRoster::Iterator find(const Jid &, bool compareRes=true); - LiveRoster::ConstIterator find(const Jid &, bool compareRes=true) const; + LiveRoster::Iterator tqfind(const Jid &, bool compareRes=true); + LiveRoster::ConstIterator tqfind(const Jid &, bool compareRes=true) const; private: class LiveRosterPrivate; diff --git a/kopete/protocols/jabber/libiris/iris/include/xmpp.h b/kopete/protocols/jabber/libiris/iris/include/xmpp.h index 12d87d18..a59a4827 100644 --- a/kopete/protocols/jabber/libiris/iris/include/xmpp.h +++ b/kopete/protocols/jabber/libiris/iris/include/xmpp.h @@ -60,11 +60,12 @@ namespace XMPP void setDebug(Debug *); - class Connector : public QObject + class Connector : public TQObject { Q_OBJECT + TQ_OBJECT public: - Connector(TQObject *parent=0); + Connector(TQObject *tqparent=0); virtual ~Connector(); virtual void connectToServer(const TQString &server)=0; @@ -74,7 +75,7 @@ namespace XMPP bool useSSL() const; bool havePeerAddress() const; TQHostAddress peerAddress() const; - Q_UINT16 peerPort() const; + TQ_UINT16 peerPort() const; signals: void connected(); @@ -83,21 +84,22 @@ namespace XMPP protected: void setUseSSL(bool b); void setPeerAddressNone(); - void setPeerAddress(const TQHostAddress &addr, Q_UINT16 port); + void setPeerAddress(const TQHostAddress &addr, TQ_UINT16 port); private: bool ssl; bool haveaddr; TQHostAddress addr; - Q_UINT16 port; + TQ_UINT16 port; }; class AdvancedConnector : public Connector { Q_OBJECT + TQ_OBJECT public: enum Error { ErrConnectionRefused, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth, ErrStream }; - AdvancedConnector(TQObject *parent=0); + AdvancedConnector(TQObject *tqparent=0); virtual ~AdvancedConnector(); class Proxy @@ -109,28 +111,28 @@ namespace XMPP int type() const; TQString host() const; - Q_UINT16 port() const; + TQ_UINT16 port() const; TQString url() const; TQString user() const; TQString pass() const; int pollInterval() const; - void setHttpConnect(const TQString &host, Q_UINT16 port); - void setHttpPoll(const TQString &host, Q_UINT16 port, const TQString &url); - void setSocks(const TQString &host, Q_UINT16 port); + void setHttpConnect(const TQString &host, TQ_UINT16 port); + void setHttpPoll(const TQString &host, TQ_UINT16 port, const TQString &url); + void setSocks(const TQString &host, TQ_UINT16 port); void setUserPass(const TQString &user, const TQString &pass); void setPollInterval(int secs); private: int t; TQString v_host, v_url; - Q_UINT16 v_port; + TQ_UINT16 v_port; TQString v_user, v_pass; int v_poll; }; void setProxy(const Proxy &proxy); - void setOptHostPort(const TQString &host, Q_UINT16 port); + void setOptHostPort(const TQString &host, TQ_UINT16 port); void setOptProbe(bool); void setOptSSL(bool); @@ -166,11 +168,12 @@ namespace XMPP void tryNextSrv(); }; - class TLSHandler : public QObject + class TLSHandler : public TQObject { Q_OBJECT + TQ_OBJECT public: - TLSHandler(TQObject *parent=0); + TLSHandler(TQObject *tqparent=0); virtual ~TLSHandler(); virtual void reset()=0; @@ -189,8 +192,9 @@ namespace XMPP class QCATLSHandler : public TLSHandler { Q_OBJECT + TQ_OBJECT public: - QCATLSHandler(QCA::TLS *parent); + QCATLSHandler(QCA::TLS *tqparent); ~QCATLSHandler(); QCA::TLS *tls() const; @@ -353,9 +357,10 @@ namespace XMPP Private *d; }; - class Stream : public QObject + class Stream : public TQObject { Q_OBJECT + TQ_OBJECT public: enum Error { ErrParse, ErrProtocol, ErrStream, ErrCustom = 10 }; enum StreamCond { @@ -370,7 +375,7 @@ namespace XMPP SystemShutdown }; - Stream(TQObject *parent=0); + Stream(TQObject *tqparent=0); virtual ~Stream(); virtual TQDomDocument & doc() const=0; @@ -404,6 +409,7 @@ namespace XMPP class ClientStream : public Stream { Q_OBJECT + TQ_OBJECT public: enum Error { ErrConnection = ErrCustom, // Connection error, ask Connector-subclass what's up @@ -450,8 +456,8 @@ namespace XMPP BindConflict // resource in-use }; - ClientStream(Connector *conn, TLSHandler *tlsHandler=0, TQObject *parent=0); - ClientStream(const TQString &host, const TQString &defRealm, ByteStream *bs, QCA::TLS *tls=0, TQObject *parent=0); // server + ClientStream(Connector *conn, TLSHandler *tlsHandler=0, TQObject *tqparent=0); + ClientStream(const TQString &host, const TQString &defRealm, ByteStream *bs, QCA::TLS *tls=0, TQObject *tqparent=0); // server ~ClientStream(); Jid jid() const; @@ -479,7 +485,7 @@ namespace XMPP void setSSFRange(int low, int high); void setOldOnly(bool); void setSASLMechanism(const TQString &s); - void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port); + void setLocalAddr(const TQHostAddress &addr, TQ_UINT16 port); // reimplemented TQDomDocument & doc() const; diff --git a/kopete/protocols/jabber/libiris/iris/jabber/all_mocs.cpp b/kopete/protocols/jabber/libiris/iris/jabber/all_mocs.cpp index b76a2837..8532fd4a 100644 --- a/kopete/protocols/jabber/libiris/iris/jabber/all_mocs.cpp +++ b/kopete/protocols/jabber/libiris/iris/jabber/all_mocs.cpp @@ -1,5 +1,5 @@ /* - * all_mocs.cpp - #include all .moc files in this directory + * all_tqmocs.cpp - #include all .tqmoc files in this directory * Copyright (C) 2004 Richard Smith * * This library is free software; you can redistribute it and/or diff --git a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp index 87743e7f..2a9553a2 100644 --- a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp +++ b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp @@ -53,11 +53,11 @@ public: JT_FT *ft; Jid peer; TQString fname; - Q_LLONG size; - Q_LLONG sent; + TQ_LLONG size; + TQ_LLONG sent; TQString desc; bool rangeSupported; - Q_LLONG rangeOffset, rangeLength, length; + TQ_LLONG rangeOffset, rangeLength, length; TQString streamType; bool needStream; TQString id, iq_id; @@ -67,8 +67,8 @@ public: bool sender; }; -FileTransfer::FileTransfer(FileTransferManager *m, TQObject *parent) -:TQObject(parent) +FileTransfer::FileTransfer(FileTransferManager *m, TQObject *tqparent) +:TQObject(tqparent) { d = new Private; d->m = m; @@ -104,7 +104,7 @@ void FileTransfer::setProxy(const Jid &proxy) d->proxy = proxy; } -void FileTransfer::sendFile(const Jid &to, const TQString &fname, Q_LLONG size, const TQString &desc) +void FileTransfer::sendFile(const Jid &to, const TQString &fname, TQ_LLONG size, const TQString &desc) { d->state = Requesting; d->peer = to; @@ -127,9 +127,9 @@ int FileTransfer::dataSizeNeeded() const int pending = d->c->bytesToWrite(); if(pending >= SENDBUFSIZE) return 0; - Q_LLONG left = d->length - (d->sent + pending); + TQ_LLONG left = d->length - (d->sent + pending); int size = SENDBUFSIZE - pending; - if((Q_LLONG)size > left) + if((TQ_LLONG)size > left) size = (int)left; return size; } @@ -137,12 +137,12 @@ int FileTransfer::dataSizeNeeded() const void FileTransfer::writeFileData(const TQByteArray &a) { int pending = d->c->bytesToWrite(); - Q_LLONG left = d->length - (d->sent + pending); + TQ_LLONG left = d->length - (d->sent + pending); if(left == 0) return; TQByteArray block; - if((Q_LLONG)a.size() > left) { + if((TQ_LLONG)a.size() > left) { block = a.copy(); block.resize((uint)left); } @@ -161,7 +161,7 @@ TQString FileTransfer::fileName() const return d->fname; } -Q_LLONG FileTransfer::fileSize() const +TQ_LLONG FileTransfer::fileSize() const { return d->size; } @@ -176,17 +176,17 @@ bool FileTransfer::rangeSupported() const return d->rangeSupported; } -Q_LLONG FileTransfer::offset() const +TQ_LLONG FileTransfer::offset() const { return d->rangeOffset; } -Q_LLONG FileTransfer::length() const +TQ_LLONG FileTransfer::length() const { return d->length; } -void FileTransfer::accept(Q_LLONG offset, Q_LLONG length) +void FileTransfer::accept(TQ_LLONG offset, TQ_LLONG length) { d->state = Connecting; d->rangeOffset = offset; @@ -275,8 +275,8 @@ void FileTransfer::s5b_connectionClosed() void FileTransfer::s5b_readyRead() { TQByteArray a = d->c->read(); - Q_LLONG need = d->length - d->sent; - if((Q_LLONG)a.size() > need) + TQ_LLONG need = d->length - d->sent; + if((TQ_LLONG)a.size() > need) a.resize((uint)need); d->sent += a.size(); if(d->sent == d->length) @@ -445,13 +445,13 @@ class JT_FT::Private public: TQDomElement iq; Jid to; - Q_LLONG size, rangeOffset, rangeLength; + TQ_LLONG size, rangeOffset, rangeLength; TQString streamType; TQStringList streamTypes; }; -JT_FT::JT_FT(Task *parent) -:Task(parent) +JT_FT::JT_FT(Task *tqparent) +:Task(tqparent) { d = new Private; } @@ -461,7 +461,7 @@ JT_FT::~JT_FT() delete d; } -void JT_FT::request(const Jid &to, const TQString &_id, const TQString &fname, Q_LLONG size, const TQString &desc, const TQStringList &streamTypes) +void JT_FT::request(const Jid &to, const TQString &_id, const TQString &fname, TQ_LLONG size, const TQString &desc, const TQStringList &streamTypes) { TQDomElement iq; d->to = to; @@ -512,12 +512,12 @@ void JT_FT::request(const Jid &to, const TQString &_id, const TQString &fname, Q d->iq = iq; } -Q_LLONG JT_FT::rangeOffset() const +TQ_LLONG JT_FT::rangeOffset() const { return d->rangeOffset; } -Q_LLONG JT_FT::rangeLength() const +TQ_LLONG JT_FT::rangeLength() const { return d->rangeLength; } @@ -546,8 +546,8 @@ bool JT_FT::take(const TQDomElement &x) TQString id = si.attribute("id"); - Q_LLONG range_offset = 0; - Q_LLONG range_length = 0; + TQ_LLONG range_offset = 0; + TQ_LLONG range_length = 0; TQDomElement file = si.elementsByTagName("file").item(0).toElement(); if(!file.isNull()) { @@ -556,11 +556,7 @@ bool JT_FT::take(const TQDomElement &x) int x; bool ok; if(range.hasAttribute("offset")) { -#if QT_VERSION >= 0x030200 x = range.attribute("offset").toLongLong(&ok); -#else - x = range.attribute("offset").toLong(&ok); -#endif if(!ok || x < 0) { setError(900, ""); return true; @@ -568,11 +564,7 @@ bool JT_FT::take(const TQDomElement &x) range_offset = x; } if(range.hasAttribute("length")) { -#if QT_VERSION >= 0x030200 x = range.attribute("length").toLongLong(&ok); -#else - x = range.attribute("length").toLong(&ok); -#endif if(!ok || x < 0) { setError(900, ""); return true; @@ -627,8 +619,8 @@ bool JT_FT::take(const TQDomElement &x) //---------------------------------------------------------------------------- // JT_PushFT //---------------------------------------------------------------------------- -JT_PushFT::JT_PushFT(Task *parent) -:Task(parent) +JT_PushFT::JT_PushFT(Task *tqparent) +:Task(tqparent) { } @@ -636,7 +628,7 @@ JT_PushFT::~JT_PushFT() { } -void JT_PushFT::respondSuccess(const Jid &to, const TQString &id, Q_LLONG rangeOffset, Q_LLONG rangeLength, const TQString &streamType) +void JT_PushFT::respondSuccess(const Jid &to, const TQString &id, TQ_LLONG rangeOffset, TQ_LLONG rangeLength, const TQString &streamType) { TQDomElement iq = createIQ(doc(), "result", to.full(), id); TQDomElement si = doc()->createElement("si"); @@ -717,11 +709,7 @@ bool JT_PushFT::take(const TQDomElement &e) } bool ok; -#if QT_VERSION >= 0x030200 - Q_LLONG size = file.attribute("size").toLongLong(&ok); -#else - Q_LLONG size = file.attribute("size").toLong(&ok); -#endif + TQ_LLONG size = file.attribute("size").toLongLong(&ok); if(!ok || size < 0) { respondError(from, id, 400, "Bad file size"); return true; diff --git a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h index 9026b478..6ad8f7ff 100644 --- a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h +++ b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h @@ -21,20 +21,17 @@ #ifndef XMPP_FILETRANSFER_H #define XMPP_FILETRANSFER_H -#include"im.h" - -#if QT_VERSION < 0x030200 -typedef long int Q_LLONG; -#endif +#include "im.h" namespace XMPP { class S5BConnection; struct FTRequest; - class FileTransfer : public QObject + class FileTransfer : public TQObject { Q_OBJECT + TQ_OBJECT public: enum { ErrReject, ErrNeg, ErrConnect, ErrProxy, ErrStream }; enum { Idle, Requesting, Connecting, WaitingForAccept, Active }; @@ -43,19 +40,19 @@ namespace XMPP void setProxy(const Jid &proxy); // send - void sendFile(const Jid &to, const TQString &fname, Q_LLONG size, const TQString &desc); - Q_LLONG offset() const; - Q_LLONG length() const; + void sendFile(const Jid &to, const TQString &fname, TQ_LLONG size, const TQString &desc); + TQ_LLONG offset() const; + TQ_LLONG length() const; int dataSizeNeeded() const; void writeFileData(const TQByteArray &a); // receive Jid peer() const; TQString fileName() const; - Q_LLONG fileSize() const; + TQ_LLONG fileSize() const; TQString description() const; bool rangeSupported() const; - void accept(Q_LLONG offset=0, Q_LLONG length=0); + void accept(TQ_LLONG offset=0, TQ_LLONG length=0); // both void close(); // reject, or stop sending/receiving @@ -84,14 +81,15 @@ namespace XMPP void reset(); friend class FileTransferManager; - FileTransfer(FileTransferManager *, TQObject *parent=0); + FileTransfer(FileTransferManager *, TQObject *tqparent=0); void man_waitForAccept(const FTRequest &req); void takeConnection(S5BConnection *c); }; - class FileTransferManager : public QObject + class FileTransferManager : public TQObject { Q_OBJECT + TQ_OBJECT public: FileTransferManager(Client *); ~FileTransferManager(); @@ -123,13 +121,14 @@ namespace XMPP class JT_FT : public Task { Q_OBJECT + TQ_OBJECT public: - JT_FT(Task *parent); + JT_FT(Task *tqparent); ~JT_FT(); - void request(const Jid &to, const TQString &id, const TQString &fname, Q_LLONG size, const TQString &desc, const TQStringList &streamTypes); - Q_LLONG rangeOffset() const; - Q_LLONG rangeLength() const; + void request(const Jid &to, const TQString &id, const TQString &fname, TQ_LLONG size, const TQString &desc, const TQStringList &streamTypes); + TQ_LLONG rangeOffset() const; + TQ_LLONG rangeLength() const; TQString streamType() const; void onGo(); @@ -145,7 +144,7 @@ namespace XMPP Jid from; TQString iq_id, id; TQString fname; - Q_LLONG size; + TQ_LLONG size; TQString desc; bool rangeSupported; TQStringList streamTypes; @@ -153,11 +152,12 @@ namespace XMPP class JT_PushFT : public Task { Q_OBJECT + TQ_OBJECT public: - JT_PushFT(Task *parent); + JT_PushFT(Task *tqparent); ~JT_PushFT(); - void respondSuccess(const Jid &to, const TQString &id, Q_LLONG rangeOffset, Q_LLONG rangeLength, const TQString &streamType); + void respondSuccess(const Jid &to, const TQString &id, TQ_LLONG rangeOffset, TQ_LLONG rangeLength, const TQString &streamType); void respondError(const Jid &to, const TQString &id, int code, const TQString &str); bool take(const TQDomElement &); diff --git a/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp b/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp index df753925..1914ad26 100644 --- a/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp +++ b/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp @@ -61,9 +61,10 @@ static bool haveHost(const StreamHostList &list, const Jid &j) return false; } -class S5BManager::Item : public QObject +class S5BManager::Item : public TQObject { Q_OBJECT + TQ_OBJECT public: enum { Idle, Initiator, Target, Active }; enum { ErrRefused, ErrConnect, ErrWrongHost, ErrProxy }; @@ -184,8 +185,8 @@ public: static int id_conn = 0; static int num_conn = 0; -S5BConnection::S5BConnection(S5BManager *m, TQObject *parent) -:ByteStream(parent) +S5BConnection::S5BConnection(S5BManager *m, TQObject *tqparent) +:ByteStream(tqparent) { d = new Private; d->m = m; @@ -574,15 +575,15 @@ public: JT_PushS5B *ps; }; -S5BManager::S5BManager(Client *parent) -:TQObject(parent) +S5BManager::S5BManager(Client *tqparent) +:TQObject(tqparent) { // S5B needs SHA1 if(!QCA::isSupported(QCA::CAP_SHA1)) QCA::insertProvider(createProviderHash()); d = new Private; - d->client = parent; + d->client = tqparent; d->serv = 0; d->activeList.setAutoDelete(true); @@ -1745,9 +1746,10 @@ void S5BManager::Item::finished() //---------------------------------------------------------------------------- // S5BConnector //---------------------------------------------------------------------------- -class S5BConnector::Item : public QObject +class S5BConnector::Item : public TQObject { Q_OBJECT + TQ_OBJECT public: SocksClient *client; SocksUDP *client_udp; @@ -1863,8 +1865,8 @@ public: TQTimer t; }; -S5BConnector::S5BConnector(TQObject *parent) -:TQObject(parent) +S5BConnector::S5BConnector(TQObject *tqparent) +:TQObject(tqparent) { d = new Private; d->active = 0; @@ -1976,9 +1978,10 @@ void S5BConnector::man_udpSuccess(const Jid &streamHost) //---------------------------------------------------------------------------- // S5BServer //---------------------------------------------------------------------------- -class S5BServer::Item : public QObject +class S5BServer::Item : public TQObject { Q_OBJECT + TQ_OBJECT public: SocksClient *client; TQString host; @@ -2051,8 +2054,8 @@ public: TQPtrList<Item> itemList; }; -S5BServer::S5BServer(TQObject *parent) -:TQObject(parent) +S5BServer::S5BServer(TQObject *tqparent) +:TQObject(tqparent) { d = new Private; d->itemList.setAutoDelete(true); @@ -2192,8 +2195,8 @@ public: TQTimer t; }; -JT_S5B::JT_S5B(Task *parent) -:Task(parent) +JT_S5B::JT_S5B(Task *tqparent) +:Task(tqparent) { d = new Private; d->mode = -1; @@ -2353,8 +2356,8 @@ StreamHost JT_S5B::proxyInfo() const //---------------------------------------------------------------------------- // JT_PushS5B //---------------------------------------------------------------------------- -JT_PushS5B::JT_PushS5B(Task *parent) -:Task(parent) +JT_PushS5B::JT_PushS5B(Task *tqparent) +:Task(tqparent) { } diff --git a/kopete/protocols/jabber/libiris/iris/jabber/s5b.h b/kopete/protocols/jabber/libiris/iris/jabber/s5b.h index d8c301c1..d9818503 100644 --- a/kopete/protocols/jabber/libiris/iris/jabber/s5b.h +++ b/kopete/protocols/jabber/libiris/iris/jabber/s5b.h @@ -60,6 +60,7 @@ namespace XMPP class S5BConnection : public ByteStream { Q_OBJECT + TQ_OBJECT public: enum Mode { Stream, Datagram }; enum Error { ErrRefused, ErrConnect, ErrProxy, ErrSocket }; @@ -124,12 +125,13 @@ namespace XMPP void man_clientReady(SocksClient *, SocksUDP *); void man_udpReady(const TQByteArray &buf); void man_failed(int); - S5BConnection(S5BManager *, TQObject *parent=0); + S5BConnection(S5BManager *, TQObject *tqparent=0); }; - class S5BManager : public QObject + class S5BManager : public TQObject { Q_OBJECT + TQ_OBJECT public: S5BManager(Client *); ~S5BManager(); @@ -196,11 +198,12 @@ namespace XMPP void doActivate(const Jid &peer, const TQString &sid, const Jid &streamHost); }; - class S5BConnector : public QObject + class S5BConnector : public TQObject { Q_OBJECT + TQ_OBJECT public: - S5BConnector(TQObject *parent=0); + S5BConnector(TQObject *tqparent=0); ~S5BConnector(); void reset(); @@ -227,9 +230,10 @@ namespace XMPP }; // listens on a port for serving - class S5BServer : public QObject + class S5BServer : public TQObject { Q_OBJECT + TQ_OBJECT public: S5BServer(TQObject *par=0); ~S5BServer(); @@ -263,6 +267,7 @@ namespace XMPP class JT_S5B : public Task { Q_OBJECT + TQ_OBJECT public: JT_S5B(Task *); ~JT_S5B(); @@ -297,6 +302,7 @@ namespace XMPP class JT_PushS5B : public Task { Q_OBJECT + TQ_OBJECT public: JT_PushS5B(Task *); ~JT_PushS5B(); diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp index 2ca012c1..6bf15aa2 100644 --- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp +++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp @@ -346,11 +346,11 @@ public: JT_IBB *ibb; }; -IBBManager::IBBManager(Client *parent) -:TQObject(parent) +IBBManager::IBBManager(Client *tqparent) +:TQObject(tqparent) { d = new Private; - d->client = parent; + d->client = tqparent; d->ibb = new JT_IBB(d->client->rootTask(), true); connect(d->ibb, TQT_SIGNAL(incomingRequest(const Jid &, const TQString &, const TQDomElement &)), TQT_SLOT(ibb_incomingRequest(const Jid &, const TQString &, const TQDomElement &))); @@ -479,8 +479,8 @@ public: TQString streamid; }; -JT_IBB::JT_IBB(Task *parent, bool serve) -:Task(parent) +JT_IBB::JT_IBB(Task *tqparent, bool serve) +:Task(tqparent) { d = new Private; d->serve = serve; diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h index e5a0ed93..27df2465 100644 --- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h +++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h @@ -37,6 +37,7 @@ namespace XMPP class IBBConnection : public ByteStream { Q_OBJECT + TQ_OBJECT public: enum { ErrRequest, ErrData }; enum { Idle, Requesting, WaitingForAccept, Active }; @@ -78,9 +79,10 @@ namespace XMPP typedef TQPtrList<IBBConnection> IBBConnectionList; typedef TQPtrListIterator<IBBConnection> IBBConnectionListIt; - class IBBManager : public QObject + class IBBManager : public TQObject { Q_OBJECT + TQ_OBJECT public: IBBManager(Client *); ~IBBManager(); @@ -114,6 +116,7 @@ namespace XMPP class JT_IBB : public Task { Q_OBJECT + TQ_OBJECT public: enum { ModeRequest, ModeSendData }; JT_IBB(Task *, bool serve=false); diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h index 40d3d4eb..a10547ff 100644 --- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h +++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h @@ -35,9 +35,10 @@ namespace XMPP { class Client; - class JidLink : public QObject + class JidLink : public TQObject { Q_OBJECT + TQ_OBJECT public: enum { None, DTCP, IBB }; enum { Idle, Connecting, WaitingForAccept, Active }; @@ -94,9 +95,10 @@ namespace XMPP }; // the job of JidLinkManager is to keep track of streams and properly shut them down - class JidLinkManager : public QObject + class JidLinkManager : public TQObject { Q_OBJECT + TQ_OBJECT public: JidLinkManager(Client *); ~JidLinkManager(); 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 diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp index c78875bc..9d56467c 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp @@ -34,8 +34,8 @@ //! Client, you will need to manually invoke Tasks. Fortunately, the //! process is very simple. //! -//! The entire Task system is heavily founded on Qt. All Tasks have a parent, -//! except for the root Task, and are considered QObjects. By using Qt's RTTI +//! The entire Task system is heavily founded on TQt. All Tasks have a tqparent, +//! except for the root Task, and are considered TQObjects. By using TQt's RTTI //! facilities (TQObject::sender(), TQObject::isA(), etc), you can use a //! "fire and forget" approach with Tasks. //! @@ -96,7 +96,7 @@ using namespace Jabber;*/ -#ifdef Q_WS_WIN +#ifdef TQ_WS_WIN #define vsnprintf _vsnprintf #endif @@ -191,7 +191,7 @@ void Client::connectToServer(ClientStream *s, const Jid &j, bool auth) //connect(d->stream, TQT_SIGNAL(connected()), TQT_SLOT(streamConnected())); //connect(d->stream, TQT_SIGNAL(handshaken()), TQT_SLOT(streamHandshaken())); connect(d->stream, TQT_SIGNAL(error(int)), TQT_SLOT(streamError(int))); - //connect(d->stream, TQT_SIGNAL(sslCertificateReady(const QSSLCert &)), TQT_SLOT(streamSSLCertificateReady(const QSSLCert &))); + //connect(d->stream, TQT_SIGNAL(sslCertificateReady(const TQSSLCert &)), TQT_SLOT(streamSSLCertificateReady(const TQSSLCert &))); connect(d->stream, TQT_SIGNAL(readyRead()), TQT_SLOT(streamReadyRead())); //connect(d->stream, TQT_SIGNAL(closeFinished()), TQT_SLOT(streamCloseFinished())); connect(d->stream, TQT_SIGNAL(incomingXml(const TQString &)), TQT_SLOT(streamIncomingXml(const TQString &))); @@ -208,13 +208,13 @@ void Client::start(const TQString &host, const TQString &user, const TQString &p d->pass = pass; d->resource = _resource; - Status stat; + tqStatus stat; stat.setIsAvailable(false); d->resourceList += Resource(resource(), stat); JT_PushPresence *pp = new JT_PushPresence(rootTask()); connect(pp, TQT_SIGNAL(subscription(const Jid &, const TQString &)), TQT_SLOT(ppSubscription(const Jid &, const TQString &))); - connect(pp, TQT_SIGNAL(presence(const Jid &, const Status &)), TQT_SLOT(ppPresence(const Jid &, const Status &))); + connect(pp, TQT_SIGNAL(presence(const Jid &, const tqStatus &)), TQT_SLOT(ppPresence(const Jid &, const tqStatus &))); JT_PushMessage *pm = new JT_PushMessage(rootTask()); connect(pm, TQT_SIGNAL(message(const Message &)), TQT_SLOT(pmMessage(const Message &))); @@ -266,7 +266,7 @@ bool Client::isActive() const return d->active; } -void Client::groupChatChangeNick(const TQString &host, const TQString &room, const TQString &nick, const Status &_s) +void Client::groupChatChangeNick(const TQString &host, const TQString &room, const TQString &nick, const tqStatus &_s) { Jid jid(room + "@" + host + "/" + nick); for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) { @@ -274,7 +274,7 @@ void Client::groupChatChangeNick(const TQString &host, const TQString &room, con if(i.j.compare(jid, false)) { i.j = jid; - Status s = _s; + tqStatus s = _s; s.setIsAvailable(true); JT_Presence *j = new JT_Presence(rootTask()); @@ -302,14 +302,14 @@ bool Client::groupChatJoin(const TQString &host, const TQString &room, const TQS ++it; } - debug(TQString("Client: Joined: [%1]\n").arg(jid.full())); + debug(TQString("Client: Joined: [%1]\n").tqarg(jid.full())); GroupChat i; i.j = jid; i.status = GroupChat::Connecting; d->groupChatList += i; JT_Presence *j = new JT_Presence(rootTask()); - j->pres(jid, Status()); + j->pres(jid, tqStatus()); j->go(true); return true; @@ -331,20 +331,20 @@ bool Client::groupChatJoin(const TQString &host, const TQString &room, const TQS ++it; } - debug(TQString("Client: Joined: [%1]\n").arg(jid.full())); + debug(TQString("Client: Joined: [%1]\n").tqarg(jid.full())); GroupChat i; i.j = jid; i.status = GroupChat::Connecting; d->groupChatList += i; JT_MucPresence *j = new JT_MucPresence(rootTask()); - j->pres(jid, Status(), password); + j->pres(jid, tqStatus(), password); j->go(true); return true; } -void Client::groupChatSetStatus(const TQString &host, const TQString &room, const Status &_s) +void Client::groupChatSettqStatus(const TQString &host, const TQString &room, const tqStatus &_s) { Jid jid(room + "@" + host); bool found = false; @@ -359,7 +359,7 @@ void Client::groupChatSetStatus(const TQString &host, const TQString &room, cons if(!found) return; - Status s = _s; + tqStatus s = _s; s.setIsAvailable(true); JT_Presence *j = new JT_Presence(rootTask()); @@ -377,10 +377,10 @@ void Client::groupChatLeave(const TQString &host, const TQString &room) continue; i.status = GroupChat::Closing; - debug(TQString("Client: Leaving: [%1]\n").arg(i.j.full())); + debug(TQString("Client: Leaving: [%1]\n").tqarg(i.j.full())); JT_Presence *j = new JT_Presence(rootTask()); - Status s; + tqStatus s; s.setIsAvailable(false); j->pres(i.j, s); j->go(true); @@ -409,7 +409,7 @@ void Client::close(bool) i.status = GroupChat::Closing; JT_Presence *j = new JT_Presence(rootTask()); - Status s; + tqStatus s; s.setIsAvailable(false); j->pres(i.j, s); j->go(true); @@ -457,7 +457,7 @@ void Client::streamError(int) //} } -/*void Client::streamSSLCertificateReady(const QSSLCert &cert) +/*void Client::streamSSLCertificateReady(const TQSSLCert &cert) { sslCertReady(cert); } @@ -469,10 +469,10 @@ void Client::streamCloseFinished() static TQDomElement oldStyleNS(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; @@ -492,7 +492,7 @@ static TQDomElement oldStyleNS(const TQDomElement &e) if(!noShowNS) i.setAttribute("xmlns", e.namespaceURI()); - // copy children + // copy tqchildren TQDomNodeList nl = e.childNodes(); for(x = 0; x < nl.count(); ++x) { TQDomNode n = nl.item(x); @@ -513,7 +513,7 @@ void Client::streamReadyRead() Stanza s = d->stream->read(); TQString out = s.toString(); - debug(TQString("Client: incoming: [\n%1]\n").arg(out)); + debug(TQString("Client: incoming: [\n%1]\n").tqarg(out)); xmlIncoming(out); TQDomElement x = oldStyleNS(s.element()); @@ -588,7 +588,7 @@ static TQDomElement addCorrectNS(const TQDomElement &e) // find closest xmlns TQDomNode n = e; while(!n.isNull() && !n.toElement().hasAttribute("xmlns")) - n = n.parentNode(); + n = n.tqparentNode(); TQString ns; if(n.isNull() || !n.toElement().hasAttribute("xmlns")) ns = "jabber:client"; @@ -606,7 +606,7 @@ static TQDomElement addCorrectNS(const TQDomElement &e) i.setAttributeNodeNS(a.cloneNode().toAttr()); } - // copy children + // copy tqchildren TQDomNodeList nl = e.childNodes(); for(x = 0; x < nl.count(); ++x) { TQDomNode n = nl.item(x); @@ -630,7 +630,7 @@ void Client::send(const TQDomElement &x) //x.save(ts, 0); //TQString out = Stream::xmlToString(x); - //debug(TQString("Client: outgoing: [\n%1]\n").arg(out)); + //debug(TQString("Client: outgoing: [\n%1]\n").tqarg(out)); //xmlOutgoing(out); TQDomElement e = addCorrectNS(x); @@ -641,7 +641,7 @@ void Client::send(const TQDomElement &x) } TQString out = s.toString(); - debug(TQString("Client: outgoing: [\n%1]\n").arg(out)); + debug(TQString("Client: outgoing: [\n%1]\n").tqarg(out)); xmlOutgoing(out); //printf("x[%s] x2[%s] s[%s]\n", Stream::xmlToString(x).latin1(), Stream::xmlToString(e).latin1(), s.toString().latin1()); @@ -653,7 +653,7 @@ void Client::send(const TQString &str) if(!d->stream) return; - debug(TQString("Client: outgoing: [\n%1]\n").arg(str)); + debug(TQString("Client: outgoing: [\n%1]\n").tqarg(str)); xmlOutgoing(str); static_cast<ClientStream*>(d->stream)->writeDirect(str); } @@ -712,12 +712,12 @@ void Client::ppSubscription(const Jid &j, const TQString &s) subscription(j, s); } -void Client::ppPresence(const Jid &j, const Status &s) +void Client::ppPresence(const Jid &j, const tqStatus &s) { if(s.isAvailable()) - debug(TQString("Client: %1 is available.\n").arg(j.full())); + debug(TQString("Client: %1 is available.\n").tqarg(j.full())); else - debug(TQString("Client: %1 is unavailable.\n").arg(j.full())); + debug(TQString("Client: %1 is unavailable.\n").tqarg(j.full())); for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) { GroupChat &i = *it; @@ -725,7 +725,7 @@ void Client::ppPresence(const Jid &j, const Status &s) if(i.j.compare(j, false)) { bool us = (i.j.resource() == j.resource() || j.resource().isEmpty()) ? true: false; - debug(TQString("for groupchat i=[%1] pres=[%2], [us=%3].\n").arg(i.j.full()).arg(j.full()).arg(us)); + debug(TQString("for groupchat i=[%1] pres=[%2], [us=%3].\n").tqarg(i.j.full()).tqarg(j.full()).tqarg(us)); switch(i.status) { case GroupChat::Connecting: if(us && s.hasError()) { @@ -788,16 +788,16 @@ void Client::ppPresence(const Jid &j, const Status &s) } } -void Client::updateSelfPresence(const Jid &j, const Status &s) +void Client::updateSelfPresence(const Jid &j, const tqStatus &s) { - ResourceList::Iterator rit = d->resourceList.find(j.resource()); + ResourceList::Iterator rit = d->resourceList.tqfind(j.resource()); bool found = (rit == d->resourceList.end()) ? false: true; // unavailable? remove the resource if(!s.isAvailable()) { if(found) { - debug(TQString("Client: Removing self resource: name=[%1]\n").arg(j.resource())); - (*rit).setStatus(s); + debug(TQString("Client: Removing self resource: name=[%1]\n").tqarg(j.resource())); + (*rit).settqStatus(s); resourceUnavailable(j, *rit); d->resourceList.remove(rit); } @@ -808,31 +808,31 @@ void Client::updateSelfPresence(const Jid &j, const Status &s) if(!found) { r = Resource(j.resource(), s); d->resourceList += r; - debug(TQString("Client: Adding self resource: name=[%1]\n").arg(j.resource())); + debug(TQString("Client: Adding self resource: name=[%1]\n").tqarg(j.resource())); } else { - (*rit).setStatus(s); + (*rit).settqStatus(s); r = *rit; - debug(TQString("Client: Updating self resource: name=[%1]\n").arg(j.resource())); + debug(TQString("Client: Updating self resource: name=[%1]\n").tqarg(j.resource())); } resourceAvailable(j, r); } } -void Client::updatePresence(LiveRosterItem *i, const Jid &j, const Status &s) +void Client::updatePresence(LiveRosterItem *i, const Jid &j, const tqStatus &s) { - ResourceList::Iterator rit = i->resourceList().find(j.resource()); + ResourceList::Iterator rit = i->resourceList().tqfind(j.resource()); bool found = (rit == i->resourceList().end()) ? false: true; // unavailable? remove the resource if(!s.isAvailable()) { if(found) { - (*rit).setStatus(s); - debug(TQString("Client: Removing resource from [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource())); + (*rit).settqStatus(s); + debug(TQString("Client: Removing resource from [%1]: name=[%2]\n").tqarg(i->jid().full()).tqarg(j.resource())); resourceUnavailable(j, *rit); i->resourceList().remove(rit); - i->setLastUnavailableStatus(s); + i->setLastUnavailabletqStatus(s); } } // available? add/update the resource @@ -841,12 +841,12 @@ void Client::updatePresence(LiveRosterItem *i, const Jid &j, const Status &s) if(!found) { r = Resource(j.resource(), s); i->resourceList() += r; - debug(TQString("Client: Adding resource to [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource())); + debug(TQString("Client: Adding resource to [%1]: name=[%2]\n").tqarg(i->jid().full()).tqarg(j.resource())); } else { - (*rit).setStatus(s); + (*rit).settqStatus(s); r = *rit; - debug(TQString("Client: Updating resource to [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource())); + debug(TQString("Client: Updating resource to [%1]: name=[%2]\n").tqarg(i->jid().full()).tqarg(j.resource())); } resourceAvailable(j, r); @@ -855,7 +855,7 @@ void Client::updatePresence(LiveRosterItem *i, const Jid &j, const Status &s) void Client::pmMessage(const Message &m) { - debug(TQString("Client: Message from %1\n").arg(m.from().full())); + debug(TQString("Client: Message from %1\n").tqarg(m.from().full())); if(m.type() == "groupchat") { for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) { @@ -950,7 +950,7 @@ void Client::importRosterItem(const RosterItem &item) // Remove if(item.subscription().type() == Subscription::Remove) { - LiveRoster::Iterator it = d->roster.find(item.jid()); + LiveRoster::Iterator it = d->roster.tqfind(item.jid()); if(it != d->roster.end()) { rosterItemRemoved(*it); d->roster.remove(it); @@ -959,7 +959,7 @@ void Client::importRosterItem(const RosterItem &item) } // Add/Update else { - LiveRoster::Iterator it = d->roster.find(item.jid()); + LiveRoster::Iterator it = d->roster.tqfind(item.jid()); if(it != d->roster.end()) { LiveRosterItem &i = *it; i.setFlagForDelete(false); @@ -993,7 +993,7 @@ void Client::sendSubscription(const Jid &jid, const TQString &type) j->go(true); } -void Client::setPresence(const Status &s) +void Client::setPresence(const tqStatus &s) { JT_Presence *j = new JT_Presence(rootTask()); j->pres(s); @@ -1001,9 +1001,9 @@ void Client::setPresence(const Status &s) // update our resourceList ppPresence(jid(), s); - //ResourceList::Iterator rit = d->resourceList.find(resource()); + //ResourceList::Iterator rit = d->resourceList.tqfind(resource()); //Resource &r = *rit; - //r.setStatus(s); + //r.settqStatus(s); } TQString Client::OSName() const @@ -1097,7 +1097,7 @@ void Client::addExtension(const TQString& ext, const Features& features) void Client::removeExtension(const TQString& ext) { - if (d->extension_features.contains(ext)) { + if (d->extension_features.tqcontains(ext)) { d->extension_features.remove(ext); d->capsExt = extensions().join(" "); } @@ -1155,22 +1155,22 @@ public: bool done; }; -Task::Task(Task *parent) -:TQObject(parent) +Task::Task(Task *tqparent) +:TQObject(tqparent) { init(); - d->client = parent->client(); + d->client = tqparent->client(); d->id = client()->genUniqueId(); connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } -Task::Task(Client *parent, bool) +Task::Task(Client *tqparent, bool) :TQObject(0) { init(); - d->client = parent; + d->client = tqparent; connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } @@ -1189,9 +1189,9 @@ void Task::init() d->done = false; } -Task *Task::parent() const +Task *Task::tqparent() const { - return (Task *)TQObject::parent(); + return (Task *)TQObject::tqparent(); } Client *Task::client() const @@ -1233,12 +1233,12 @@ void Task::go(bool autoDelete) bool Task::take(const TQDomElement &x) { - const TQObjectList *p = children(); - if(!p) + const TQObjectList p = childrenListObject(); + if(p.isEmpty()) return false; // pass along the xml - TQObjectListIt it(*p); + TQObjectListIt it(p); Task *t; for(; it.current(); ++it) { TQObject *obj = it.current(); @@ -1362,7 +1362,7 @@ void Task::debug(const char *fmt, ...) void Task::debug(const TQString &str) { - client()->debug(TQString("%1: ").arg(className()) + str); + client()->debug(TQString("%1: ").tqarg(className()) + str); } bool Task::iqVerify(const TQDomElement &x, const Jid &to, const TQString &id, const TQString &xmlns) @@ -1461,9 +1461,9 @@ bool LiveRosterItem::isAvailable() const return false; } -const Status & LiveRosterItem::lastUnavailableStatus() const +const tqStatus & LiveRosterItem::lastUnavailabletqStatus() const { - return v_lastUnavailableStatus; + return v_lastUnavailabletqStatus; } bool LiveRosterItem::flagForDelete() const @@ -1471,9 +1471,9 @@ bool LiveRosterItem::flagForDelete() const return v_flagForDelete; } -void LiveRosterItem::setLastUnavailableStatus(const Status &s) +void LiveRosterItem::setLastUnavailabletqStatus(const tqStatus &s) { - v_lastUnavailableStatus = s; + v_lastUnavailabletqStatus = s; } void LiveRosterItem::setFlagForDelete(bool b) @@ -1499,7 +1499,7 @@ void LiveRoster::flagAllForDelete() (*it).setFlagForDelete(true); } -LiveRoster::Iterator LiveRoster::find(const Jid &j, bool compareRes) +LiveRoster::Iterator LiveRoster::tqfind(const Jid &j, bool compareRes) { Iterator it; for(it = begin(); it != end(); ++it) { @@ -1509,7 +1509,7 @@ LiveRoster::Iterator LiveRoster::find(const Jid &j, bool compareRes) return it; } -LiveRoster::ConstIterator LiveRoster::find(const Jid &j, bool compareRes) const +LiveRoster::ConstIterator LiveRoster::tqfind(const Jid &j, bool compareRes) const { ConstIterator it; for(it = begin(); it != end(); ++it) { diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp index f2fcf7c9..fb9de2e8 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp @@ -274,7 +274,7 @@ TQString Message::subject(const TQString &lang) const //! This function will return a plain text or the Richtext version if it //! it exists. //! \param rich - Returns richtext if true and plain text if false. (default: false) -//! \note Richtext is in Qt's richtext format and not in xhtml. +//! \note Richtext is in TQt's richtext format and not in xhtml. TQString Message::body(const TQString &lang) const { return d->body[lang]; @@ -295,7 +295,7 @@ Stanza::Error Message::error() const return d->error; } -//! \brief Set receivers information +//! \brief Set tqreceivers information //! //! \param to - Receivers Jabber id void Message::setTo(const Jid &j) @@ -421,12 +421,12 @@ bool Message::containsEvents() const bool Message::containsEvent(MsgEvent e) const { - return d->eventList.contains(e); + return d->eventList.tqcontains(e); } void Message::addEvent(MsgEvent e) { - if (!d->eventList.contains(e)) { + if (!d->eventList.tqcontains(e)) { if (e == CancelEvent || containsEvent(CancelEvent)) d->eventList.clear(); // Reset list d->eventList += e; @@ -503,17 +503,17 @@ Stanza Message::toStanza(Stream *stream) const } } if ( !d->xHTMLBody.isEmpty()) { - TQDomElement parent = s.createElement(s.xhtmlImNS(), "html"); + TQDomElement tqparent = s.createElement(s.xhtmlImNS(), "html"); for(it = d->xHTMLBody.begin(); it != d->xHTMLBody.end(); ++it) { const TQString &str = it.data(); if(!str.isEmpty()) { TQDomElement child = s.createXHTMLElement(str); if(!it.key().isEmpty()) child.setAttributeNS(NS_XML, "xml:lang", it.key()); - parent.appendChild(child); + tqparent.appendChild(child); } } - s.appendChild(parent); + s.appendChild(tqparent); } if(d->type == "error") s.setError(d->error); @@ -658,7 +658,7 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset) if(e.tagName() == "active") { //like in JEP-0022 we let the client know that we can receive ComposingEvent - // (we can do that according to §4.6 of the JEP-0085) + // (we can do that according to �4.6 of the JEP-0085) d->eventList += ComposingEvent; d->eventList += InactiveEvent; d->eventList += GoneEvent; @@ -697,7 +697,7 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset) d->spooled = true; } else { - d->timeStamp = TQDateTime::currentDateTime(); + d->timeStamp = TQDateTime::tqcurrentDateTime(); d->spooled = false; } @@ -801,100 +801,100 @@ bool Subscription::fromString(const TQString &s) //--------------------------------------------------------------------------- -// Status +// tqStatus //--------------------------------------------------------------------------- -Status::Status(const TQString &show, const TQString &status, int priority, bool available) +tqStatus::tqStatus(const TQString &show, const TQString &status, int priority, bool available) { v_isAvailable = available; v_show = show; v_status = status; v_priority = priority; - v_timeStamp = TQDateTime::currentDateTime(); + v_timeStamp = TQDateTime::tqcurrentDateTime(); v_isInvisible = false; ecode = -1; } -Status::~Status() +tqStatus::~tqStatus() { } -bool Status::hasError() const +bool tqStatus::hasError() const { return (ecode != -1); } -void Status::setError(int code, const TQString &str) +void tqStatus::setError(int code, const TQString &str) { ecode = code; estr = str; } -void Status::setIsAvailable(bool available) +void tqStatus::setIsAvailable(bool available) { v_isAvailable = available; } -void Status::setIsInvisible(bool invisible) +void tqStatus::setIsInvisible(bool invisible) { v_isInvisible = invisible; } -void Status::setPriority(int x) +void tqStatus::setPriority(int x) { v_priority = x; } -void Status::setShow(const TQString & _show) +void tqStatus::setShow(const TQString & _show) { v_show = _show; } -void Status::setStatus(const TQString & _status) +void tqStatus::settqStatus(const TQString & _status) { v_status = _status; } -void Status::setTimeStamp(const TQDateTime & _timestamp) +void tqStatus::setTimeStamp(const TQDateTime & _timestamp) { v_timeStamp = _timestamp; } -void Status::setKeyID(const TQString &key) +void tqStatus::setKeyID(const TQString &key) { v_key = key; } -void Status::setXSigned(const TQString &s) +void tqStatus::setXSigned(const TQString &s) { v_xsigned = s; } -void Status::setSongTitle(const TQString & _songtitle) +void tqStatus::setSongTitle(const TQString & _songtitle) { v_songTitle = _songtitle; } -void Status::setCapsNode(const TQString & _capsNode) +void tqStatus::setCapsNode(const TQString & _capsNode) { v_capsNode = _capsNode; } -void Status::setCapsVersion(const TQString & _capsVersion) +void tqStatus::setCapsVersion(const TQString & _capsVersion) { v_capsVersion = _capsVersion; } -void Status::setCapsExt(const TQString & _capsExt) +void tqStatus::setCapsExt(const TQString & _capsExt) { v_capsExt = _capsExt; } -bool Status::isAvailable() const +bool tqStatus::isAvailable() const { return v_isAvailable; } -bool Status::isAway() const +bool tqStatus::isAway() const { if(v_show == "away" || v_show == "xa" || v_show == "dnd") return true; @@ -902,66 +902,66 @@ bool Status::isAway() const return false; } -bool Status::isInvisible() const +bool tqStatus::isInvisible() const { return v_isInvisible; } -int Status::priority() const +int tqStatus::priority() const { return v_priority; } -const TQString & Status::show() const +const TQString & tqStatus::show() const { return v_show; } -const TQString & Status::status() const +const TQString & tqStatus::status() const { return v_status; } -TQDateTime Status::timeStamp() const +TQDateTime tqStatus::timeStamp() const { return v_timeStamp; } -const TQString & Status::keyID() const +const TQString & tqStatus::keyID() const { return v_key; } -const TQString & Status::xsigned() const +const TQString & tqStatus::xsigned() const { return v_xsigned; } -const TQString & Status::songTitle() const +const TQString & tqStatus::songTitle() const { return v_songTitle; } -const TQString & Status::capsNode() const +const TQString & tqStatus::capsNode() const { return v_capsNode; } -const TQString & Status::capsVersion() const +const TQString & tqStatus::capsVersion() const { return v_capsVersion; } -const TQString & Status::capsExt() const +const TQString & tqStatus::capsExt() const { return v_capsExt; } -int Status::errorCode() const +int tqStatus::errorCode() const { return ecode; } -const TQString & Status::errorString() const +const TQString & tqStatus::errorString() const { return estr; } @@ -970,7 +970,7 @@ const TQString & Status::errorString() const //--------------------------------------------------------------------------- // Resource //--------------------------------------------------------------------------- -Resource::Resource(const TQString &name, const Status &stat) +Resource::Resource(const TQString &name, const tqStatus &stat) { v_name = name; v_status = stat; @@ -990,7 +990,7 @@ int Resource::priority() const return v_status.priority(); } -const Status & Resource::status() const +const tqStatus & Resource::status() const { return v_status; } @@ -1000,7 +1000,7 @@ void Resource::setName(const TQString & _name) v_name = _name; } -void Resource::setStatus(const Status & _status) +void Resource::settqStatus(const tqStatus & _status) { v_status = _status; } @@ -1018,10 +1018,10 @@ ResourceList::~ResourceList() { } -ResourceList::Iterator ResourceList::find(const TQString & _find) +ResourceList::Iterator ResourceList::tqfind(const TQString & _tqfind) { for(ResourceList::Iterator it = begin(); it != end(); ++it) { - if((*it).name() == _find) + if((*it).name() == _tqfind) return it; } @@ -1040,10 +1040,10 @@ ResourceList::Iterator ResourceList::priority() return highest; } -ResourceList::ConstIterator ResourceList::find(const TQString & _find) const +ResourceList::ConstIterator ResourceList::tqfind(const TQString & _tqfind) const { for(ResourceList::ConstIterator it = begin(); it != end(); ++it) { - if((*it).name() == _find) + if((*it).name() == _tqfind) return it; } @@ -1222,7 +1222,7 @@ Roster::~Roster() { } -Roster::Iterator Roster::find(const Jid &j) +Roster::Iterator Roster::tqfind(const Jid &j) { for(Roster::Iterator it = begin(); it != end(); ++it) { if((*it).jid().compare(j)) @@ -1232,7 +1232,7 @@ Roster::Iterator Roster::find(const Jid &j) return end(); } -Roster::ConstIterator Roster::find(const Jid &j) const +Roster::ConstIterator Roster::tqfind(const Jid &j) const { for(Roster::ConstIterator it = begin(); it != end(); ++it) { if((*it).jid().compare(j)) @@ -1512,7 +1512,7 @@ bool Features::test(const TQStringList &ns) const { TQStringList::ConstIterator it = ns.begin(); for ( ; it != ns.end(); ++it) - if ( _list.find( *it ) != _list.end() ) + if ( _list.tqfind( *it ) != _list.end() ) return true; return false; @@ -1597,12 +1597,13 @@ bool Features::haveVCard() const // custom Psi acitons #define FID_ADD "psi:add" -class Features::FeatureName : public QObject +class Features::FeatureName : public TQObject { Q_OBJECT + TQ_OBJECT public: FeatureName() - : TQObject(qApp) + : TQObject(tqApp) { id2s[FID_Invalid] = tr("ERROR: Incorrect usage of Features class"); id2s[FID_None] = tr("None"); @@ -1866,7 +1867,7 @@ TQString DiscoItem::action2string(Action a) else if ( a == Remove ) s = "remove"; else - s = TQString::null; + s = TQString(); return s; } diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp index 9e2fc061..2d13db79 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp @@ -35,9 +35,9 @@ using namespace XMPP; static TQString lineEncode(TQString str) { - str.replace(TQRegExp("\\\\"), "\\\\"); // backslash to double-backslash - str.replace(TQRegExp("\\|"), "\\p"); // pipe to \p - str.replace(TQRegExp("\n"), "\\n"); // newline to \n + str.tqreplace(TQRegExp("\\\\"), "\\\\"); // backslash to double-backslash + str.tqreplace(TQRegExp("\\|"), "\\p"); // pipe to \p + str.tqreplace(TQRegExp("\n"), "\\n"); // newline to \n return str; } @@ -103,8 +103,8 @@ public: int type; }; -JT_Register::JT_Register(Task *parent) -:Task(parent) +JT_Register::JT_Register(Task *tqparent) +:Task(tqparent) { d = new Private; d->type = -1; @@ -246,8 +246,8 @@ public: JT_Register *jt_reg; }; -JT_UnRegister::JT_UnRegister(Task *parent) -: Task(parent) +JT_UnRegister::JT_UnRegister(Task *tqparent) +: Task(tqparent) { d = new Private; d->jt_reg = 0; @@ -306,8 +306,8 @@ public: TQValueList<TQDomElement> itemList; }; -JT_Roster::JT_Roster(Task *parent) -:Task(parent) +JT_Roster::JT_Roster(Task *tqparent) +:Task(tqparent) { type = -1; d = new Private; @@ -448,8 +448,8 @@ bool JT_Roster::take(const TQDomElement &x) //---------------------------------------------------------------------------- // JT_PushRoster //---------------------------------------------------------------------------- -JT_PushRoster::JT_PushRoster(Task *parent) -:Task(parent) +JT_PushRoster::JT_PushRoster(Task *tqparent) +:Task(tqparent) { } @@ -475,8 +475,8 @@ bool JT_PushRoster::take(const TQDomElement &e) //---------------------------------------------------------------------------- // JT_Presence //---------------------------------------------------------------------------- -JT_Presence::JT_Presence(Task *parent) -:Task(parent) +JT_Presence::JT_Presence(Task *tqparent) +:Task(tqparent) { type = -1; } @@ -485,7 +485,7 @@ JT_Presence::~JT_Presence() { } -void JT_Presence::pres(const Status &s) +void JT_Presence::pres(const tqStatus &s) { type = 0; @@ -504,7 +504,7 @@ void JT_Presence::pres(const Status &s) if(!s.status().isEmpty()) tag.appendChild(textTag(doc(), "status", s.status())); - tag.appendChild( textTag(doc(), "priority", TQString("%1").arg(s.priority()) ) ); + tag.appendChild( textTag(doc(), "priority", TQString("%1").tqarg(s.priority()) ) ); if(!s.keyID().isEmpty()) { TQDomElement x = textTag(doc(), "x", s.keyID()); @@ -529,7 +529,7 @@ void JT_Presence::pres(const Status &s) } } -void JT_Presence::pres(const Jid &to, const Status &s) +void JT_Presence::pres(const Jid &to, const tqStatus &s) { pres(s); tag.setAttribute("to", to.full()); @@ -554,8 +554,8 @@ void JT_Presence::onGo() //---------------------------------------------------------------------------- // JT_PushPresence //---------------------------------------------------------------------------- -JT_PushPresence::JT_PushPresence(Task *parent) -:Task(parent) +JT_PushPresence::JT_PushPresence(Task *tqparent) +:Task(tqparent) { } @@ -569,7 +569,7 @@ bool JT_PushPresence::take(const TQDomElement &e) return false; Jid j(e.attribute("from")); - Status p; + tqStatus p; if(e.hasAttribute("type")) { TQString type = e.attribute("type"); @@ -593,7 +593,7 @@ bool JT_PushPresence::take(const TQDomElement &e) tag = findSubTag(e, "status", &found); if(found) - p.setStatus(tagContent(tag)); + p.settqStatus(tagContent(tag)); tag = findSubTag(e, "show", &found); if(found) p.setShow(tagContent(tag)); @@ -653,10 +653,10 @@ bool JT_PushPresence::take(const TQDomElement &e) //---------------------------------------------------------------------------- static TQDomElement oldStyleNS(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; @@ -676,7 +676,7 @@ static TQDomElement oldStyleNS(const TQDomElement &e) if(!noShowNS) i.setAttribute("xmlns", e.namespaceURI()); - // copy children + // copy tqchildren TQDomNodeList nl = e.childNodes(); for(x = 0; x < nl.count(); ++x) { TQDomNode n = nl.item(x); @@ -688,8 +688,8 @@ static TQDomElement oldStyleNS(const TQDomElement &e) return i; } -JT_Message::JT_Message(Task *parent, const Message &msg) -:Task(parent) +JT_Message::JT_Message(Task *tqparent, const Message &msg) +:Task(tqparent) { m = msg; m.setId(id()); @@ -724,7 +724,7 @@ static TQDomElement addCorrectNS(const TQDomElement &e) // find closest xmlns TQDomNode n = e; while(!n.isNull() && !n.toElement().hasAttribute("xmlns")) - n = n.parentNode(); + n = n.tqparentNode(); TQString ns; if(n.isNull() || !n.toElement().hasAttribute("xmlns")) ns = "jabber:client"; @@ -742,7 +742,7 @@ static TQDomElement addCorrectNS(const TQDomElement &e) i.setAttributeNodeNS(al.item(x).cloneNode().toAttr()); } - // copy children + // copy tqchildren TQDomNodeList nl = e.childNodes(); for(x = 0; x < nl.count(); ++x) { TQDomNode n = nl.item(x); @@ -756,8 +756,8 @@ static TQDomElement addCorrectNS(const TQDomElement &e) return i; } -JT_PushMessage::JT_PushMessage(Task *parent) -:Task(parent) +JT_PushMessage::JT_PushMessage(Task *tqparent) +:Task(tqparent) { } @@ -799,8 +799,8 @@ public: TQString message; }; -JT_GetLastActivity::JT_GetLastActivity(Task *parent) -:Task(parent) +JT_GetLastActivity::JT_GetLastActivity(Task *tqparent) +:Task(tqparent) { d = new Private; } @@ -858,8 +858,8 @@ bool JT_GetLastActivity::take(const TQDomElement &x) //---------------------------------------------------------------------------- // JT_GetServices //---------------------------------------------------------------------------- -JT_GetServices::JT_GetServices(Task *parent) -:Task(parent) +JT_GetServices::JT_GetServices(Task *tqparent) +:Task(tqparent) { } @@ -955,8 +955,8 @@ public: VCard vcard; }; -JT_VCard::JT_VCard(Task *parent) -:Task(parent) +JT_VCard::JT_VCard(Task *tqparent) +:Task(tqparent) { type = -1; d = new Private; @@ -1055,8 +1055,8 @@ public: TQValueList<SearchResult> resultList; }; -JT_Search::JT_Search(Task *parent) -:Task(parent) +JT_Search::JT_Search(Task *tqparent) +:Task(tqparent) { d = new Private; type = -1; @@ -1187,8 +1187,8 @@ bool JT_Search::take(const TQDomElement &x) //---------------------------------------------------------------------------- // JT_ClientVersion //---------------------------------------------------------------------------- -JT_ClientVersion::JT_ClientVersion(Task *parent) -:Task(parent) +JT_ClientVersion::JT_ClientVersion(Task *tqparent) +:Task(tqparent) { } @@ -1258,8 +1258,8 @@ const TQString & JT_ClientVersion::os() const //---------------------------------------------------------------------------- // JT_ClientTime //---------------------------------------------------------------------------- -/*JT_ClientTime::JT_ClientTime(Task *parent, const Jid &_j) -:Task(parent) +/*JT_ClientTime::JT_ClientTime(Task *tqparent, const Jid &_j) +:Task(tqparent) { j = _j; iq = createIQ("get", j.full(), id()); @@ -1307,8 +1307,8 @@ bool JT_ClientTime::take(const TQDomElement &x) //---------------------------------------------------------------------------- // JT_ServInfo //---------------------------------------------------------------------------- -JT_ServInfo::JT_ServInfo(Task *parent) -:Task(parent) +JT_ServInfo::JT_ServInfo(Task *tqparent) +:Task(tqparent) { } @@ -1338,12 +1338,12 @@ bool JT_ServInfo::take(const TQDomElement &e) // TQDomElement query = doc()->createElement("query"); // query.setAttribute("xmlns", "jabber:iq:time"); // iq.appendChild(query); - // TQDateTime local = TQDateTime::currentDateTime(); + // TQDateTime local = TQDateTime::tqcurrentDateTime(); // TQDateTime utc = local.addSecs(-getTZOffset() * 3600); // TQString str = getTZString(); // query.appendChild(textTag("utc", TS2stamp(utc))); // query.appendChild(textTag("tz", str)); - // query.appendChild(textTag("display", TQString("%1 %2").arg(local.toString()).arg(str))); + // query.appendChild(textTag("display", TQString("%1 %2").tqarg(local.toString()).tqarg(str))); // send(iq); // return TRUE; //} @@ -1417,7 +1417,7 @@ bool JT_ServInfo::take(const TQDomElement &e) } else if (node.startsWith(client()->capsNode() + "#")) { TQString ext = node.right(node.length()-client()->capsNode().length()-1); - if (client()->extensions().contains(ext)) { + if (client()->extensions().tqcontains(ext)) { const TQStringList& l = client()->extension(ext).list(); for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) { feature = doc()->createElement("feature"); @@ -1444,8 +1444,8 @@ bool JT_ServInfo::take(const TQDomElement &e) //---------------------------------------------------------------------------- // JT_Gateway //---------------------------------------------------------------------------- -JT_Gateway::JT_Gateway(Task *parent) -:Task(parent) +JT_Gateway::JT_Gateway(Task *tqparent) +:Task(tqparent) { type = -1; } @@ -1539,8 +1539,8 @@ public: AgentItem root; }; -JT_Browse::JT_Browse (Task *parent) -:Task (parent) +JT_Browse::JT_Browse (Task *tqparent) +:Task (tqparent) { d = new Private; } @@ -1664,8 +1664,8 @@ public: DiscoList items; }; -JT_DiscoItems::JT_DiscoItems(Task *parent) -: Task(parent) +JT_DiscoItems::JT_DiscoItems(Task *tqparent) +: Task(tqparent) { d = new Private; } @@ -1753,8 +1753,8 @@ public: DiscoItem item; }; -JT_DiscoInfo::JT_DiscoInfo(Task *parent) -: Task(parent) +JT_DiscoInfo::JT_DiscoInfo(Task *tqparent) +: Task(tqparent) { d = new Private; } @@ -1895,8 +1895,8 @@ public: DiscoList list; }; -JT_DiscoPublish::JT_DiscoPublish(Task *parent) -: Task(parent) +JT_DiscoPublish::JT_DiscoPublish(Task *tqparent) +: Task(tqparent) { d = new Private; } @@ -1959,8 +1959,8 @@ bool JT_DiscoPublish::take(const TQDomElement &x) //---------------------------------------------------------------------------- // JT_MucPresence //---------------------------------------------------------------------------- -JT_MucPresence::JT_MucPresence(Task *parent) -:Task(parent) +JT_MucPresence::JT_MucPresence(Task *tqparent) +:Task(tqparent) { type = -1; } @@ -1969,7 +1969,7 @@ JT_MucPresence::~JT_MucPresence() { } -void JT_MucPresence::pres(const Status &s) +void JT_MucPresence::pres(const tqStatus &s) { type = 0; @@ -1988,7 +1988,7 @@ void JT_MucPresence::pres(const Status &s) if(!s.status().isEmpty()) tag.appendChild(textTag(doc(), "status", s.status())); - tag.appendChild( textTag(doc(), "priority", TQString("%1").arg(s.priority()) ) ); + tag.appendChild( textTag(doc(), "priority", TQString("%1").tqarg(s.priority()) ) ); if(!s.keyID().isEmpty()) { TQDomElement x = textTag(doc(), "x", s.keyID()); @@ -2013,7 +2013,7 @@ void JT_MucPresence::pres(const Status &s) } } -void JT_MucPresence::pres(const Jid &to, const Status &s, const TQString &password) +void JT_MucPresence::pres(const Jid &to, const tqStatus &s, const TQString &password) { pres(s); tag.setAttribute("to", to.full()); @@ -2043,8 +2043,8 @@ class JT_PrivateStorage::Private int type; }; -JT_PrivateStorage::JT_PrivateStorage(Task *parent) - :Task(parent) +JT_PrivateStorage::JT_PrivateStorage(Task *tqparent) + :Task(tqparent) { d = new Private; } diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h index c8085013..9d5125d9 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h +++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h @@ -30,13 +30,14 @@ namespace XMPP { class Roster; - class Status; + class tqStatus; class JT_Register : public Task { Q_OBJECT + TQ_OBJECT public: - JT_Register(Task *parent); + JT_Register(Task *tqparent); ~JT_Register(); void reg(const TQString &user, const TQString &pass); @@ -61,8 +62,9 @@ namespace XMPP class JT_UnRegister : public Task { Q_OBJECT + TQ_OBJECT public: - JT_UnRegister(Task *parent); + JT_UnRegister(Task *tqparent); ~JT_UnRegister(); void unreg(const Jid &); @@ -81,8 +83,9 @@ namespace XMPP class JT_Roster : public Task { Q_OBJECT + TQ_OBJECT public: - JT_Roster(Task *parent); + JT_Roster(Task *tqparent); ~JT_Roster(); void get(); @@ -109,8 +112,9 @@ namespace XMPP class JT_PushRoster : public Task { Q_OBJECT + TQ_OBJECT public: - JT_PushRoster(Task *parent); + JT_PushRoster(Task *tqparent); ~JT_PushRoster(); bool take(const TQDomElement &); @@ -126,12 +130,13 @@ namespace XMPP class JT_Presence : public Task { Q_OBJECT + TQ_OBJECT public: - JT_Presence(Task *parent); + JT_Presence(Task *tqparent); ~JT_Presence(); - void pres(const Status &); - void pres(const Jid &, const Status &); + void pres(const tqStatus &); + void pres(const Jid &, const tqStatus &); void sub(const Jid &, const TQString &subType); void onGo(); @@ -147,14 +152,15 @@ namespace XMPP class JT_PushPresence : public Task { Q_OBJECT + TQ_OBJECT public: - JT_PushPresence(Task *parent); + JT_PushPresence(Task *tqparent); ~JT_PushPresence(); bool take(const TQDomElement &); signals: - void presence(const Jid &, const Status &); + void presence(const Jid &, const tqStatus &); void subscription(const Jid &, const TQString &); private: @@ -165,8 +171,9 @@ namespace XMPP class JT_Message : public Task { Q_OBJECT + TQ_OBJECT public: - JT_Message(Task *parent, const Message &); + JT_Message(Task *tqparent, const Message &); ~JT_Message(); void onGo(); @@ -181,8 +188,9 @@ namespace XMPP class JT_PushMessage : public Task { Q_OBJECT + TQ_OBJECT public: - JT_PushMessage(Task *parent); + JT_PushMessage(Task *tqparent); ~JT_PushMessage(); bool take(const TQDomElement &); @@ -198,6 +206,7 @@ namespace XMPP class JT_GetLastActivity : public Task { Q_OBJECT + TQ_OBJECT public: JT_GetLastActivity(Task *); ~JT_GetLastActivity(); @@ -221,6 +230,7 @@ namespace XMPP class JT_GetServices : public Task { Q_OBJECT + TQ_OBJECT public: JT_GetServices(Task *); @@ -243,8 +253,9 @@ namespace XMPP class JT_VCard : public Task { Q_OBJECT + TQ_OBJECT public: - JT_VCard(Task *parent); + JT_VCard(Task *tqparent); ~JT_VCard(); void get(const Jid &); @@ -266,8 +277,9 @@ namespace XMPP class JT_Search : public Task { Q_OBJECT + TQ_OBJECT public: - JT_Search(Task *parent); + JT_Search(Task *tqparent); ~JT_Search(); const Form & form() const; @@ -290,6 +302,7 @@ namespace XMPP class JT_ClientVersion : public Task { Q_OBJECT + TQ_OBJECT public: JT_ClientVersion(Task *); @@ -312,6 +325,7 @@ namespace XMPP class JT_ClientTime : public Task { Q_OBJECT + TQ_OBJECT public: JT_ClientTime(Task *, const Jid &); @@ -329,6 +343,7 @@ namespace XMPP class JT_ServInfo : public Task { Q_OBJECT + TQ_OBJECT public: JT_ServInfo(Task *); ~JT_ServInfo(); @@ -339,6 +354,7 @@ namespace XMPP class JT_Gateway : public Task { Q_OBJECT + TQ_OBJECT public: JT_Gateway(Task *); @@ -362,6 +378,7 @@ namespace XMPP class JT_Browse : public Task { Q_OBJECT + TQ_OBJECT public: JT_Browse(Task *); ~JT_Browse(); @@ -384,11 +401,12 @@ namespace XMPP class JT_DiscoItems : public Task { Q_OBJECT + TQ_OBJECT public: JT_DiscoItems(Task *); ~JT_DiscoItems(); - void get(const Jid &, const TQString &node = TQString::null); + void get(const Jid &, const TQString &node = TQString()); void get(const DiscoItem &); const DiscoList &items() const; @@ -404,11 +422,12 @@ namespace XMPP class JT_DiscoInfo : public Task { Q_OBJECT + TQ_OBJECT public: JT_DiscoInfo(Task *); ~JT_DiscoInfo(); - void get(const Jid &, const TQString &node = TQString::null, const DiscoItem::Identity = DiscoItem::Identity()); + void get(const Jid &, const TQString &node = TQString(), const DiscoItem::Identity = DiscoItem::Identity()); void get(const DiscoItem &); const DiscoItem &item() const; @@ -426,6 +445,7 @@ namespace XMPP class JT_DiscoPublish : public Task { Q_OBJECT + TQ_OBJECT public: JT_DiscoPublish(Task *); ~JT_DiscoPublish(); @@ -443,12 +463,13 @@ namespace XMPP class JT_MucPresence : public Task { Q_OBJECT + TQ_OBJECT public: - JT_MucPresence(Task *parent); + JT_MucPresence(Task *tqparent); ~JT_MucPresence(); - void pres(const Status &); - void pres(const Jid &, const Status &, const TQString &password); + void pres(const tqStatus &); + void pres(const Jid &, const tqStatus &, const TQString &password); void onGo(); @@ -463,8 +484,9 @@ namespace XMPP class JT_PrivateStorage : public Task { Q_OBJECT + TQ_OBJECT public: - JT_PrivateStorage(Task *parent); + JT_PrivateStorage(Task *tqparent); ~JT_PrivateStorage(); void set(const TQDomElement &); diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp index 5f5214fd..009f0136 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp @@ -81,7 +81,7 @@ static TQString subTagText(const TQDomElement &e, const TQString &name) TQDomElement i = findSubTag(e, name, &found); if ( found ) return i.text().stripWhiteSpace(); - return TQString::null; + return TQString(); } using namespace XMPP; @@ -93,7 +93,7 @@ static TQString image2type(const TQByteArray &ba) { TQBuffer buf(ba); buf.open(IO_ReadOnly); - TQString format = TQImageIO::imageFormat( &buf ); + TQString format = TQImageIO::imageFormat( TQT_TQIODEVICE(&buf) ); // TODO: add more formats if ( format == "PNG" || format == "PsiPNG" ) diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp index d7b5c82d..65c3b8b3 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp @@ -185,7 +185,7 @@ TQString subTagText(const TQDomElement &e, const TQString &name) TQDomElement i = findSubTag(e, name, &found); if ( found ) return i.text(); - return TQString::null; + return TQString(); } TQDomElement textTag(TQDomDocument &doc, const TQString &name, const TQString &content) |