summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/jabber
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/jabber')
-rw-r--r--kopete/protocols/jabber/jabberaccount.cpp190
-rw-r--r--kopete/protocols/jabber/jabberaccount.h34
-rw-r--r--kopete/protocols/jabber/jabberbasecontact.cpp68
-rw-r--r--kopete/protocols/jabber/jabberbasecontact.h8
-rw-r--r--kopete/protocols/jabber/jabberbookmarks.cpp38
-rw-r--r--kopete/protocols/jabber/jabberbookmarks.h14
-rw-r--r--kopete/protocols/jabber/jabberbytestream.cpp20
-rw-r--r--kopete/protocols/jabber/jabberbytestream.h4
-rw-r--r--kopete/protocols/jabber/jabbercapabilitiesmanager.cpp148
-rw-r--r--kopete/protocols/jabber/jabbercapabilitiesmanager.h36
-rw-r--r--kopete/protocols/jabber/jabberchatsession.cpp44
-rw-r--r--kopete/protocols/jabber/jabberchatsession.h8
-rw-r--r--kopete/protocols/jabber/jabberclient.cpp218
-rw-r--r--kopete/protocols/jabber/jabberclient.h70
-rw-r--r--kopete/protocols/jabber/jabberconnector.cpp14
-rw-r--r--kopete/protocols/jabber/jabberconnector.h8
-rw-r--r--kopete/protocols/jabber/jabbercontact.cpp192
-rw-r--r--kopete/protocols/jabber/jabbercontact.h24
-rw-r--r--kopete/protocols/jabber/jabbercontactpool.cpp14
-rw-r--r--kopete/protocols/jabber/jabbercontactpool.h6
-rw-r--r--kopete/protocols/jabber/jabberfiletransfer.cpp32
-rw-r--r--kopete/protocols/jabber/jabberfiletransfer.h10
-rw-r--r--kopete/protocols/jabber/jabberformlineedit.cpp4
-rw-r--r--kopete/protocols/jabber/jabberformlineedit.h12
-rw-r--r--kopete/protocols/jabber/jabberformtranslator.cpp20
-rw-r--r--kopete/protocols/jabber/jabberformtranslator.h6
-rw-r--r--kopete/protocols/jabber/jabbergroupchatmanager.cpp12
-rw-r--r--kopete/protocols/jabber/jabbergroupchatmanager.h2
-rw-r--r--kopete/protocols/jabber/jabbergroupcontact.cpp34
-rw-r--r--kopete/protocols/jabber/jabbergroupcontact.h10
-rw-r--r--kopete/protocols/jabber/jabbergroupmembercontact.cpp18
-rw-r--r--kopete/protocols/jabber/jabbergroupmembercontact.h4
-rw-r--r--kopete/protocols/jabber/jabberprotocol.cpp92
-rw-r--r--kopete/protocols/jabber/jabberprotocol.h22
-rw-r--r--kopete/protocols/jabber/jabberresource.cpp16
-rw-r--r--kopete/protocols/jabber/jabberresource.h8
-rw-r--r--kopete/protocols/jabber/jabberresourcepool.cpp20
-rw-r--r--kopete/protocols/jabber/jabberresourcepool.h6
-rw-r--r--kopete/protocols/jabber/jabbertransport.cpp46
-rw-r--r--kopete/protocols/jabber/jabbertransport.h10
-rw-r--r--kopete/protocols/jabber/jingle/jinglesession.cpp4
-rw-r--r--kopete/protocols/jabber/jingle/jinglesession.h12
-rw-r--r--kopete/protocols/jabber/jingle/jinglesessionmanager.cpp16
-rw-r--r--kopete/protocols/jabber/jingle/jinglesessionmanager.h14
-rw-r--r--kopete/protocols/jabber/jingle/jinglevoicecaller.cpp48
-rw-r--r--kopete/protocols/jabber/jingle/jinglevoicecaller.h6
-rw-r--r--kopete/protocols/jabber/jingle/jinglevoicesession.cpp32
-rw-r--r--kopete/protocols/jabber/jingle/jinglevoicesession.h8
-rw-r--r--kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp46
-rw-r--r--kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h2
-rw-r--r--kopete/protocols/jabber/jingle/jinglewatchsessiontask.cpp12
-rw-r--r--kopete/protocols/jabber/jingle/jinglewatchsessiontask.h4
-rw-r--r--kopete/protocols/jabber/kioslave/jabberdisco.cpp32
-rw-r--r--kopete/protocols/jabber/kioslave/jabberdisco.h16
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp74
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h20
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp68
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h10
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp158
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h22
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp68
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/ndns.h24
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp12
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/servsock.h6
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp234
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/socks.h46
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp70
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h14
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp36
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/base64.h12
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp34
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/bytestream.h28
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/cipher.cpp68
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/cipher.h24
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp6
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h4
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp16
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h16
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp16
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/sha1.h8
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp32
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h4
-rw-r--r--kopete/protocols/jabber/libiris/iris/include/im.h388
-rw-r--r--kopete/protocols/jabber/libiris/iris/include/xmpp.h224
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp190
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h34
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp386
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/s5b.h112
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp134
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h58
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp34
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h10
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp88
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp8
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp102
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp174
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h32
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp322
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h132
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h92
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp116
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h24
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp122
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp298
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/td.h12
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp24
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp108
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h54
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp304
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp414
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp406
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h114
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp294
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h178
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp176
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h60
-rw-r--r--kopete/protocols/jabber/libiris/qca/src/qca.cpp298
-rw-r--r--kopete/protocols/jabber/libiris/qca/src/qca.h150
-rw-r--r--kopete/protocols/jabber/libiris/qca/src/qcaprovider.h92
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberbrowse.cpp18
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberbrowse.h4
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp14
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberchangepassword.h2
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberchatjoin.cpp10
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberchatjoin.h2
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberchatroomslist.cpp16
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberchatroomslist.h10
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberregister.cpp12
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberregister.h10
-rw-r--r--kopete/protocols/jabber/ui/dlgjabbersendraw.cpp22
-rw-r--r--kopete/protocols/jabber/ui/dlgjabbersendraw.h6
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberservices.cpp38
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberservices.h16
-rw-r--r--kopete/protocols/jabber/ui/dlgjabbervcard.cpp72
-rw-r--r--kopete/protocols/jabber/ui/dlgjabbervcard.h6
-rw-r--r--kopete/protocols/jabber/ui/jabberaddcontactpage.cpp32
-rw-r--r--kopete/protocols/jabber/ui/jabberaddcontactpage.h8
-rw-r--r--kopete/protocols/jabber/ui/jabberchooseserver.cpp22
-rw-r--r--kopete/protocols/jabber/ui/jabberchooseserver.h6
-rw-r--r--kopete/protocols/jabber/ui/jabbereditaccountwidget.cpp40
-rw-r--r--kopete/protocols/jabber/ui/jabbereditaccountwidget.h4
-rw-r--r--kopete/protocols/jabber/ui/jabberregisteraccount.cpp52
-rw-r--r--kopete/protocols/jabber/ui/jabberregisteraccount.h10
143 files changed, 4560 insertions, 4560 deletions
diff --git a/kopete/protocols/jabber/jabberaccount.cpp b/kopete/protocols/jabber/jabberaccount.cpp
index 785e9c53..bb1c0f2e 100644
--- a/kopete/protocols/jabber/jabberaccount.cpp
+++ b/kopete/protocols/jabber/jabberaccount.cpp
@@ -33,9 +33,9 @@
#include <time.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -87,7 +87,7 @@
-JabberAccount::JabberAccount (JabberProtocol * parent, const QString & accountId, const char *name)
+JabberAccount::JabberAccount (JabberProtocol * parent, const TQString & accountId, const char *name)
:Kopete::PasswordedAccount ( parent, accountId, 0, name )
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Instantiating new account " << accountId << endl;
@@ -109,7 +109,7 @@ JabberAccount::JabberAccount (JabberProtocol * parent, const QString & accountId
JabberContact *myContact = contactPool()->addContact ( XMPP::RosterItem ( accountId ), Kopete::ContactList::self()->myself(), false );
setMyself( myContact );
- QObject::connect(Kopete::ContactList::self(), SIGNAL( globalIdentityChanged(const QString&, const QVariant& ) ), SLOT( slotGlobalIdentityChanged(const QString&, const QVariant& ) ) );
+ TQObject::connect(Kopete::ContactList::self(), TQT_SIGNAL( globalIdentityChanged(const TQString&, const TQVariant& ) ), TQT_SLOT( slotGlobalIdentityChanged(const TQString&, const TQVariant& ) ) );
m_initialPresence = XMPP::Status ( "", "", 5, true );
@@ -124,8 +124,8 @@ JabberAccount::~JabberAccount ()
cleanup ();
- QMap<QString,JabberTransport*> tranposrts_copy=m_transports;
- QMap<QString,JabberTransport*>::Iterator it;
+ TQMap<TQString,JabberTransport*> tranposrts_copy=m_transports;
+ TQMap<TQString,JabberTransport*>::Iterator it;
for ( it = tranposrts_copy.begin(); it != tranposrts_copy.end(); ++it )
delete it.data();
}
@@ -178,7 +178,7 @@ KActionMenu *JabberAccount::actionMenu ()
KAction *action;
- action = new KAction (i18n ("Join Groupchat..."), "jabber_group", 0, this, SLOT (slotJoinNewChat ()), this, "actionJoinChat");
+ action = new KAction (i18n ("Join Groupchat..."), "jabber_group", 0, this, TQT_SLOT (slotJoinNewChat ()), this, "actionJoinChat");
m_actionMenu->insert(action);
action->setEnabled( isConnected() );
@@ -190,17 +190,17 @@ KActionMenu *JabberAccount::actionMenu ()
m_actionMenu->popupMenu()->insertSeparator();
action = new KAction ( i18n ("Services..."), "jabber_serv_on", 0,
- this, SLOT ( slotGetServices () ), this, "actionJabberServices");
+ this, TQT_SLOT ( slotGetServices () ), this, "actionJabberServices");
action->setEnabled( isConnected() );
m_actionMenu->insert ( action );
action = new KAction ( i18n ("Send Raw Packet to Server..."), "mail_new", 0,
- this, SLOT ( slotSendRaw () ), this, "actionJabberSendRaw") ;
+ this, TQT_SLOT ( slotSendRaw () ), this, "actionJabberSendRaw") ;
action->setEnabled( isConnected() );
m_actionMenu->insert ( action );
action = new KAction ( i18n ("Edit User Info..."), "identity", 0,
- this, SLOT ( slotEditVCard () ), this, "actionEditVCard") ;
+ this, TQT_SLOT ( slotEditVCard () ), this, "actionEditVCard") ;
action->setEnabled( isConnected() );
m_actionMenu->insert ( action );
@@ -229,11 +229,11 @@ JabberContactPool *JabberAccount::contactPool ()
}
-bool JabberAccount::createContact (const QString & contactId, Kopete::MetaContact * metaContact)
+bool JabberAccount::createContact (const TQString & contactId, Kopete::MetaContact * metaContact)
{
// collect all group names
- QStringList groupNames;
+ TQStringList groupNames;
Kopete::GroupList groupList = metaContact->groups();
for(Kopete::Group *group = groupList.first(); group; group = groupList.next())
groupNames += group->displayName();
@@ -271,11 +271,11 @@ bool JabberAccount::isConnecting ()
XMPP::Jid jid ( myself()->contactId () );
// see if we are currently trying to connect
- return resourcePool()->bestResource ( jid ).status().show () == QString("connecting");
+ return resourcePool()->bestResource ( jid ).status().show () == TQString("connecting");
}
-void JabberAccount::connectWithPassword ( const QString &password )
+void JabberAccount::connectWithPassword ( const TQString &password )
{
kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "called" << endl;
@@ -295,40 +295,40 @@ void JabberAccount::connectWithPassword ( const QString &password )
{
m_jabberClient = new JabberClient;
- QObject::connect ( m_jabberClient, SIGNAL ( csDisconnected () ), this, SLOT ( slotCSDisconnected () ) );
- QObject::connect ( m_jabberClient, SIGNAL ( csError ( int ) ), this, SLOT ( slotCSError ( int ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( tlsWarning ( int ) ), this, SLOT ( slotHandleTLSWarning ( int ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) );
- QObject::connect ( m_jabberClient, SIGNAL ( error ( JabberClient::ErrorCode ) ), this, SLOT ( slotClientError ( JabberClient::ErrorCode ) ) );
-
- QObject::connect ( m_jabberClient, SIGNAL ( subscription ( const XMPP::Jid &, const QString & ) ),
- this, SLOT ( slotSubscription ( const XMPP::Jid &, const QString & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( rosterRequestFinished ( bool ) ),
- this, SLOT ( slotRosterRequestFinished ( bool ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( newContact ( const XMPP::RosterItem & ) ),
- this, SLOT ( slotContactUpdated ( const XMPP::RosterItem & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( contactUpdated ( const XMPP::RosterItem & ) ),
- this, SLOT ( slotContactUpdated ( const XMPP::RosterItem & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( contactDeleted ( const XMPP::RosterItem & ) ),
- this, SLOT ( slotContactDeleted ( const XMPP::RosterItem & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( resourceAvailable ( const XMPP::Jid &, const XMPP::Resource & ) ),
- this, SLOT ( slotResourceAvailable ( const XMPP::Jid &, const XMPP::Resource & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( resourceUnavailable ( const XMPP::Jid &, const XMPP::Resource & ) ),
- this, SLOT ( slotResourceUnavailable ( const XMPP::Jid &, const XMPP::Resource & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( messageReceived ( const XMPP::Message & ) ),
- this, SLOT ( slotReceivedMessage ( const XMPP::Message & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( incomingFileTransfer () ),
- this, SLOT ( slotIncomingFileTransfer () ) );
- QObject::connect ( m_jabberClient, SIGNAL ( groupChatJoined ( const XMPP::Jid & ) ),
- this, SLOT ( slotGroupChatJoined ( const XMPP::Jid & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( groupChatLeft ( const XMPP::Jid & ) ),
- this, SLOT ( slotGroupChatLeft ( const XMPP::Jid & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( groupChatPresence ( const XMPP::Jid &, const XMPP::Status & ) ),
- this, SLOT ( slotGroupChatPresence ( const XMPP::Jid &, const XMPP::Status & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( groupChatError ( const XMPP::Jid &, int, const QString & ) ),
- this, SLOT ( slotGroupChatError ( const XMPP::Jid &, int, const QString & ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( debugMessage ( const QString & ) ),
- this, SLOT ( slotClientDebugMessage ( const QString & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( csDisconnected () ), this, TQT_SLOT ( slotCSDisconnected () ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( csError ( int ) ), this, TQT_SLOT ( slotCSError ( int ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( tlsWarning ( int ) ), this, TQT_SLOT ( slotHandleTLSWarning ( int ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( error ( JabberClient::ErrorCode ) ), this, TQT_SLOT ( slotClientError ( JabberClient::ErrorCode ) ) );
+
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( subscription ( const XMPP::Jid &, const TQString & ) ),
+ this, TQT_SLOT ( slotSubscription ( const XMPP::Jid &, const TQString & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( rosterRequestFinished ( bool ) ),
+ this, TQT_SLOT ( slotRosterRequestFinished ( bool ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( newContact ( const XMPP::RosterItem & ) ),
+ this, TQT_SLOT ( slotContactUpdated ( const XMPP::RosterItem & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( contactUpdated ( const XMPP::RosterItem & ) ),
+ this, TQT_SLOT ( slotContactUpdated ( const XMPP::RosterItem & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( contactDeleted ( const XMPP::RosterItem & ) ),
+ this, TQT_SLOT ( slotContactDeleted ( const XMPP::RosterItem & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( resourceAvailable ( const XMPP::Jid &, const XMPP::Resource & ) ),
+ this, TQT_SLOT ( slotResourceAvailable ( const XMPP::Jid &, const XMPP::Resource & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( resourceUnavailable ( const XMPP::Jid &, const XMPP::Resource & ) ),
+ this, TQT_SLOT ( slotResourceUnavailable ( const XMPP::Jid &, const XMPP::Resource & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( messageReceived ( const XMPP::Message & ) ),
+ this, TQT_SLOT ( slotReceivedMessage ( const XMPP::Message & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( incomingFileTransfer () ),
+ this, TQT_SLOT ( slotIncomingFileTransfer () ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( groupChatJoined ( const XMPP::Jid & ) ),
+ this, TQT_SLOT ( slotGroupChatJoined ( const XMPP::Jid & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( groupChatLeft ( const XMPP::Jid & ) ),
+ this, TQT_SLOT ( slotGroupChatLeft ( const XMPP::Jid & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( groupChatPresence ( const XMPP::Jid &, const XMPP::Status & ) ),
+ this, TQT_SLOT ( slotGroupChatPresence ( const XMPP::Jid &, const XMPP::Status & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( groupChatError ( const XMPP::Jid &, int, const TQString & ) ),
+ this, TQT_SLOT ( slotGroupChatError ( const XMPP::Jid &, int, const TQString & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( debugMessage ( const TQString & ) ),
+ this, TQT_SLOT ( slotClientDebugMessage ( const TQString & ) ) );
}
else
{
@@ -363,7 +363,7 @@ void JabberAccount::connectWithPassword ( const QString &password )
m_jabberClient->setClientName ("Kopete");
m_jabberClient->setClientVersion (kapp->aboutData ()->version ());
- m_jabberClient->setOSName (QString ("%1 %2").arg (utsBuf.sysname, 1).arg (utsBuf.release, 2));
+ m_jabberClient->setOSName (TQString ("%1 %2").arg (utsBuf.sysname, 1).arg (utsBuf.release, 2));
}
// Set caps node information
@@ -387,14 +387,14 @@ void JabberAccount::connectWithPassword ( const QString &password )
char str[256];
char fmt[32];
int timezoneOffset;
- QString timezoneString;
+ TQString timezoneString;
strcpy ( fmt, "%z" );
strftime ( str, 256, fmt, localtime ( &x ) );
if ( strcmp ( fmt, str ) )
{
- QString s = str;
+ TQString s = str;
if ( s.at ( 0 ) == '+' )
s.remove ( 0, 1 );
s.truncate ( s.length () - 2 );
@@ -416,7 +416,7 @@ void JabberAccount::connectWithPassword ( const QString &password )
setPresence( XMPP::Status ("connecting", "", 0, true) );
- switch ( m_jabberClient->connect ( XMPP::Jid ( accountId () + QString("/") + resource () ), password ) )
+ switch ( m_jabberClient->connect ( XMPP::Jid ( accountId () + TQString("/") + resource () ), password ) )
{
case JabberClient::NoTLS:
// no SSL support, at the connecting stage this means the problem is client-side
@@ -435,7 +435,7 @@ void JabberAccount::connectWithPassword ( const QString &password )
}
-void JabberAccount::slotClientDebugMessage ( const QString &msg )
+void JabberAccount::slotClientDebugMessage ( const TQString &msg )
{
kdDebug (JABBER_DEBUG_PROTOCOL) << k_funcinfo << msg << endl;
@@ -444,10 +444,10 @@ void JabberAccount::slotClientDebugMessage ( const QString &msg )
bool JabberAccount::handleTLSWarning ( JabberClient *jabberClient, int warning )
{
- QString validityString, code;
+ TQString validityString, code;
- QString server = jabberClient->jid().domain ();
- QString accountId = jabberClient->jid().bare ();
+ TQString server = jabberClient->jid().domain ();
+ TQString accountId = jabberClient->jid().bare ();
switch ( warning )
{
@@ -509,7 +509,7 @@ bool JabberAccount::handleTLSWarning ( JabberClient *jabberClient, int warning )
arg(server, accountId, validityString),
i18n("Jabber Connection Certificate Problem"),
KStdGuiItem::cont(),
- QString("KopeteTLSWarning") + server + code) == KMessageBox::Continue );
+ TQString("KopeteTLSWarning") + server + code) == KMessageBox::Continue );
}
@@ -556,7 +556,7 @@ void JabberAccount::slotConnected ()
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Creating Jingle Voice caller..." << endl;
m_voiceCaller = new JingleVoiceCaller( this );
- QObject::connect(m_voiceCaller,SIGNAL(incoming(const Jid&)),this,SLOT(slotIncomingVoiceCall( const Jid& )));
+ TQObject::connect(m_voiceCaller,TQT_SIGNAL(incoming(const Jid&)),this,TQT_SLOT(slotIncomingVoiceCall( const Jid& )));
m_voiceCaller->initialize();
}
@@ -567,12 +567,12 @@ void JabberAccount::slotConnected ()
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Creating Jingle Session Manager..." << endl;
m_jingleSessionManager = new JingleSessionManager( this );
- QObject::connect(m_jingleSessionManager, SIGNAL(incomingSession(const QString &, JingleSession *)), this, SLOT(slotIncomingJingleSession(const QString &, JingleSession *)));
+ TQObject::connect(m_jingleSessionManager, TQT_SIGNAL(incomingSession(const TQString &, JingleSession *)), this, TQT_SLOT(slotIncomingJingleSession(const TQString &, JingleSession *)));
}
#endif
// Set caps extensions
- m_jabberClient->client()->addExtension("voice-v1", Features(QString("http://www.google.com/xmpp/protocol/voice/v1")));
+ m_jabberClient->client()->addExtension("voice-v1", Features(TQString("http://www.google.com/xmpp/protocol/voice/v1")));
#endif
kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Requesting roster..." << endl;
@@ -607,7 +607,7 @@ void JabberAccount::slotIncomingFileTransfer ()
}
-void JabberAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason)
+void JabberAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason)
{
XMPP::Status xmppStatus = m_protocol->kosToStatus( status, reason);
@@ -725,10 +725,10 @@ void JabberAccount::slotCSDisconnected ()
}
-void JabberAccount::handleStreamError (int streamError, int streamCondition, int connectorCode, const QString &server, Kopete::Account::DisconnectReason &errorClass)
+void JabberAccount::handleStreamError (int streamError, int streamCondition, int connectorCode, const TQString &server, Kopete::Account::DisconnectReason &errorClass)
{
- QString errorText;
- QString errorCondition;
+ TQString errorText;
+ TQString errorCondition;
errorClass = Kopete::Account::InvalidHost;
@@ -1046,7 +1046,7 @@ void JabberAccount::setPresence ( const XMPP::Status &status )
/*
* Unless we are in the connecting status, send a presence packet to the server
*/
- if(status.show () != QString("connecting") )
+ if(status.show () != TQString("connecting") )
{
/*
* Make sure we are actually connected before sending out a packet.
@@ -1081,7 +1081,7 @@ void JabberAccount::slotSendRaw ()
}
-void JabberAccount::slotSubscription (const XMPP::Jid & jid, const QString & type)
+void JabberAccount::slotSubscription (const XMPP::Jid & jid, const TQString & type)
{
kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << jid.full () << ", " << type << endl;
@@ -1103,9 +1103,9 @@ void JabberAccount::slotSubscription (const XMPP::Jid & jid, const QString & typ
hideFlags |= Kopete::UI::ContactAddedNotifyDialog::AddCheckBox | Kopete::UI::ContactAddedNotifyDialog::AddGroupBox ;
Kopete::UI::ContactAddedNotifyDialog *dialog=
- new Kopete::UI::ContactAddedNotifyDialog( jid.full() ,QString::null,this, hideFlags );
- QObject::connect(dialog,SIGNAL(applyClicked(const QString&)),
- this,SLOT(slotContactAddedNotifyDialogClosed(const QString& )));
+ new Kopete::UI::ContactAddedNotifyDialog( jid.full() ,TQString::null,this, hideFlags );
+ TQObject::connect(dialog,TQT_SIGNAL(applyClicked(const TQString&)),
+ this,TQT_SLOT(slotContactAddedNotifyDialogClosed(const TQString& )));
dialog->show();
}
else if (type == "unsubscribed")
@@ -1150,7 +1150,7 @@ void JabberAccount::slotSubscription (const XMPP::Jid & jid, const QString & typ
}
}
-void JabberAccount::slotContactAddedNotifyDialogClosed( const QString & contactid )
+void JabberAccount::slotContactAddedNotifyDialogClosed( const TQString & contactid )
{ // the dialog that asked the authorisation is closed. (it was shown in slotSubscrition)
XMPP::JT_Presence *task;
@@ -1187,7 +1187,7 @@ void JabberAccount::slotContactAddedNotifyDialogClosed( const QString & contacti
Kopete::MetaContact *parentContact=dialog->addContact();
if(parentContact)
{
- QStringList groupNames;
+ TQStringList groupNames;
Kopete::GroupList groupList = parentContact->groups();
for(Kopete::Group *group = groupList.first(); group; group = groupList.next())
groupNames += group->displayName();
@@ -1270,10 +1270,10 @@ void JabberAccount::slotContactUpdated (const XMPP::RosterItem & item)
* so add a new metacontact to the list.
*/
metaContact = new Kopete::MetaContact ();
- QStringList groups = item.groups ();
+ TQStringList groups = item.groups ();
// add this metacontact to all groups the contact is a member of
- for (QStringList::Iterator it = groups.begin (); it != groups.end (); ++it)
+ for (TQStringList::Iterator it = groups.begin (); it != groups.end (); ++it)
metaContact->addToGroup (Kopete::ContactList::self ()->findGroup (*it));
// put it onto contact list
@@ -1503,7 +1503,7 @@ void JabberAccount::slotGroupChatPresence (const XMPP::Jid & jid, const XMPP::St
}
-void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const QString &reason)
+void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const TQString &reason)
{
kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Group chat error - room " << jid.full () << " had error " << error << " (" << reason << ")" << endl;
@@ -1511,7 +1511,7 @@ void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const Q
{
case JabberClient::InvalidPasswordForMUC:
{
- QCString password;
+ TQCString password;
int result = KPasswordDialog::getPassword(password, i18n("A password is required to join the room %1.").arg(jid.node()));
if (result == KPasswordDialog::Accepted)
m_jabberClient->joinGroupChat(jid.domain(), jid.node(), jid.resource(), password);
@@ -1521,9 +1521,9 @@ void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const Q
case JabberClient::NicknameConflict:
{
bool ok;
- QString nickname = KInputDialog::getText(i18n("Error trying to join %1 : nickname %2 is already in use").arg(jid.node(), jid.resource()),
+ TQString nickname = KInputDialog::getText(i18n("Error trying to join %1 : nickname %2 is already in use").arg(jid.node(), jid.resource()),
i18n("Give your nickname"),
- QString(),
+ TQString(),
&ok);
if (ok)
{
@@ -1548,11 +1548,11 @@ void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const Q
default:
{
- QString detailedReason = reason.isEmpty () ? i18n ( "No reason given by the server" ) : reason;
+ TQString detailedReason = reason.isEmpty () ? i18n ( "No reason given by the server" ) : reason;
KMessageBox::queuedMessageBox ( Kopete::UI::Global::mainWidget (),
KMessageBox::Error,
- i18n ("There was an error processing your request for group chat %1. (Reason: %2, Code %3)").arg ( jid.full (), detailedReason, QString::number ( error ) ),
+ i18n ("There was an error processing your request for group chat %1. (Reason: %2, Code %3)").arg ( jid.full (), detailedReason, TQString::number ( error ) ),
i18n ("Jabber Group Chat") );
}
}
@@ -1581,7 +1581,7 @@ void JabberAccount::slotEditVCard ()
static_cast<JabberContact *>( myself() )->slotUserInfo ();
}
-void JabberAccount::slotGlobalIdentityChanged (const QString &key, const QVariant &value)
+void JabberAccount::slotGlobalIdentityChanged (const TQString &key, const TQVariant &value)
{
// Check if this account is excluded from Global Identity.
if( !configGroup()->readBoolEntry("ExcludeGlobalIdentity", false) )
@@ -1589,8 +1589,8 @@ void JabberAccount::slotGlobalIdentityChanged (const QString &key, const QVarian
JabberContact *jabberMyself = static_cast<JabberContact *>( myself() );
if( key == Kopete::Global::Properties::self()->nickName().key() )
{
- QString oldNick = jabberMyself->property( protocol()->propNickName ).value().toString();
- QString newNick = value.toString();
+ TQString oldNick = jabberMyself->property( protocol()->propNickName ).value().toString();
+ TQString newNick = value.toString();
if( newNick != oldNick && isConnected() )
{
@@ -1609,14 +1609,14 @@ void JabberAccount::slotGlobalIdentityChanged (const QString &key, const QVarian
}
}
-const QString JabberAccount::resource () const
+const TQString JabberAccount::resource () const
{
return configGroup()->readEntry ( "Resource", "Kopete" );
}
-const QString JabberAccount::server () const
+const TQString JabberAccount::server () const
{
return configGroup()->readEntry ( "Server" );
@@ -1653,13 +1653,13 @@ void JabberAccount::slotIncomingVoiceCall( const Jid &jid )
#endif
}
-// void JabberAccount::slotIncomingJingleSession( const QString &sessionType, JingleSession *session )
+// void JabberAccount::slotIncomingJingleSession( const TQString &sessionType, JingleSession *session )
// {
// #ifdef SUPPORT_JINGLE
// if(sessionType == "http://www.google.com/session/phone")
// {
-// QString from = ((XMPP::Jid)session->peers().first()).full();
-// //KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Information, QString("Received a voice session invitation from %1.").arg(from) );
+// TQString from = ((XMPP::Jid)session->peers().first()).full();
+// //KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Information, TQString("Received a voice session invitation from %1.").arg(from) );
// JingleVoiceSessionDialog *voiceDialog = new JingleVoiceSessionDialog( static_cast<JingleVoiceSession*>(session) );
// voiceDialog->show();
// }
@@ -1670,12 +1670,12 @@ void JabberAccount::slotIncomingVoiceCall( const Jid &jid )
// }
-void JabberAccount::addTransport( JabberTransport * tr, const QString &jid )
+void JabberAccount::addTransport( JabberTransport * tr, const TQString &jid )
{
m_transports.insert(jid,tr);
}
-void JabberAccount::removeTransport( const QString &jid )
+void JabberAccount::removeTransport( const TQString &jid )
{
m_transports.remove(jid);
}
@@ -1691,7 +1691,7 @@ bool JabberAccount::removeAccount( )
i18n("Unregister"),
KGuiItem(i18n( "Remove and Unregister" ), "editdelete"),
KGuiItem(i18n( "Remove from kopete only"), "edittrash"),
- QString(), KMessageBox::Notify | KMessageBox::Dangerous );
+ TQString(), KMessageBox::Notify | KMessageBox::Dangerous );
if(result == KMessageBox::Cancel)
{
return false;
@@ -1705,21 +1705,21 @@ bool JabberAccount::removeAccount( )
}
XMPP::JT_Register *task = new XMPP::JT_Register ( client()->rootTask () );
- QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotUnregisterFinished ) );
+ TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotUnregisterFinished ) );
task->unreg ();
task->go ( true );
m_removing=true;
// from my experiment, not all server reply us with a response. it simply dosconnect
// so after one seconde, we will force to remove the account
- QTimer::singleShot(1111, this, SLOT(slotUnregisterFinished()));
+ TQTimer::singleShot(1111, this, TQT_SLOT(slotUnregisterFinished()));
return false; //the account will be removed when the task will be finished
}
}
//remove transports from config file.
- QMap<QString,JabberTransport*> tranposrts_copy=m_transports;
- QMap<QString,JabberTransport*>::Iterator it;
+ TQMap<TQString,JabberTransport*> tranposrts_copy=m_transports;
+ TQMap<TQString,JabberTransport*>::Iterator it;
for ( it = tranposrts_copy.begin(); it != tranposrts_copy.end(); ++it )
{
(*it)->jabberAccountRemoved();
diff --git a/kopete/protocols/jabber/jabberaccount.h b/kopete/protocols/jabber/jabberaccount.h
index 3731b590..a2781006 100644
--- a/kopete/protocols/jabber/jabberaccount.h
+++ b/kopete/protocols/jabber/jabberaccount.h
@@ -59,15 +59,15 @@ class JabberAccount : public Kopete::PasswordedAccount
Q_OBJECT
public:
- JabberAccount (JabberProtocol * parent, const QString & accountID, const char *name = 0L);
+ JabberAccount (JabberProtocol * parent, const TQString & accountID, const char *name = 0L);
~JabberAccount ();
/* Returns the action menu for this account. */
virtual KActionMenu *actionMenu ();
/* Return the resource of the client */
- const QString resource () const;
- const QString server () const;
+ const TQString resource () const;
+ const TQString server () const;
const int port () const;
JabberResourcePool *resourcePool ();
@@ -124,9 +124,9 @@ public:
/*
* Handle stream errors. Displays a dialog and returns.
*/
- static void handleStreamError (int streamError, int streamCondition, int connectorCode, const QString &server, Kopete::Account::DisconnectReason &errorClass);
+ static void handleStreamError (int streamError, int streamCondition, int connectorCode, const TQString &server, Kopete::Account::DisconnectReason &errorClass);
- const QMap<QString, JabberTransport *> &transports()
+ const TQMap<TQString, JabberTransport *> &transports()
{ return m_transports; }
@@ -137,7 +137,7 @@ public:
public slots:
/* Connects to the server. */
- void connectWithPassword ( const QString &password );
+ void connectWithPassword ( const TQString &password );
/* Disconnects from the server. */
void disconnect ();
@@ -148,10 +148,10 @@ public slots:
/* Disconnect with a reason, and status */
void disconnect( Kopete::Account::DisconnectReason reason, XMPP::Status &status );
/* Reimplemented from Kopete::Account */
- void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null);
+ void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null);
- void addTransport( JabberTransport *tr , const QString &jid);
- void removeTransport( const QString &jid );
+ void addTransport( JabberTransport *tr , const TQString &jid);
+ void removeTransport( const TQString &jid );
protected:
@@ -172,7 +172,7 @@ protected:
* @param contactId The unique ID for this protocol
* @param parentContact The metacontact to add this contact to
*/
- virtual bool createContact (const QString & contactID, Kopete::MetaContact * parentContact);
+ virtual bool createContact (const TQString & contactID, Kopete::MetaContact * parentContact);
@@ -211,7 +211,7 @@ private:
*/
bool isConnecting ();
- QMap<QString, JabberTransport *>m_transports;
+ TQMap<TQString, JabberTransport *>m_transports;
/* used in removeAccount() */
bool m_removing;
@@ -247,7 +247,7 @@ private slots:
void slotIncomingFileTransfer ();
/* Called from Psi: debug messages from the backend. */
- void slotClientDebugMessage (const QString &msg);
+ void slotClientDebugMessage (const TQString &msg);
/* Sends a raw message to the server (use with caution) */
void slotSendRaw ();
@@ -257,13 +257,13 @@ private slots:
void slotGroupChatJoined ( const XMPP::Jid &jid );
void slotGroupChatLeft ( const XMPP::Jid &jid );
void slotGroupChatPresence ( const XMPP::Jid &jid, const XMPP::Status &status );
- void slotGroupChatError ( const XMPP::Jid &jid, int error, const QString &reason );
+ void slotGroupChatError ( const XMPP::Jid &jid, int error, const TQString &reason );
/* Incoming subscription request. */
- void slotSubscription ( const XMPP::Jid &jid, const QString &type );
+ void slotSubscription ( const XMPP::Jid &jid, const TQString &type );
/* the dialog that asked to add the contact was closed (that dialog is shown in slotSubscription) */
- void slotContactAddedNotifyDialogClosed(const QString& contactid);
+ void slotContactAddedNotifyDialogClosed(const TQString& contactid);
/**
* A new item appeared in our roster, synch it with the
@@ -295,7 +295,7 @@ private slots:
void slotGetServices ();
/* Update the myself information if the global identity changes. */
- void slotGlobalIdentityChanged( const QString &key, const QVariant &value );
+ void slotGlobalIdentityChanged( const TQString &key, const TQVariant &value );
/* we received a voice invitation */
void slotIncomingVoiceCall(const Jid&);
@@ -303,7 +303,7 @@ private slots:
/* the unregister task finished */
void slotUnregisterFinished();
- //void slotIncomingJingleSession(const QString &sessionType, JingleSession *session);
+ //void slotIncomingJingleSession(const TQString &sessionType, JingleSession *session);
};
#endif
diff --git a/kopete/protocols/jabber/jabberbasecontact.cpp b/kopete/protocols/jabber/jabberbasecontact.cpp
index 56cc1de4..cffc65f9 100644
--- a/kopete/protocols/jabber/jabberbasecontact.cpp
+++ b/kopete/protocols/jabber/jabberbasecontact.cpp
@@ -20,9 +20,9 @@
#include <klocale.h>
#include <kiconloader.h>
#include <kstandarddirs.h>
-#include <qtimer.h>
-#include <qimage.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqimage.h>
+#include <tqregexp.h>
#include <kmessagebox.h>
#include <kio/netaccess.h>
@@ -48,7 +48,7 @@
/**
* JabberBaseContact constructor
*/
-JabberBaseContact::JabberBaseContact (const XMPP::RosterItem &rosterItem, Kopete::Account *account, Kopete::MetaContact * mc, const QString &legacyId)
+JabberBaseContact::JabberBaseContact (const XMPP::RosterItem &rosterItem, Kopete::Account *account, Kopete::MetaContact * mc, const TQString &legacyId)
: Kopete::Contact (account, legacyId.isEmpty() ? rosterItem.jid().full() : legacyId , mc )
{
setDontSync ( false );
@@ -112,8 +112,8 @@ void JabberBaseContact::updateContact ( const XMPP::RosterItem & item )
// only update the alias if its not empty
if ( !item.name().isEmpty () && item.name() != item.jid().bare() )
{
- QString newName = item.name ();
- QString oldName = metaContact()->displayName();
+ TQString newName = item.name ();
+ TQString oldName = metaContact()->displayName();
Kopete::Contact *source=metaContact()->displayNameSourceContact();
// kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "setting display name of " << contactId () << " to " << newName << endl;
metaContact()->setDisplayName ( newName );
@@ -217,7 +217,7 @@ void JabberBaseContact::updateContact ( const XMPP::RosterItem & item )
setDontSync ( false );
//can't do it now because it's called from contructor at a point some virtual function are not available
- QTimer::singleShot(0, this, SLOT(reevaluateStatus()));
+ TQTimer::singleShot(0, this, TQT_SLOT(reevaluateStatus()));
}
@@ -239,50 +239,50 @@ void JabberBaseContact::updateResourceList ()
return;
}
- QString resourceListStr = "<table cellspacing=\"0\">";
+ TQString resourceListStr = "<table cellspacing=\"0\">";
for ( JabberResourcePool::ResourceList::iterator it = resourceList.begin (); it != resourceList.end (); ++it )
{
// icon, resource name and priority
- resourceListStr += QString ( "<tr><td><img src=\"kopete-onlinestatus-icon:%1\" /> <b>%2</b> (Priority: %3)</td></tr>" ).
+ resourceListStr += TQString ( "<tr><td><img src=\"kopete-onlinestatus-icon:%1\" /> <b>%2</b> (Priority: %3)</td></tr>" ).
arg ( protocol()->resourceToKOS((*it)->resource()).mimeSourceFor ( account () ),
- (*it)->resource().name (), QString::number ( (*it)->resource().priority () ) );
+ (*it)->resource().name (), TQString::number ( (*it)->resource().priority () ) );
// client name, version, OS
if ( !(*it)->clientName().isEmpty () )
{
- resourceListStr += QString ( "<tr><td>%1: %2 (%3)</td></tr>" ).
+ resourceListStr += TQString ( "<tr><td>%1: %2 (%3)</td></tr>" ).
arg ( i18n ( "Client" ), (*it)->clientName (), (*it)->clientSystem () );
}
// Supported features
#if 0 //disabled because it's just an ugly and long list of incomprehensible namespaces to the user
- QStringList supportedFeatures = (*it)->features().list();
- QStringList::ConstIterator featuresIt, featuresItEnd = supportedFeatures.constEnd();
+ TQStringList supportedFeatures = (*it)->features().list();
+ TQStringList::ConstIterator featuresIt, featuresItEnd = supportedFeatures.constEnd();
if( !supportedFeatures.empty() )
- resourceListStr += QString( "<tr><td>Supported Features:" );
+ resourceListStr += TQString( "<tr><td>Supported Features:" );
for( featuresIt = supportedFeatures.constBegin(); featuresIt != featuresItEnd; ++featuresIt )
{
XMPP::Features tempFeature(*featuresIt);
- resourceListStr += QString("\n<br>");
+ resourceListStr += TQString("\n<br>");
if ( tempFeature.id() > XMPP::Features::FID_None )
- resourceListStr += tempFeature.name() + QString(" (");
+ resourceListStr += tempFeature.name() + TQString(" (");
resourceListStr += *featuresIt;
if ( tempFeature.id() > Features::FID_None )
- resourceListStr += QString(")");
+ resourceListStr += TQString(")");
}
if( !supportedFeatures.empty() )
- resourceListStr += QString( "</td></tr>" );
+ resourceListStr += TQString( "</td></tr>" );
#endif
// resource timestamp
- resourceListStr += QString ( "<tr><td>%1: %2</td></tr>" ).
+ resourceListStr += TQString ( "<tr><td>%1: %2</td></tr>" ).
arg ( i18n ( "Timestamp" ), KGlobal::locale()->formatDateTime ( (*it)->resource().status().timeStamp(), true, true ) );
// message, if any
if ( !(*it)->resource().status().status().stripWhiteSpace().isEmpty () )
{
- resourceListStr += QString ( "<tr><td>%1: %2</td></tr>" ).
+ resourceListStr += TQString ( "<tr><td>%1: %2</td></tr>" ).
arg (
i18n ( "Message" ),
Kopete::Message::escape( (*it)->resource().status().status () )
@@ -313,7 +313,7 @@ void JabberBaseContact::reevaluateStatus ()
status.weight() ,
protocol() ,
status.internalStatus() | 0x0100,
- status.overlayIcons() + QStringList("status_unknown_overlay") , //FIXME: find better icon
+ status.overlayIcons() + TQStringList("status_unknown_overlay") , //FIXME: find better icon
status.description() );
}
@@ -338,7 +338,7 @@ void JabberBaseContact::reevaluateStatus ()
}
-QString JabberBaseContact::fullAddress ()
+TQString JabberBaseContact::fullAddress ()
{
XMPP::Jid jid = rosterItem().jid();
@@ -384,13 +384,13 @@ bool JabberBaseContact::dontSync ()
}
-void JabberBaseContact::serialize (QMap < QString, QString > &serializedData, QMap < QString, QString > & /* addressBookData */ )
+void JabberBaseContact::serialize (TQMap < TQString, TQString > &serializedData, TQMap < TQString, TQString > & /* addressBookData */ )
{
// Contact id and display name are already set for us, only add the rest
serializedData["JID"] = mRosterItem.jid().full();
- serializedData["groups"] = mRosterItem.groups ().join (QString::fromLatin1 (","));
+ serializedData["groups"] = mRosterItem.groups ().join (TQString::fromLatin1 (","));
}
void JabberBaseContact::slotUserInfo( )
@@ -414,7 +414,7 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard )
// update vCard cache timestamp if this is not a temporary contact
if ( metaContact() && !metaContact()->isTemporary () )
{
- setProperty ( protocol()->propVCardCacheTimeStamp, QDateTime::currentDateTime().toString ( Qt::ISODate ) );
+ setProperty ( protocol()->propVCardCacheTimeStamp, TQDateTime::currentDateTime().toString ( Qt::ISODate ) );
}
@@ -449,8 +449,8 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard )
if ( !vCard.fullName().isEmpty () && vCard.givenName().isEmpty () && vCard.familyName().isEmpty () )
{
- QString lastName = vCard.fullName().section ( ' ', 0, -1 );
- QString firstName = vCard.fullName().left(vCard.fullName().length () - lastName.length ()).stripWhiteSpace ();
+ TQString lastName = vCard.fullName().section ( ' ', 0, -1 );
+ TQString firstName = vCard.fullName().left(vCard.fullName().length () - lastName.length ()).stripWhiteSpace ();
setProperty ( protocol()->propFirstName, firstName );
setProperty ( protocol()->propLastName, lastName );
@@ -628,22 +628,22 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard )
*/
removeProperty( protocol()->propPhoto );
- QImage contactPhoto;
- QString fullJid = mRosterItem.jid().full();
- QString finalPhotoPath = locateLocal("appdata", "jabberphotos/" + fullJid.replace(QRegExp("[./~]"),"-") +".png");
+ TQImage contactPhoto;
+ TQString fullJid = mRosterItem.jid().full();
+ TQString finalPhotoPath = locateLocal("appdata", "jabberphotos/" + fullJid.replace(TQRegExp("[./~]"),"-") +".png");
// photo() is a QByteArray
if ( !vCard.photo().isEmpty() )
{
kdDebug( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Contact has a photo embedded into his vCard." << endl;
- // QImage is used to save to disk in PNG later.
- contactPhoto = QImage( vCard.photo() );
+ // TQImage is used to save to disk in PNG later.
+ contactPhoto = TQImage( vCard.photo() );
}
// Contact photo is a URI.
else if( !vCard.photoURI().isEmpty() )
{
- QString tempPhotoPath = 0;
+ TQString tempPhotoPath = 0;
// Downalod photo from URI.
if( !KIO::NetAccess::download( vCard.photoURI(), tempPhotoPath, 0) )
@@ -654,7 +654,7 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard )
kdDebug( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Contact photo is a URI." << endl;
- contactPhoto = QImage( tempPhotoPath );
+ contactPhoto = TQImage( tempPhotoPath );
KIO::NetAccess::removeTempFile( tempPhotoPath );
}
diff --git a/kopete/protocols/jabber/jabberbasecontact.h b/kopete/protocols/jabber/jabberbasecontact.h
index 7ba5c3fb..ef9b7416 100644
--- a/kopete/protocols/jabber/jabberbasecontact.h
+++ b/kopete/protocols/jabber/jabberbasecontact.h
@@ -44,7 +44,7 @@ public:
*/
JabberBaseContact (const XMPP::RosterItem &rosterItem,
Kopete::Account *account, Kopete::MetaContact * mc,
- const QString &legacyId=QString());
+ const TQString &legacyId=TQString());
/********************************************************************
*
@@ -77,12 +77,12 @@ public:
* Create custom context menu items for the contact
* FIXME: implement manager version here?
*/
- virtual QPtrList<KAction> *customContextMenuActions () = 0;
+ virtual TQPtrList<KAction> *customContextMenuActions () = 0;
/**
* Serialize contact
*/
- virtual void serialize (QMap < QString, QString > &serializedData, QMap < QString, QString > &addressBookData);
+ virtual void serialize (TQMap < TQString, TQString > &serializedData, TQMap < TQString, TQString > &addressBookData);
/**
* Update contact if a roster item has been
@@ -106,7 +106,7 @@ public:
* Uses bestResource() if no presubscribed
* address exists.
*/
- QString fullAddress ();
+ TQString fullAddress ();
/**
* Set the dontSync flag for this contact.
diff --git a/kopete/protocols/jabber/jabberbookmarks.cpp b/kopete/protocols/jabber/jabberbookmarks.cpp
index 720705b2..661f0974 100644
--- a/kopete/protocols/jabber/jabberbookmarks.cpp
+++ b/kopete/protocols/jabber/jabberbookmarks.cpp
@@ -26,9 +26,9 @@
#include "xmpp_tasks.h"
-JabberBookmarks::JabberBookmarks(JabberAccount *parent) : QObject(parent) , m_account(parent)
+JabberBookmarks::JabberBookmarks(JabberAccount *parent) : TQObject(parent) , m_account(parent)
{
- connect( m_account , SIGNAL( isConnectedChanged() ) , this , SLOT( accountConnected() ) );
+ connect( m_account , TQT_SIGNAL( isConnectedChanged() ) , this , TQT_SLOT( accountConnected() ) );
}
void JabberBookmarks::accountConnected()
@@ -38,34 +38,34 @@ void JabberBookmarks::accountConnected()
XMPP::JT_PrivateStorage * task = new XMPP::JT_PrivateStorage ( m_account->client()->rootTask ());
task->get( "storage" , "storage:bookmarks" );
- QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotReceivedBookmarks() ) );
+ TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotReceivedBookmarks() ) );
task->go ( true );
}
void JabberBookmarks::slotReceivedBookmarks( )
{
XMPP::JT_PrivateStorage * task = (XMPP::JT_PrivateStorage*)(sender());
- m_storage=QDomDocument("storage");
+ m_storage=TQDomDocument("storage");
m_conferencesJID.clear();
if(task->success())
{
- QDomElement storage_e=task->element();
+ TQDomElement storage_e=task->element();
if(!storage_e.isNull() && storage_e.tagName() == "storage")
{
storage_e=m_storage.importNode(storage_e,true).toElement();
m_storage.appendChild(storage_e);
- for(QDomNode n = storage_e.firstChild(); !n.isNull(); n = n.nextSibling())
+ for(TQDomNode n = storage_e.firstChild(); !n.isNull(); n = n.nextSibling())
{
- QDomElement i = n.toElement();
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == "conference")
{
- QString jid=i.attribute("jid");
- QString password;
- for(QDomNode n = i.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement e = n.toElement();
+ TQString jid=i.attribute("jid");
+ TQString password;
+ for(TQDomNode n = i.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement e = n.toElement();
if(e.isNull())
continue;
else if(e.tagName() == "nick")
@@ -78,7 +78,7 @@ void JabberBookmarks::slotReceivedBookmarks( )
if(i.attribute("autojoin") == "true")
{
XMPP::Jid x_jid(jid);
- QString nick=x_jid.resource();
+ TQString nick=x_jid.resource();
if(nick.isEmpty())
nick=m_account->myself()->nickName();
@@ -101,7 +101,7 @@ void JabberBookmarks::insertGroupChat(const XMPP::Jid &jid)
return;
}
- QDomElement storage_e=m_storage.documentElement();
+ TQDomElement storage_e=m_storage.documentElement();
if(storage_e.isNull())
{
storage_e=m_storage.createElement("storage");
@@ -109,13 +109,13 @@ void JabberBookmarks::insertGroupChat(const XMPP::Jid &jid)
storage_e.setAttribute("xmlns","storage:bookmarks");
}
- QDomElement conference=m_storage.createElement("conference");
+ TQDomElement conference=m_storage.createElement("conference");
storage_e.appendChild(conference);
conference.setAttribute("jid",jid.userHost());
- QDomElement nick=m_storage.createElement("nick");
+ TQDomElement nick=m_storage.createElement("nick");
conference.appendChild(nick);
nick.appendChild(m_storage.createTextNode(jid.resource()));
- QDomElement name=m_storage.createElement("name");
+ TQDomElement name=m_storage.createElement("name");
conference.appendChild(name);
name.appendChild(m_storage.createTextNode(jid.full()));
@@ -127,15 +127,15 @@ void JabberBookmarks::insertGroupChat(const XMPP::Jid &jid)
m_conferencesJID += jid.full();
}
-KAction * JabberBookmarks::bookmarksAction(QObject *parent)
+KAction * JabberBookmarks::bookmarksAction(TQObject *parent)
{
KSelectAction *groupchatBM = new KSelectAction( i18n("Groupchat bookmark") , "jabber_group" , 0 , parent , "actionBookMark" );
groupchatBM->setItems(m_conferencesJID);
- QObject::connect(groupchatBM, SIGNAL(activated (const QString&)) , this, SLOT(slotJoinChatBookmark(const QString&)));
+ TQObject::connect(groupchatBM, TQT_SIGNAL(activated (const TQString&)) , this, TQT_SLOT(slotJoinChatBookmark(const TQString&)));
return groupchatBM;
}
-void JabberBookmarks::slotJoinChatBookmark( const QString & _jid )
+void JabberBookmarks::slotJoinChatBookmark( const TQString & _jid )
{
if(!m_account->isConnected())
return;
diff --git a/kopete/protocols/jabber/jabberbookmarks.h b/kopete/protocols/jabber/jabberbookmarks.h
index 826d15e2..31675b50 100644
--- a/kopete/protocols/jabber/jabberbookmarks.h
+++ b/kopete/protocols/jabber/jabberbookmarks.h
@@ -18,9 +18,9 @@
#ifndef JABBERBOOKMARKS_H
#define JABBERBOOKMARKS_H
-#include <qobject.h>
-#include <qdom.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
namespace XMPP { class Jid; }
class JabberAccount;
@@ -52,17 +52,17 @@ class JabberBookmarks : public QObject
/**
* return an action that will be added in the jabber popup menu
*/
- KAction *bookmarksAction(QObject * parent);
+ KAction *bookmarksAction(TQObject * parent);
private slots:
void accountConnected();
void slotReceivedBookmarks();
- void slotJoinChatBookmark(const QString&);
+ void slotJoinChatBookmark(const TQString&);
private:
JabberAccount *m_account;
- QDomDocument m_storage;
- QStringList m_conferencesJID;
+ TQDomDocument m_storage;
+ TQStringList m_conferencesJID;
};
#endif
diff --git a/kopete/protocols/jabber/jabberbytestream.cpp b/kopete/protocols/jabber/jabberbytestream.cpp
index 2f0f5c80..1021757d 100644
--- a/kopete/protocols/jabber/jabberbytestream.cpp
+++ b/kopete/protocols/jabber/jabberbytestream.cpp
@@ -17,14 +17,14 @@
* *
***************************************************************************/
-#include <qobject.h>
+#include <tqobject.h>
#include <kdebug.h>
#include "jabberbytestream.h"
#include <kbufferedsocket.h>
#include <kresolver.h>
#include "jabberprotocol.h"
-JabberByteStream::JabberByteStream ( QObject *parent, const char */*name*/ )
+JabberByteStream::JabberByteStream ( TQObject *parent, const char */*name*/ )
: ByteStream ( parent )
{
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Instantiating new Jabber byte stream." << endl;
@@ -38,15 +38,15 @@ JabberByteStream::JabberByteStream ( QObject *parent, const char */*name*/ )
mSocket->enableRead ( true );
// connect signals and slots
- QObject::connect ( mSocket, SIGNAL ( gotError ( int ) ), this, SLOT ( slotError ( int ) ) );
- QObject::connect ( mSocket, SIGNAL ( connected ( const KResolverEntry& ) ), this, SLOT ( slotConnected () ) );
- QObject::connect ( mSocket, SIGNAL ( closed () ), this, SLOT ( slotConnectionClosed () ) );
- QObject::connect ( mSocket, SIGNAL ( readyRead () ), this, SLOT ( slotReadyRead () ) );
- QObject::connect ( mSocket, SIGNAL ( bytesWritten ( int ) ), this, SLOT ( slotBytesWritten ( int ) ) );
+ TQObject::connect ( mSocket, TQT_SIGNAL ( gotError ( int ) ), this, TQT_SLOT ( slotError ( int ) ) );
+ TQObject::connect ( mSocket, TQT_SIGNAL ( connected ( const KResolverEntry& ) ), this, TQT_SLOT ( slotConnected () ) );
+ TQObject::connect ( mSocket, TQT_SIGNAL ( closed () ), this, TQT_SLOT ( slotConnectionClosed () ) );
+ TQObject::connect ( mSocket, TQT_SIGNAL ( readyRead () ), this, TQT_SLOT ( slotReadyRead () ) );
+ TQObject::connect ( mSocket, TQT_SIGNAL ( bytesWritten ( int ) ), this, TQT_SLOT ( slotBytesWritten ( int ) ) );
}
-bool JabberByteStream::connect ( QString host, QString service )
+bool JabberByteStream::connect ( TQString host, TQString service )
{
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Connecting to " << host << ", service " << service << endl;
@@ -78,7 +78,7 @@ int JabberByteStream::tryWrite ()
{
// send all data from the buffers to the socket
- QByteArray writeData = takeWrite();
+ TQByteArray writeData = takeWrite();
socket()->writeBlock ( writeData.data (), writeData.size () );
return writeData.size ();
@@ -128,7 +128,7 @@ void JabberByteStream::slotReadyRead ()
{
// stuff all available data into our buffers
- QByteArray readBuffer ( socket()->bytesAvailable () );
+ TQByteArray readBuffer ( socket()->bytesAvailable () );
socket()->readBlock ( readBuffer.data (), readBuffer.size () );
diff --git a/kopete/protocols/jabber/jabberbytestream.h b/kopete/protocols/jabber/jabberbytestream.h
index 97e1ceeb..882d3007 100644
--- a/kopete/protocols/jabber/jabberbytestream.h
+++ b/kopete/protocols/jabber/jabberbytestream.h
@@ -33,11 +33,11 @@ class JabberByteStream : public ByteStream
Q_OBJECT
public:
- JabberByteStream ( QObject *parent = 0, const char *name = 0 );
+ JabberByteStream ( TQObject *parent = 0, const char *name = 0 );
~JabberByteStream ();
- bool connect ( QString host, QString service );
+ bool connect ( TQString host, TQString service );
virtual bool isOpen () const;
virtual void close ();
diff --git a/kopete/protocols/jabber/jabbercapabilitiesmanager.cpp b/kopete/protocols/jabber/jabbercapabilitiesmanager.cpp
index e570d241..9d9dd770 100644
--- a/kopete/protocols/jabber/jabbercapabilitiesmanager.cpp
+++ b/kopete/protocols/jabber/jabbercapabilitiesmanager.cpp
@@ -19,12 +19,12 @@
*/
#include "jabbercapabilitiesmanager.h"
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtimer.h>
-#include <qpair.h>
-#include <qdom.h>
-#include <qtextstream.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
+#include <tqpair.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
#include <kstandarddirs.h>
#include <kdebug.h>
@@ -40,21 +40,21 @@ using namespace XMPP;
JabberCapabilitiesManager::Capabilities::Capabilities()
{}
-JabberCapabilitiesManager::Capabilities::Capabilities(const QString& node, const QString& version, const QString& extensions)
+JabberCapabilitiesManager::Capabilities::Capabilities(const TQString& node, const TQString& version, const TQString& extensions)
: m_node(node), m_version(version), m_extensions(extensions)
{}
-const QString& JabberCapabilitiesManager::Capabilities::node() const
+const TQString& JabberCapabilitiesManager::Capabilities::node() const
{
return m_node;
}
-const QString& JabberCapabilitiesManager::Capabilities::version() const
+const TQString& JabberCapabilitiesManager::Capabilities::version() const
{
return m_version;
}
-const QString& JabberCapabilitiesManager::Capabilities::extensions() const
+const TQString& JabberCapabilitiesManager::Capabilities::extensions() const
{
return m_extensions;
}
@@ -64,8 +64,8 @@ JabberCapabilitiesManager::CapabilitiesList JabberCapabilitiesManager::Capabilit
CapabilitiesList capsList;
capsList.append( Capabilities(node(), version(), version()) );
- QStringList extensionList = QStringList::split(" ",extensions());
- QStringList::ConstIterator it, itEnd = extensionList.constEnd();
+ TQStringList extensionList = TQStringList::split(" ",extensions());
+ TQStringList::ConstIterator it, itEnd = extensionList.constEnd();
for(it = extensionList.constBegin(); it != itEnd; ++it)
{
capsList.append( Capabilities(node(),version(),*it) );
@@ -99,7 +99,7 @@ JabberCapabilitiesManager::CapabilitiesInformation::CapabilitiesInformation()
updateLastSeen();
}
-const QStringList& JabberCapabilitiesManager::CapabilitiesInformation::features() const
+const TQStringList& JabberCapabilitiesManager::CapabilitiesInformation::features() const
{
return m_features;
}
@@ -109,14 +109,14 @@ const DiscoItem::Identities& JabberCapabilitiesManager::CapabilitiesInformation:
return m_identities;
}
-QStringList JabberCapabilitiesManager::CapabilitiesInformation::jids() const
+TQStringList JabberCapabilitiesManager::CapabilitiesInformation::jids() const
{
- QStringList jids;
+ TQStringList jids;
- QValueList<QPair<QString,JabberAccount*> >::ConstIterator it = m_jids.constBegin(), itEnd = m_jids.constEnd();
+ TQValueList<QPair<TQString,JabberAccount*> >::ConstIterator it = m_jids.constBegin(), itEnd = m_jids.constEnd();
for( ; it != itEnd; ++it)
{
- QString jid( (*it).first );
+ TQString jid( (*it).first );
if( !jids.contains(jid) )
jids.push_back(jid);
}
@@ -143,12 +143,12 @@ void JabberCapabilitiesManager::CapabilitiesInformation::reset()
void JabberCapabilitiesManager::CapabilitiesInformation::removeAccount(JabberAccount *account)
{
- QValueList<QPair<QString,JabberAccount*> >::Iterator it = m_jids.begin();
+ TQValueList<QPair<TQString,JabberAccount*> >::Iterator it = m_jids.begin();
while( it != m_jids.end() )
{
if( (*it).second == account)
{
- QValueList<QPair<QString,JabberAccount*> >::Iterator otherIt = it;
+ TQValueList<QPair<TQString,JabberAccount*> >::Iterator otherIt = it;
it++;
m_jids.remove(otherIt);
}
@@ -161,7 +161,7 @@ void JabberCapabilitiesManager::CapabilitiesInformation::removeAccount(JabberAcc
void JabberCapabilitiesManager::CapabilitiesInformation::addJid(const Jid& jid, JabberAccount* account)
{
- QPair<QString,JabberAccount*> jidAccountPair(jid.full(),account);
+ QPair<TQString,JabberAccount*> jidAccountPair(jid.full(),account);
if( !m_jids.contains(jidAccountPair) )
{
@@ -172,14 +172,14 @@ void JabberCapabilitiesManager::CapabilitiesInformation::addJid(const Jid& jid,
void JabberCapabilitiesManager::CapabilitiesInformation::removeJid(const Jid& jid)
{
- kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Unregistering " << QString(jid.full()).replace('%',"%%") << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Unregistering " << TQString(jid.full()).replace('%',"%%") << endl;
- QValueList<QPair<QString,JabberAccount*> >::Iterator it = m_jids.begin();
+ TQValueList<QPair<TQString,JabberAccount*> >::Iterator it = m_jids.begin();
while( it != m_jids.end() )
{
if( (*it).first == jid.full() )
{
- QValueList<QPair<QString,JabberAccount*> >::Iterator otherIt = it;
+ TQValueList<QPair<TQString,JabberAccount*> >::Iterator otherIt = it;
it++;
m_jids.remove(otherIt);
}
@@ -194,7 +194,7 @@ QPair<Jid,JabberAccount*> JabberCapabilitiesManager::CapabilitiesInformation::ne
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Looking for next JID" << endl;
- QValueList<QPair<QString,JabberAccount*> >::ConstIterator it = m_jids.constBegin(), itEnd = m_jids.constEnd();
+ TQValueList<QPair<TQString,JabberAccount*> >::ConstIterator it = m_jids.constBegin(), itEnd = m_jids.constEnd();
for( ; it != itEnd; ++it)
{
if( (*it).first == jid.full() && (*it).second->client()->rootTask() == t)
@@ -233,26 +233,26 @@ void JabberCapabilitiesManager::CapabilitiesInformation::setIdentities(const Dis
m_identities = identities;
}
-void JabberCapabilitiesManager::CapabilitiesInformation::setFeatures(const QStringList& featureList)
+void JabberCapabilitiesManager::CapabilitiesInformation::setFeatures(const TQStringList& featureList)
{
m_features = featureList;
}
void JabberCapabilitiesManager::CapabilitiesInformation::updateLastSeen()
{
- m_lastSeen = QDate::currentDate();
+ m_lastSeen = TQDate::currentDate();
}
-QDomElement JabberCapabilitiesManager::CapabilitiesInformation::toXml(QDomDocument *doc) const
+TQDomElement JabberCapabilitiesManager::CapabilitiesInformation::toXml(TQDomDocument *doc) const
{
- QDomElement info = doc->createElement("info");
+ TQDomElement info = doc->createElement("info");
//info.setAttribute("last-seen",lastSeen_.toString(Qt::ISODate));
// Identities
DiscoItem::Identities::ConstIterator discoIt = m_identities.constBegin(), discoItEnd = m_identities.constEnd();
for( ; discoIt != discoItEnd; ++discoIt )
{
- QDomElement identity = doc->createElement("identity");
+ TQDomElement identity = doc->createElement("identity");
identity.setAttribute("category",(*discoIt).category);
identity.setAttribute("name",(*discoIt).name);
identity.setAttribute("type",(*discoIt).type);
@@ -260,10 +260,10 @@ QDomElement JabberCapabilitiesManager::CapabilitiesInformation::toXml(QDomDocume
}
// Features
- QStringList::ConstIterator featuresIt = m_features.constBegin(), featuresItEnd = m_features.constEnd();
+ TQStringList::ConstIterator featuresIt = m_features.constBegin(), featuresItEnd = m_features.constEnd();
for( ; featuresIt != featuresItEnd; ++featuresIt )
{
- QDomElement feature = doc->createElement("feature");
+ TQDomElement feature = doc->createElement("feature");
feature.setAttribute("node",*featuresIt);
info.appendChild(feature);
}
@@ -271,7 +271,7 @@ QDomElement JabberCapabilitiesManager::CapabilitiesInformation::toXml(QDomDocume
return info;
}
-void JabberCapabilitiesManager::CapabilitiesInformation::fromXml(const QDomElement &element)
+void JabberCapabilitiesManager::CapabilitiesInformation::fromXml(const TQDomElement &element)
{
if( element.tagName() != "info")
{
@@ -280,11 +280,11 @@ void JabberCapabilitiesManager::CapabilitiesInformation::fromXml(const QDomEleme
}
//if (!e.attribute("last-seen").isEmpty())
- // lastSeen_ = QDate::fromString(e.attribute("last-seen"),Qt::ISODate);
+ // lastSeen_ = TQDate::fromString(e.attribute("last-seen"),Qt::ISODate);
- for(QDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling())
+ for(TQDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling())
{
- QDomElement infoElement = node.toElement();
+ TQDomElement infoElement = node.toElement();
if( infoElement.isNull() )
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Null element" << endl;
@@ -321,9 +321,9 @@ public:
{}
// Map a full jid to a capabilities
- QMap<QString,Capabilities> jidCapabilitiesMap;
+ TQMap<TQString,Capabilities> jidCapabilitiesMap;
// Map a capabilities to its detail information
- QMap<Capabilities,CapabilitiesInformation> capabilitiesInformationMap;
+ TQMap<Capabilities,CapabilitiesInformation> capabilitiesInformationMap;
};
//END Private(d-ptr)
@@ -342,9 +342,9 @@ void JabberCapabilitiesManager::removeAccount(JabberAccount *account)
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Removing account " << account->accountId() << endl;
- QValueList<CapabilitiesInformation> info = d->capabilitiesInformationMap.values();
+ TQValueList<CapabilitiesInformation> info = d->capabilitiesInformationMap.values();
- QValueList<CapabilitiesInformation>::Iterator it, itEnd = info.end();
+ TQValueList<CapabilitiesInformation>::Iterator it, itEnd = info.end();
for(it = info.begin(); it != info.end(); ++it)
{
(*it).removeAccount(account);
@@ -362,7 +362,7 @@ void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const
if( jid.compare(account->client()->jid(), false) )
return;
- QString node = status.capsNode(), version = status.capsVersion(), extensions = status.capsExt();
+ TQString node = status.capsNode(), version = status.capsVersion(), extensions = status.capsExt();
Capabilities capabilities( node, version, extensions );
// Check if the capabilities was really updated(i.e the content is different)
@@ -400,7 +400,7 @@ void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const
{
if( !d->capabilitiesInformationMap[*newCapsIt].discovered() && d->capabilitiesInformationMap[*newCapsIt].pendingRequests() == 0 )
{
- kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << QString("Sending disco request to %1, node=%2").arg(QString(jid.full()).replace('%',"%%")).arg(node + "#" + (*newCapsIt).extensions()) << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << TQString("Sending disco request to %1, node=%2").arg(TQString(jid.full()).replace('%',"%%")).arg(node + "#" + (*newCapsIt).extensions()) << endl;
d->capabilitiesInformationMap[*newCapsIt].setPendingRequests(1);
requestDiscoInfo(account, jid, node + "#" + (*newCapsIt).extensions());
@@ -410,7 +410,7 @@ void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const
else
{
// Remove all caps specifications
- kdDebug(JABBER_DEBUG_GLOBAL) << QString("Illegal caps info from %1: node=%2, ver=%3").arg(QString(jid.full()).replace('%',"%%")).arg(node).arg(version) << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Illegal caps info from %1: node=%2, ver=%3").arg(TQString(jid.full()).replace('%',"%%")).arg(node).arg(version) << endl;
d->jidCapabilitiesMap.remove( jid.full() );
}
@@ -427,13 +427,13 @@ void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const
}
}
-void JabberCapabilitiesManager::requestDiscoInfo(JabberAccount *account, const Jid& jid, const QString& node)
+void JabberCapabilitiesManager::requestDiscoInfo(JabberAccount *account, const Jid& jid, const TQString& node)
{
if( !account->client()->rootTask() )
return;
JT_DiscoInfo *discoInfo = new JT_DiscoInfo(account->client()->rootTask());
- connect(discoInfo, SIGNAL(finished()), SLOT(discoRequestFinished()));
+ connect(discoInfo, TQT_SIGNAL(finished()), TQT_SLOT(discoRequestFinished()));
discoInfo->get(jid, node);
//pending_++;
//timer_.start(REQUEST_TIMEOUT,true);
@@ -448,14 +448,14 @@ void JabberCapabilitiesManager::discoRequestFinished()
DiscoItem item = discoInfo->item();
Jid jid = discoInfo->jid();
- kdDebug(JABBER_DEBUG_GLOBAL) << QString("Disco response from %1, node=%2, success=%3").arg(QString(jid.full()).replace('%',"%%")).arg(discoInfo->node()).arg(discoInfo->success()) << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Disco response from %1, node=%2, success=%3").arg(TQString(jid.full()).replace('%',"%%")).arg(discoInfo->node()).arg(discoInfo->success()) << endl;
- QStringList tokens = QStringList::split("#",discoInfo->node());
+ TQStringList tokens = TQStringList::split("#",discoInfo->node());
// Update features
Q_ASSERT(tokens.count() == 2);
- QString node = tokens[0];
- QString extensions = tokens[1];
+ TQString node = tokens[0];
+ TQString extensions = tokens[1];
Capabilities jidCapabilities = d->jidCapabilitiesMap[jid.full()];
if( jidCapabilities.node() == node )
@@ -474,8 +474,8 @@ void JabberCapabilitiesManager::discoRequestFinished()
saveInformation();
// Notify affected jids.
- QStringList jids = d->capabilitiesInformationMap[capabilities].jids();
- QStringList::ConstIterator jidsIt = jids.constBegin(), jidsItEnd = jids.constEnd();
+ TQStringList jids = d->capabilitiesInformationMap[capabilities].jids();
+ TQStringList::ConstIterator jidsIt = jids.constBegin(), jidsItEnd = jids.constEnd();
for( ; jidsIt != jidsItEnd; ++jidsItEnd )
{
emit capabilitiesChanged(*jidsIt);
@@ -486,7 +486,7 @@ void JabberCapabilitiesManager::discoRequestFinished()
QPair<Jid,JabberAccount*> jidAccountPair = d->capabilitiesInformationMap[capabilities].nextJid(jid,discoInfo->parent());
if( jidAccountPair.second )
{
- kdDebug(JABBER_DEBUG_GLOBAL) << QString("Falling back on %1.").arg(QString(jidAccountPair.first.full()).replace('%',"%%")) << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Falling back on %1.").arg(TQString(jidAccountPair.first.full()).replace('%',"%%")) << endl;
requestDiscoInfo( jidAccountPair.second, jidAccountPair.first, discoInfo->node() );
}
else
@@ -497,7 +497,7 @@ void JabberCapabilitiesManager::discoRequestFinished()
}
}
else
- kdDebug(JABBER_DEBUG_GLOBAL) << QString("Current client node '%1' does not match response '%2'").arg(jidCapabilities.node()).arg(node) << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << TQString("Current client node '%1' does not match response '%2'").arg(jidCapabilities.node()).arg(node) << endl;
//for (unsigned int i = 0; i < item.features().list().count(); i++)
// printf(" Feature: %s\n",item.features().list()[i].latin1());
@@ -512,12 +512,12 @@ void JabberCapabilitiesManager::discoRequestFinished()
void JabberCapabilitiesManager::loadCachedInformation()
{
- QString capsFileName;
- capsFileName = locateLocal("appdata", QString::fromUtf8("jabber-capabilities-cache.xml"));
+ TQString capsFileName;
+ capsFileName = locateLocal("appdata", TQString::fromUtf8("jabber-capabilities-cache.xml"));
// Load settings
- QDomDocument doc;
- QFile cacheFile(capsFileName);
+ TQDomDocument doc;
+ TQFile cacheFile(capsFileName);
if( !cacheFile.open(IO_ReadOnly) )
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Could not open the Capabilities cache from disk." << endl;
@@ -530,17 +530,17 @@ void JabberCapabilitiesManager::loadCachedInformation()
}
cacheFile.close();
- QDomElement caps = doc.documentElement();
+ TQDomElement caps = doc.documentElement();
if( caps.tagName() != "capabilities" )
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Invalid capabilities element." << endl;
return;
}
- QDomNode node;
+ TQDomNode node;
for(node = caps.firstChild(); !node.isNull(); node = node.nextSibling())
{
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( element.isNull() )
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Found a null element." << endl;
@@ -568,7 +568,7 @@ bool JabberCapabilitiesManager::capabilitiesEnabled(const Jid &jid) const
XMPP::Features JabberCapabilitiesManager::features(const Jid& jid) const
{
- QStringList featuresList;
+ TQStringList featuresList;
if( capabilitiesEnabled(jid) )
{
@@ -583,12 +583,12 @@ XMPP::Features JabberCapabilitiesManager::features(const Jid& jid) const
return Features(featuresList);
}
-QString JabberCapabilitiesManager::clientName(const Jid& jid) const
+TQString JabberCapabilitiesManager::clientName(const Jid& jid) const
{
if( capabilitiesEnabled(jid) )
{
Capabilities caps = d->jidCapabilitiesMap[jid.full()];
- QString name = d->capabilitiesInformationMap[Capabilities(caps.node(),caps.version(),caps.version())].identities().first().name;
+ TQString name = d->capabilitiesInformationMap[Capabilities(caps.node(),caps.version(),caps.version())].identities().first().name;
// Try to be intelligent about the name
/*if (name.isEmpty()) {
@@ -609,28 +609,28 @@ QString JabberCapabilitiesManager::clientName(const Jid& jid) const
}
else
{
- return QString();
+ return TQString();
}
}
-QString JabberCapabilitiesManager::clientVersion(const Jid& jid) const
+TQString JabberCapabilitiesManager::clientVersion(const Jid& jid) const
{
- return (capabilitiesEnabled(jid) ? d->jidCapabilitiesMap[jid.full()].version() : QString());
+ return (capabilitiesEnabled(jid) ? d->jidCapabilitiesMap[jid.full()].version() : TQString());
}
void JabberCapabilitiesManager::saveInformation()
{
- QString capsFileName;
- capsFileName = locateLocal("appdata", QString::fromUtf8("jabber-capabilities-cache.xml"));
+ TQString capsFileName;
+ capsFileName = locateLocal("appdata", TQString::fromUtf8("jabber-capabilities-cache.xml"));
// Generate XML
- QDomDocument doc;
- QDomElement capabilities = doc.createElement("capabilities");
+ TQDomDocument doc;
+ TQDomElement capabilities = doc.createElement("capabilities");
doc.appendChild(capabilities);
- QMap<Capabilities,CapabilitiesInformation>::ConstIterator it = d->capabilitiesInformationMap.constBegin(), itEnd = d->capabilitiesInformationMap.constEnd();
+ TQMap<Capabilities,CapabilitiesInformation>::ConstIterator it = d->capabilitiesInformationMap.constBegin(), itEnd = d->capabilitiesInformationMap.constEnd();
for( ; it != itEnd; ++it )
{
- QDomElement info = it.data().toXml(&doc);
+ TQDomElement info = it.data().toXml(&doc);
info.setAttribute("node",it.key().node());
info.setAttribute("ver",it.key().version());
info.setAttribute("ext",it.key().extensions());
@@ -638,16 +638,16 @@ void JabberCapabilitiesManager::saveInformation()
}
// Save
- QFile capsFile(capsFileName);
+ TQFile capsFile(capsFileName);
if( !capsFile.open(IO_WriteOnly) )
{
kdDebug(JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Error while opening Capabilities cache file." << endl;
return;
}
- QTextStream textStream;
+ TQTextStream textStream;
textStream.setDevice(&capsFile);
- textStream.setEncoding(QTextStream::UnicodeUTF8);
+ textStream.setEncoding(TQTextStream::UnicodeUTF8);
textStream << doc.toString();
textStream.unsetDevice();
capsFile.close();
diff --git a/kopete/protocols/jabber/jabbercapabilitiesmanager.h b/kopete/protocols/jabber/jabbercapabilitiesmanager.h
index 3010479f..a783188f 100644
--- a/kopete/protocols/jabber/jabbercapabilitiesmanager.h
+++ b/kopete/protocols/jabber/jabbercapabilitiesmanager.h
@@ -20,7 +20,7 @@
#ifndef JABBERCAPABILITIESMANAGER_H
#define JABBERCAPABILITIESMANAGER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <im.h>
#include <xmpp.h>
@@ -67,11 +67,11 @@ public:
/**
* Return the client name for the current JID.
*/
- QString clientName(const Jid& jid) const;
+ TQString clientName(const Jid& jid) const;
/**
* Return the client version for the current JID.
*/
- QString clientVersion(const Jid& jid) const;
+ TQString clientVersion(const Jid& jid) const;
signals:
void capabilitiesChanged(const XMPP::Jid &jid);
@@ -107,7 +107,7 @@ private:
* @param jid The target entity's JID
* @param node The target disco#info node
*/
- void requestDiscoInfo(JabberAccount *account, const Jid& jid, const QString& node);
+ void requestDiscoInfo(JabberAccount *account, const Jid& jid, const TQString& node);
/**
* Save capabilities information to disk.
@@ -115,7 +115,7 @@ private:
void saveInformation();
class Capabilities;
- typedef QValueList<Capabilities> CapabilitiesList;
+ typedef TQValueList<Capabilities> CapabilitiesList;
/**
* @brief A class representing an entity capability specification.
* An entity capability is a combination of a node, a version, and a set of
@@ -134,19 +134,19 @@ private:
* @param version the version
* @param extensions the list of extensions (separated by spaces)
*/
- Capabilities(const QString &node, const QString &version, const QString &extensions);
+ Capabilities(const TQString &node, const TQString &version, const TQString &extensions);
/**
* Returns the node of the capabilities specification.
*/
- const QString& node() const;
+ const TQString& node() const;
/**
* @brief Returns the version of the capabilities specification.
*/
- const QString& version() const;
+ const TQString& version() const;
/**
* @brief Returns the extensions of the capabilities specification.
*/
- const QString& extensions() const;
+ const TQString& extensions() const;
/**
* \brief Flattens the caps specification into the set of 'simple' specifications.
* A 'simple' specification is a specification with exactly one extension,
@@ -165,16 +165,16 @@ private:
bool operator<(const Capabilities&) const;
private:
- QString m_node, m_version, m_extensions;
+ TQString m_node, m_version, m_extensions;
};
class CapabilitiesInformation
{
public:
CapabilitiesInformation();
- const QStringList& features() const;
+ const TQStringList& features() const;
const DiscoItem::Identities& identities() const;
- QStringList jids() const;
+ TQStringList jids() const;
bool discovered() const;
int pendingRequests() const;
@@ -187,10 +187,10 @@ private:
void setDiscovered(bool);
void setPendingRequests(int);
void setIdentities(const DiscoItem::Identities&);
- void setFeatures(const QStringList&);
+ void setFeatures(const TQStringList&);
- QDomElement toXml(QDomDocument *) const;
- void fromXml(const QDomElement&);
+ TQDomElement toXml(TQDomDocument *) const;
+ void fromXml(const TQDomElement&);
protected:
void updateLastSeen();
@@ -198,10 +198,10 @@ private:
private:
bool m_discovered;
int m_pendingRequests;
- QStringList m_features;
+ TQStringList m_features;
DiscoItem::Identities m_identities;
- QValueList<QPair<QString,JabberAccount*> > m_jids;
- QDate m_lastSeen;
+ TQValueList<QPair<TQString,JabberAccount*> > m_jids;
+ TQDate m_lastSeen;
};
class Private;
diff --git a/kopete/protocols/jabber/jabberchatsession.cpp b/kopete/protocols/jabber/jabberchatsession.cpp
index faa6f950..e07582f7 100644
--- a/kopete/protocols/jabber/jabberchatsession.cpp
+++ b/kopete/protocols/jabber/jabberchatsession.cpp
@@ -17,12 +17,12 @@
#include "jabberchatsession.h"
-#include <qptrlist.h>
-#include <qlabel.h>
-#include <qimage.h>
-#include <qtooltip.h>
-#include <qfile.h>
-#include <qiconset.h>
+#include <tqptrlist.h>
+#include <tqlabel.h>
+#include <tqimage.h>
+#include <tqtooltip.h>
+#include <tqfile.h>
+#include <tqiconset.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -41,7 +41,7 @@
JabberChatSession::JabberChatSession ( JabberProtocol *protocol, const JabberBaseContact *user,
- Kopete::ContactPtrList others, const QString &resource, const char *name )
+ Kopete::ContactPtrList others, const TQString &resource, const char *name )
: Kopete::ChatSession ( user, others, protocol, name )
{
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "New message manager for " << user->contactId () << endl;
@@ -49,12 +49,12 @@ JabberChatSession::JabberChatSession ( JabberProtocol *protocol, const JabberBas
// make sure Kopete knows about this instance
Kopete::ChatSessionManager::self()->registerChatSession ( this );
- connect ( this, SIGNAL ( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ),
- this, SLOT ( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) );
+ connect ( this, TQT_SIGNAL ( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ),
+ this, TQT_SLOT ( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) );
- connect ( this, SIGNAL ( myselfTyping ( bool ) ), this, SLOT ( slotSendTypingNotification ( bool ) ) );
+ connect ( this, TQT_SIGNAL ( myselfTyping ( bool ) ), this, TQT_SLOT ( slotSendTypingNotification ( bool ) ) );
- connect ( this, SIGNAL ( onlineStatusChanged(Kopete::Contact*, const Kopete::OnlineStatus&, const Kopete::OnlineStatus& ) ), this, SLOT ( slotUpdateDisplayName () ) );
+ connect ( this, TQT_SIGNAL ( onlineStatusChanged(Kopete::Contact*, const Kopete::OnlineStatus&, const Kopete::OnlineStatus& ) ), this, TQT_SLOT ( slotUpdateDisplayName () ) );
// check if the user ID contains a hardwired resource,
// we'll have to use that one in that case
@@ -64,7 +64,7 @@ JabberChatSession::JabberChatSession ( JabberProtocol *protocol, const JabberBas
slotUpdateDisplayName ();
#ifdef SUPPORT_JINGLE
- KAction *jabber_voicecall = new KAction( i18n("Voice call" ), "voicecall", 0, members().getFirst(), SLOT(voiceCall ()), actionCollection(), "jabber_voicecall" );
+ KAction *jabber_voicecall = new KAction( i18n("Voice call" ), "voicecall", 0, members().getFirst(), TQT_SLOT(voiceCall ()), actionCollection(), "jabber_voicecall" );
setInstance(protocol->instance());
jabber_voicecall->setEnabled( false );
@@ -84,7 +84,7 @@ JabberChatSession::JabberChatSession ( JabberProtocol *protocol, const JabberBas
#endif
- new KAction( i18n( "Send File" ), "attach", 0, this, SLOT( slotSendFile() ), actionCollection(), "jabberSendFile" );
+ new KAction( i18n( "Send File" ), "attach", 0, this, TQT_SLOT( slotSendFile() ), actionCollection(), "jabberSendFile" );
setXMLFile("jabberchatui.rc");
@@ -116,7 +116,7 @@ void JabberChatSession::slotUpdateDisplayName ()
if ( !mResource.isEmpty () )
jid.setResource ( mResource );
- QString statusText = i18n("a contact's online status in parenthesis.", " (%1)")
+ TQString statusText = i18n("a contact's online status in parenthesis.", " (%1)")
.arg( chatMembers.first()->onlineStatus().description() );
if ( jid.resource().isEmpty () )
setDisplayName ( chatMembers.first()->metaContact()->displayName () + statusText );
@@ -139,14 +139,14 @@ JabberAccount *JabberChatSession::account () const
}
-const QString &JabberChatSession::resource () const
+const TQString &JabberChatSession::resource () const
{
return mResource;
}
-void JabberChatSession::appendMessage ( Kopete::Message &msg, const QString &fromResource )
+void JabberChatSession::appendMessage ( Kopete::Message &msg, const TQString &fromResource )
{
mResource = fromResource;
@@ -178,7 +178,7 @@ void JabberChatSession::sendNotification( XMPP::MsgEvent event )
return;
JabberContact *contact;
- QPtrListIterator<Kopete::Contact> listIterator ( members () );
+ TQPtrListIterator<Kopete::Contact> listIterator ( members () );
while ( ( contact = dynamic_cast<JabberContact*>( listIterator.current () ) ) != 0 )
{
@@ -224,7 +224,7 @@ void JabberChatSession::slotSendTypingNotification ( bool typing )
// create JID for us as sender
XMPP::Jid fromJid = static_cast<const JabberBaseContact*>(myself())->rosterItem().jid();
- fromJid.setResource ( account()->configGroup()->readEntry( "Resource", QString::null ) );
+ fromJid.setResource ( account()->configGroup()->readEntry( "Resource", TQString::null ) );
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Sending out typing notification (" << typing << ") to all chat members." << endl;
@@ -265,10 +265,10 @@ void JabberChatSession::slotMessageSent ( Kopete::Message &message, Kopete::Chat
// please don't translate the following string
jabberMessage.setBody ( i18n ( "This message is encrypted." ) );
- QString encryptedBody = message.plainBody ();
+ TQString encryptedBody = message.plainBody ();
// remove PGP header and footer from message
- encryptedBody.truncate ( encryptedBody.length () - QString("-----END PGP MESSAGE-----").length () - 2 );
+ encryptedBody.truncate ( encryptedBody.length () - TQString("-----END PGP MESSAGE-----").length () - 2 );
encryptedBody = encryptedBody.right ( encryptedBody.length () - encryptedBody.find ( "\n\n" ) - 2 );
// assign payload to message
@@ -283,7 +283,7 @@ void JabberChatSession::slotMessageSent ( Kopete::Message &message, Kopete::Chat
JabberResource *bestResource = account()->resourcePool()->bestJabberResource(toJid);
if( bestResource && bestResource->features().canXHTML() )
{
- QString xhtmlBody = message.escapedBody();
+ TQString xhtmlBody = message.escapedBody();
// According to JEP-0071 8.9 it is only RECOMMANDED to replace \n with <br/>
// which mean that some implementation (gaim 2 beta) may still think that \n are linebreak.
@@ -347,7 +347,7 @@ void JabberChatSession::slotMessageSent ( Kopete::Message &message, Kopete::Chat
void JabberChatSession::slotSendFile()
{
- QPtrList<Kopete::Contact>contacts = members();
+ TQPtrList<Kopete::Contact>contacts = members();
static_cast<JabberContact *>(contacts.first())->sendFile();
}
diff --git a/kopete/protocols/jabber/jabberchatsession.h b/kopete/protocols/jabber/jabberchatsession.h
index 66b4c63b..52b6197a 100644
--- a/kopete/protocols/jabber/jabberchatsession.h
+++ b/kopete/protocols/jabber/jabberchatsession.h
@@ -38,7 +38,7 @@ class JabberChatSession : public Kopete::ChatSession
public:
JabberChatSession ( JabberProtocol *protocol, const JabberBaseContact *user,
- Kopete::ContactPtrList others, const QString &resource = "",
+ Kopete::ContactPtrList others, const TQString &resource = "",
const char *name = 0 );
~JabberChatSession();
@@ -59,7 +59,7 @@ public:
* @brief Return the resource this manager is currently associated with.
* @return currently associated resource
*/
- const QString &resource () const;
+ const TQString &resource () const;
public slots:
/**
@@ -74,7 +74,7 @@ public slots:
* new message managers for messages not originating from the same resource
* a manager already exists for.
*/
- void appendMessage ( Kopete::Message &msg, const QString &fromResource );
+ void appendMessage ( Kopete::Message &msg, const TQString &fromResource );
private slots:
void slotSendTypingNotification ( bool typing );
@@ -94,7 +94,7 @@ private:
*/
void sendNotification( XMPP::MsgEvent event );
- QString mResource;
+ TQString mResource;
};
#endif
diff --git a/kopete/protocols/jabber/jabberclient.cpp b/kopete/protocols/jabber/jabberclient.cpp
index b8e05d48..41157aaa 100644
--- a/kopete/protocols/jabber/jabberclient.cpp
+++ b/kopete/protocols/jabber/jabberclient.cpp
@@ -21,8 +21,8 @@
#include "jabberclient.h"
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include <qca.h>
#include <bsocket.h>
@@ -55,7 +55,7 @@ public:
// connection details
XMPP::Jid jid;
- QString password;
+ TQString password;
// XMPP backend
XMPP::Client *jabberClient;
@@ -70,12 +70,12 @@ public:
// current S5B server instance
static XMPP::S5BServer *s5bServer;
// address list being handled by the S5B server instance
- static QStringList s5bAddressList;
+ static TQStringList s5bAddressList;
// port of S5B server
static int s5bServerPort;
// local IP address
- QString localAddress;
+ TQString localAddress;
// whether TLS (or direct SSL in case of the old protocol) should be used
bool forceTLS;
@@ -91,7 +91,7 @@ public:
// override the default server name and port (only pre-XMPP 1.0)
bool overrideHost;
- QString server;
+ TQString server;
int port;
// allow transmission of plaintext passwords
@@ -104,19 +104,19 @@ public:
int currentPenaltyTime;
// client information
- QString clientName, clientVersion, osName;
+ TQString clientName, clientVersion, osName;
// timezone information
- QString timeZoneName;
+ TQString timeZoneName;
int timeZoneOffset;
// Caps(JEP-0115: Entity Capabilities) information
- QString capsNode, capsVersion;
+ TQString capsNode, capsVersion;
DiscoItem::Identity discoIdentity;
};
XMPP::S5BServer *JabberClient::Private::s5bServer = 0L;
-QStringList JabberClient::Private::s5bAddressList;
+TQStringList JabberClient::Private::s5bAddressList;
int JabberClient::Private::s5bServerPort = 8010;
JabberClient::JabberClient ()
@@ -126,7 +126,7 @@ JabberClient::JabberClient ()
cleanUp ();
// initiate penalty timer
- QTimer::singleShot ( JABBER_PENALTY_TIME * 1000, this, SLOT ( slotUpdatePenaltyTime () ) );
+ TQTimer::singleShot ( JABBER_PENALTY_TIME * 1000, this, TQT_SLOT ( slotUpdatePenaltyTime () ) );
}
@@ -157,7 +157,7 @@ void JabberClient::cleanUp ()
d->currentPenaltyTime = 0;
d->jid = XMPP::Jid ();
- d->password = QString::null;
+ d->password = TQString::null;
setForceTLS ( false );
setUseSSL ( false );
@@ -171,9 +171,9 @@ void JabberClient::cleanUp ()
setFileTransfersEnabled ( false );
setS5BServerPort ( 8010 );
- setClientName ( QString::null );
- setClientVersion ( QString::null );
- setOSName ( QString::null );
+ setClientName ( TQString::null );
+ setClientVersion ( TQString::null );
+ setOSName ( TQString::null );
setTimeZone ( "UTC", 0 );
@@ -189,7 +189,7 @@ void JabberClient::slotUpdatePenaltyTime ()
else
d->currentPenaltyTime = 0;
- QTimer::singleShot ( JABBER_PENALTY_TIME * 1000, this, SLOT ( slotUpdatePenaltyTime () ) );
+ TQTimer::singleShot ( JABBER_PENALTY_TIME * 1000, this, TQT_SLOT ( slotUpdatePenaltyTime () ) );
}
@@ -234,7 +234,7 @@ XMPP::S5BServer *JabberClient::s5bServer ()
if ( !d->s5bServer )
{
d->s5bServer = new XMPP::S5BServer ();
- QObject::connect ( d->s5bServer, SIGNAL ( destroyed () ), this, SLOT ( slotS5BServerGone () ) );
+ TQObject::connect ( d->s5bServer, TQT_SIGNAL ( destroyed () ), this, TQT_SLOT ( slotS5BServerGone () ) );
/*
* Try to start the server at the default port here.
@@ -263,14 +263,14 @@ void JabberClient::slotS5BServerGone ()
}
-void JabberClient::addS5BServerAddress ( const QString &address )
+void JabberClient::addS5BServerAddress ( const TQString &address )
{
- QStringList newList;
+ TQStringList newList;
d->s5bAddressList.append ( address );
// now filter the list without dupes
- for ( QStringList::Iterator it = d->s5bAddressList.begin (); it != d->s5bAddressList.end (); ++it )
+ for ( TQStringList::Iterator it = d->s5bAddressList.begin (); it != d->s5bAddressList.end (); ++it )
{
if ( !newList.contains ( *it ) )
newList.append ( *it );
@@ -280,11 +280,11 @@ void JabberClient::addS5BServerAddress ( const QString &address )
}
-void JabberClient::removeS5BServerAddress ( const QString &address )
+void JabberClient::removeS5BServerAddress ( const TQString &address )
{
- QStringList newList;
+ TQStringList newList;
- QStringList::iterator it = d->s5bAddressList.find ( address );
+ TQStringList::iterator it = d->s5bAddressList.find ( address );
if ( it != d->s5bAddressList.end () )
{
d->s5bAddressList.remove ( it );
@@ -298,7 +298,7 @@ void JabberClient::removeS5BServerAddress ( const QString &address )
else
{
// now filter the list without dupes
- for ( QStringList::Iterator it = d->s5bAddressList.begin (); it != d->s5bAddressList.end (); ++it )
+ for ( TQStringList::Iterator it = d->s5bAddressList.begin (); it != d->s5bAddressList.end (); ++it )
{
if ( !newList.contains ( *it ) )
newList.append ( *it );
@@ -365,7 +365,7 @@ bool JabberClient::probeSSL () const
}
-void JabberClient::setOverrideHost ( bool flag, const QString &server, int port )
+void JabberClient::setOverrideHost ( bool flag, const TQString &server, int port )
{
d->overrideHost = flag;
@@ -395,7 +395,7 @@ bool JabberClient::allowPlainTextPassword () const
}
-void JabberClient::setFileTransfersEnabled ( bool flag, const QString &localAddress )
+void JabberClient::setFileTransfersEnabled ( bool flag, const TQString &localAddress )
{
d->fileTransfersEnabled = flag;
@@ -403,7 +403,7 @@ void JabberClient::setFileTransfersEnabled ( bool flag, const QString &localAddr
}
-QString JabberClient::localAddress () const
+TQString JabberClient::localAddress () const
{
return d->localAddress;
@@ -417,76 +417,76 @@ bool JabberClient::fileTransfersEnabled () const
}
-void JabberClient::setClientName ( const QString &clientName )
+void JabberClient::setClientName ( const TQString &clientName )
{
d->clientName = clientName;
}
-QString JabberClient::clientName () const
+TQString JabberClient::clientName () const
{
return d->clientName;
}
-void JabberClient::setClientVersion ( const QString &clientVersion )
+void JabberClient::setClientVersion ( const TQString &clientVersion )
{
d->clientVersion = clientVersion;
}
-QString JabberClient::clientVersion () const
+TQString JabberClient::clientVersion () const
{
return d->clientVersion;
}
-void JabberClient::setOSName ( const QString &osName )
+void JabberClient::setOSName ( const TQString &osName )
{
d->osName = osName;
}
-QString JabberClient::osName () const
+TQString JabberClient::osName () const
{
return d->osName;
}
-void JabberClient::setCapsNode( const QString &capsNode )
+void JabberClient::setCapsNode( const TQString &capsNode )
{
d->capsNode = capsNode;
}
-QString JabberClient::capsNode() const
+TQString JabberClient::capsNode() const
{
return d->capsNode;
}
-void JabberClient::setCapsVersion( const QString &capsVersion )
+void JabberClient::setCapsVersion( const TQString &capsVersion )
{
d->capsVersion = capsVersion;
}
-QString JabberClient::capsVersion() const
+TQString JabberClient::capsVersion() const
{
return d->capsVersion;
}
-QString JabberClient::capsExt() const
+TQString JabberClient::capsExt() const
{
if(d->jabberClient)
{
return d->jabberClient->capsExt();
}
- return QString();
+ return TQString();
}
void JabberClient::setDiscoIdentity( DiscoItem::Identity identity )
{
@@ -498,7 +498,7 @@ DiscoItem::Identity JabberClient::discoIdentity() const
return d->discoIdentity;
}
-void JabberClient::setTimeZone ( const QString &timeZoneName, int timeZoneOffset )
+void JabberClient::setTimeZone ( const TQString &timeZoneName, int timeZoneOffset )
{
d->timeZoneName = timeZoneName;
@@ -506,7 +506,7 @@ void JabberClient::setTimeZone ( const QString &timeZoneName, int timeZoneOffset
}
-QString JabberClient::timeZoneName () const
+TQString JabberClient::timeZoneName () const
{
return d->timeZoneName;
@@ -587,7 +587,7 @@ XMPP::Jid JabberClient::jid () const
}
-JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QString &password, bool auth )
+JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const TQString &password, bool auth )
{
/*
* Close any existing connection.
@@ -638,10 +638,10 @@ JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QStr
{
using namespace XMPP;
- QObject::connect ( d->jabberTLSHandler, SIGNAL ( tlsHandshaken() ), this, SLOT ( slotTLSHandshaken () ) );
+ TQObject::connect ( d->jabberTLSHandler, TQT_SIGNAL ( tlsHandshaken() ), this, TQT_SLOT ( slotTLSHandshaken () ) );
}
- QPtrList<QCA::Cert> certStore;
+ TQPtrList<QCA::Cert> certStore;
d->jabberTLS->setCertificateStore ( certStore );
}
@@ -653,18 +653,18 @@ JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QStr
{
using namespace XMPP;
- QObject::connect ( d->jabberClientStream, SIGNAL ( needAuthParams(bool, bool, bool) ),
- this, SLOT ( slotCSNeedAuthParams (bool, bool, bool) ) );
- QObject::connect ( d->jabberClientStream, SIGNAL ( authenticated () ),
- this, SLOT ( slotCSAuthenticated () ) );
- QObject::connect ( d->jabberClientStream, SIGNAL ( connectionClosed () ),
- this, SLOT ( slotCSDisconnected () ) );
- QObject::connect ( d->jabberClientStream, SIGNAL ( delayedCloseFinished () ),
- this, SLOT ( slotCSDisconnected () ) );
- QObject::connect ( d->jabberClientStream, SIGNAL ( warning (int) ),
- this, SLOT ( slotCSWarning (int) ) );
- QObject::connect ( d->jabberClientStream, SIGNAL ( error (int) ),
- this, SLOT ( slotCSError (int) ) );
+ TQObject::connect ( d->jabberClientStream, TQT_SIGNAL ( needAuthParams(bool, bool, bool) ),
+ this, TQT_SLOT ( slotCSNeedAuthParams (bool, bool, bool) ) );
+ TQObject::connect ( d->jabberClientStream, TQT_SIGNAL ( authenticated () ),
+ this, TQT_SLOT ( slotCSAuthenticated () ) );
+ TQObject::connect ( d->jabberClientStream, TQT_SIGNAL ( connectionClosed () ),
+ this, TQT_SLOT ( slotCSDisconnected () ) );
+ TQObject::connect ( d->jabberClientStream, TQT_SIGNAL ( delayedCloseFinished () ),
+ this, TQT_SLOT ( slotCSDisconnected () ) );
+ TQObject::connect ( d->jabberClientStream, TQT_SIGNAL ( warning (int) ),
+ this, TQT_SLOT ( slotCSWarning (int) ) );
+ TQObject::connect ( d->jabberClientStream, TQT_SIGNAL ( error (int) ),
+ this, TQT_SLOT ( slotCSError (int) ) );
}
d->jabberClientStream->setOldOnly ( useXMPP09 () );
@@ -694,8 +694,8 @@ JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QStr
{
using namespace XMPP;
- QObject::connect ( d->jabberClient->fileTransferManager(), SIGNAL ( incomingReady() ),
- this, SLOT ( slotIncomingFileTransfer () ) );
+ TQObject::connect ( d->jabberClient->fileTransferManager(), TQT_SIGNAL ( incomingReady() ),
+ this, TQT_SLOT ( slotIncomingFileTransfer () ) );
}
}
@@ -704,36 +704,36 @@ JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QStr
*/
{
using namespace XMPP;
- QObject::connect ( d->jabberClient, SIGNAL ( subscription (const Jid &, const QString &) ),
- this, SLOT ( slotSubscription (const Jid &, const QString &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( rosterRequestFinished ( bool, int, const QString & ) ),
- this, SLOT ( slotRosterRequestFinished ( bool, int, const QString & ) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( rosterItemAdded (const RosterItem &) ),
- this, SLOT ( slotNewContact (const RosterItem &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( rosterItemUpdated (const RosterItem &) ),
- this, SLOT ( slotContactUpdated (const RosterItem &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( rosterItemRemoved (const RosterItem &) ),
- this, SLOT ( slotContactDeleted (const RosterItem &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( resourceAvailable (const Jid &, const Resource &) ),
- this, SLOT ( slotResourceAvailable (const Jid &, const Resource &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( resourceUnavailable (const Jid &, const Resource &) ),
- this, SLOT ( slotResourceUnavailable (const Jid &, const Resource &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( messageReceived (const Message &) ),
- this, SLOT ( slotReceivedMessage (const Message &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( groupChatJoined (const Jid &) ),
- this, SLOT ( slotGroupChatJoined (const Jid &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( groupChatLeft (const Jid &) ),
- this, SLOT ( slotGroupChatLeft (const Jid &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( groupChatPresence (const Jid &, const Status &) ),
- this, SLOT ( slotGroupChatPresence (const Jid &, const Status &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( groupChatError (const Jid &, int, const QString &) ),
- this, SLOT ( slotGroupChatError (const Jid &, int, const QString &) ) );
- //QObject::connect ( d->jabberClient, SIGNAL (debugText (const QString &) ),
- // this, SLOT ( slotPsiDebug (const QString &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( xmlIncoming(const QString& ) ),
- this, SLOT ( slotIncomingXML (const QString &) ) );
- QObject::connect ( d->jabberClient, SIGNAL ( xmlOutgoing(const QString& ) ),
- this, SLOT ( slotOutgoingXML (const QString &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( subscription (const Jid &, const TQString &) ),
+ this, TQT_SLOT ( slotSubscription (const Jid &, const TQString &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( rosterRequestFinished ( bool, int, const TQString & ) ),
+ this, TQT_SLOT ( slotRosterRequestFinished ( bool, int, const TQString & ) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( rosterItemAdded (const RosterItem &) ),
+ this, TQT_SLOT ( slotNewContact (const RosterItem &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( rosterItemUpdated (const RosterItem &) ),
+ this, TQT_SLOT ( slotContactUpdated (const RosterItem &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( rosterItemRemoved (const RosterItem &) ),
+ this, TQT_SLOT ( slotContactDeleted (const RosterItem &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( resourceAvailable (const Jid &, const Resource &) ),
+ this, TQT_SLOT ( slotResourceAvailable (const Jid &, const Resource &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( resourceUnavailable (const Jid &, const Resource &) ),
+ this, TQT_SLOT ( slotResourceUnavailable (const Jid &, const Resource &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( messageReceived (const Message &) ),
+ this, TQT_SLOT ( slotReceivedMessage (const Message &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( groupChatJoined (const Jid &) ),
+ this, TQT_SLOT ( slotGroupChatJoined (const Jid &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( groupChatLeft (const Jid &) ),
+ this, TQT_SLOT ( slotGroupChatLeft (const Jid &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( groupChatPresence (const Jid &, const Status &) ),
+ this, TQT_SLOT ( slotGroupChatPresence (const Jid &, const Status &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( groupChatError (const Jid &, int, const TQString &) ),
+ this, TQT_SLOT ( slotGroupChatError (const Jid &, int, const TQString &) ) );
+ //TQObject::connect ( d->jabberClient, TQT_SIGNAL (debugText (const TQString &) ),
+ // this, TQT_SLOT ( slotPsiDebug (const TQString &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( xmlIncoming(const TQString& ) ),
+ this, TQT_SLOT ( slotIncomingXML (const TQString &) ) );
+ TQObject::connect ( d->jabberClient, TQT_SIGNAL ( xmlOutgoing(const TQString& ) ),
+ this, TQT_SLOT ( slotOutgoingXML (const TQString &) ) );
}
d->jabberClient->setClientName ( clientName () );
@@ -802,33 +802,33 @@ bool JabberClient::isConnected () const
}
-void JabberClient::joinGroupChat ( const QString &host, const QString &room, const QString &nick )
+void JabberClient::joinGroupChat ( const TQString &host, const TQString &room, const TQString &nick )
{
client()->groupChatJoin ( host, room, nick );
}
-void JabberClient::joinGroupChat ( const QString &host, const QString &room, const QString &nick, const QString &password )
+void JabberClient::joinGroupChat ( const TQString &host, const TQString &room, const TQString &nick, const TQString &password )
{
client()->groupChatJoin ( host, room, nick, password );
}
-void JabberClient::leaveGroupChat ( const QString &host, const QString &room )
+void JabberClient::leaveGroupChat ( const TQString &host, const TQString &room )
{
client()->groupChatLeave ( host, room );
}
-void JabberClient::setGroupChatStatus( const QString & host, const QString & room, const XMPP::Status & status )
+void JabberClient::setGroupChatStatus( const TQString & host, const TQString & room, const XMPP::Status & status )
{
client()->groupChatSetStatus( host, room, status);
}
-void JabberClient::changeGroupChatNick( const QString & host, const QString & room, const QString & nick, const XMPP::Status & status )
+void JabberClient::changeGroupChatNick( const TQString & host, const TQString & room, const TQString & nick, const XMPP::Status & status )
{
client()->groupChatChangeNick( host, room, nick, status );
}
@@ -841,7 +841,7 @@ void JabberClient::sendMessage ( const XMPP::Message &message )
}
-void JabberClient::send ( const QString &packet )
+void JabberClient::send ( const TQString &packet )
{
client()->send ( packet );
@@ -855,34 +855,34 @@ void JabberClient::requestRoster ()
}
-void JabberClient::slotPsiDebug ( const QString & _msg )
+void JabberClient::slotPsiDebug ( const TQString & _msg )
{
- QString msg = _msg;
+ TQString msg = _msg;
- msg = msg.replace( QRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" );
- msg = msg.replace( QRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" );
+ msg = msg.replace( TQRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" );
+ msg = msg.replace( TQRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" );
emit debugMessage ( "Psi: " + msg );
}
-void JabberClient::slotIncomingXML ( const QString & _msg )
+void JabberClient::slotIncomingXML ( const TQString & _msg )
{
- QString msg = _msg;
+ TQString msg = _msg;
- msg = msg.replace( QRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" );
- msg = msg.replace( QRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" );
+ msg = msg.replace( TQRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" );
+ msg = msg.replace( TQRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" );
emit debugMessage ( "XML IN: " + msg );
}
-void JabberClient::slotOutgoingXML ( const QString & _msg )
+void JabberClient::slotOutgoingXML ( const TQString & _msg )
{
- QString msg = _msg;
+ TQString msg = _msg;
- msg = msg.replace( QRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" );
- msg = msg.replace( QRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" );
+ msg = msg.replace( TQRegExp( "<password>[^<]*</password>\n" ), "<password>[Filtered]</password>\n" );
+ msg = msg.replace( TQRegExp( "<digest>[^<]*</digest>\n" ), "<digest>[Filtered]</digest>\n" );
emit debugMessage ( "XML OUT: " + msg );
@@ -1042,7 +1042,7 @@ void JabberClient::slotCSError ( int error )
}
-void JabberClient::slotRosterRequestFinished ( bool success, int /*statusCode*/, const QString &/*statusString*/ )
+void JabberClient::slotRosterRequestFinished ( bool success, int /*statusCode*/, const TQString &/*statusString*/ )
{
emit rosterRequestFinished ( success );
@@ -1119,14 +1119,14 @@ void JabberClient::slotGroupChatPresence ( const Jid &jid, const Status &status)
}
-void JabberClient::slotGroupChatError ( const Jid &jid, int error, const QString &reason)
+void JabberClient::slotGroupChatError ( const Jid &jid, int error, const TQString &reason)
{
emit groupChatError ( jid, error, reason );
}
-void JabberClient::slotSubscription ( const Jid &jid, const QString &type )
+void JabberClient::slotSubscription ( const Jid &jid, const TQString &type )
{
emit subscription ( jid, type );
diff --git a/kopete/protocols/jabber/jabberclient.h b/kopete/protocols/jabber/jabberclient.h
index 7cd33e02..4db2975f 100644
--- a/kopete/protocols/jabber/jabberclient.h
+++ b/kopete/protocols/jabber/jabberclient.h
@@ -22,7 +22,7 @@
#ifndef JABBERCLIENT_H
#define JABBERCLIENT_H
-#include <qobject.h>
+#include <tqobject.h>
// include these because of namespace reasons
#include <im.h>
@@ -84,7 +84,7 @@ public:
* @param password Password to authenticate with.
* @param auth True if authentication should be done, false if not.
*/
- ErrorCode connect ( const XMPP::Jid &jid, const QString &password, bool auth = true );
+ ErrorCode connect ( const XMPP::Jid &jid, const TQString &password, bool auth = true );
/**
* Disconnect from Jabber server.
@@ -191,7 +191,7 @@ public:
* This only has an effect if the old protocol (@ref useXMPP09)
* has been enabled. Default is false.
*/
- void setOverrideHost ( bool flag, const QString &server = "", int port = 5222 );
+ void setOverrideHost ( bool flag, const TQString &server = "", int port = 5222 );
/**
* Returns if the server name and port are overridden.
*/
@@ -213,12 +213,12 @@ public:
* @param flag Whether to enable file transfers.
* @param localAddress Local address to receive file transfers at. Will be determined automatically if not specified.
*/
- void setFileTransfersEnabled ( bool flag, const QString &localAddress = QString::null );
+ void setFileTransfersEnabled ( bool flag, const TQString &localAddress = TQString::null );
/**
* Returns the address of the local interface.
*/
- QString localAddress () const;
+ TQString localAddress () const;
/**
* Returns if file transfers are enabled.
@@ -228,57 +228,57 @@ public:
/**
* Set client name.
*/
- void setClientName ( const QString &clientName );
+ void setClientName ( const TQString &clientName );
/**
* Return client name.
*/
- QString clientName () const;
+ TQString clientName () const;
/**
* Set client version.
*/
- void setClientVersion ( const QString &clientVersion );
+ void setClientVersion ( const TQString &clientVersion );
/**
* Return client version.
*/
- QString clientVersion () const;
+ TQString clientVersion () const;
/**
* Set operating system name.
*/
- void setOSName ( const QString &osName );
+ void setOSName ( const TQString &osName );
/**
* Return operating system name.
*/
- QString osName () const;
+ TQString osName () const;
/**
* Set the caps(JEP-0115: Entity capabilities) node name.
* @param node Node name.
*/
- void setCapsNode( const QString &capsNode );
+ void setCapsNode( const TQString &capsNode );
/**
* Return the caps node name for this client.
* @return the caps node name.
*/
- QString capsNode() const;
+ TQString capsNode() const;
/**
* Set the caps(JEP-0115: Entity capabilities) node version.
* @param capsVersion the node version.
*/
- void setCapsVersion( const QString &capsVersion );
+ void setCapsVersion( const TQString &capsVersion );
/**
* Return the caps version for this client.
* @return the caps version.
*/
- QString capsVersion() const;
+ TQString capsVersion() const;
/**
* Return the caps extension list for this client.
* @return A string containing all extensions separated by space.
*/
- QString capsExt() const;
+ TQString capsExt() const;
/**
* Set the disco Identity information for this client.
@@ -302,11 +302,11 @@ public:
/**
* Set timezone information. Default is UTC.
*/
- void setTimeZone ( const QString &timeZoneName, int timeZoneOffset );
+ void setTimeZone ( const TQString &timeZoneName, int timeZoneOffset );
/**
* Return timezone name.
*/
- QString timeZoneName () const;
+ TQString timeZoneName () const;
/**
* Return timezone offset.
*/
@@ -357,7 +357,7 @@ public:
* @param room Name of room to join.
* @param nick Nick name you want to join with.
*/
- void joinGroupChat ( const QString &host, const QString &room, const QString &nick );
+ void joinGroupChat ( const TQString &host, const TQString &room, const TQString &nick );
/**
* Join a group chat that require a password.
@@ -366,23 +366,23 @@ public:
* @param nick Nick name you want to join with.
* @param password The password to join the room.
*/
- void joinGroupChat ( const QString &host, const QString &room, const QString &nick, const QString &password );
+ void joinGroupChat ( const TQString &host, const TQString &room, const TQString &nick, const TQString &password );
/**
* Leave a group chat.
* @param host Node to leave room at.
* @param room Name of room to leave.
*/
- void leaveGroupChat ( const QString &host, const QString &room );
+ void leaveGroupChat ( const TQString &host, const TQString &room );
/**
* change the status of a group chat
*/
- void setGroupChatStatus(const QString &host, const QString &room, const XMPP::Status &);
+ void setGroupChatStatus(const TQString &host, const TQString &room, const XMPP::Status &);
/**
* change the nick in a group chat
*/
- void changeGroupChatNick(const QString &host, const QString &room, const QString &nick, const XMPP::Status &status =XMPP::Status());
+ void changeGroupChatNick(const TQString &host, const TQString &room, const TQString &nick, const XMPP::Status &status =XMPP::Status());
/**
* Send a message.
@@ -392,7 +392,7 @@ public:
/**
* Send raw packet to the server.
*/
- void send ( const QString &packet );
+ void send ( const TQString &packet );
/**
* Request the roster from the Jabber server.
@@ -496,19 +496,19 @@ signals:
/**
* An error was encountered joining or processing a group chat.
*/
- void groupChatError ( const XMPP::Jid &jid, int error, const QString &reason );
+ void groupChatError ( const XMPP::Jid &jid, int error, const TQString &reason );
/**
* New subscription request.
*/
- void subscription ( const XMPP::Jid &jid, const QString &type );
+ void subscription ( const XMPP::Jid &jid, const TQString &type );
/**
* Dispatches a debug message. Debug messages
* include incoming and outgoing XML packets
* as well as internal status messages.
*/
- void debugMessage ( const QString &message );
+ void debugMessage ( const TQString &message );
private:
class Private;
@@ -526,11 +526,11 @@ private:
/**
* Add an address that the S5B server should handle.
*/
- void addS5BServerAddress ( const QString &address );
+ void addS5BServerAddress ( const TQString &address );
/**
* Remove an address that the S5B server currently handles.
*/
- void removeS5BServerAddress ( const QString &address );
+ void removeS5BServerAddress ( const TQString &address );
private slots:
/* S5B server object has been destroyed. */
@@ -558,7 +558,7 @@ private slots:
void slotTLSHandshaken ();
/* Called from Psi: roster request finished */
- void slotRosterRequestFinished ( bool success, int statusCode, const QString &statusString );
+ void slotRosterRequestFinished ( bool success, int statusCode, const TQString &statusString );
/* Called from Psi: incoming file transfer */
void slotIncomingFileTransfer ();
@@ -582,18 +582,18 @@ private slots:
void slotReceivedMessage (const Message &);
/* Called from Psi: debug messages from the backend. */
- void slotPsiDebug (const QString & msg);
- void slotIncomingXML (const QString &msg);
- void slotOutgoingXML (const QString &msg);
+ void slotPsiDebug (const TQString & msg);
+ void slotIncomingXML (const TQString &msg);
+ void slotOutgoingXML (const TQString &msg);
/* Slots for handling group chats. */
void slotGroupChatJoined (const Jid & jid);
void slotGroupChatLeft (const Jid & jid);
void slotGroupChatPresence (const Jid & jid, const Status & status);
- void slotGroupChatError (const Jid & jid, int error, const QString & reason);
+ void slotGroupChatError (const Jid & jid, int error, const TQString & reason);
/* Incoming subscription request. */
- void slotSubscription (const Jid & jid, const QString & type);
+ void slotSubscription (const Jid & jid, const TQString & type);
};
diff --git a/kopete/protocols/jabber/jabberconnector.cpp b/kopete/protocols/jabber/jabberconnector.cpp
index 2359dd69..8fdc3e84 100644
--- a/kopete/protocols/jabber/jabberconnector.cpp
+++ b/kopete/protocols/jabber/jabberconnector.cpp
@@ -22,7 +22,7 @@
#include "jabberbytestream.h"
#include "jabberprotocol.h"
-JabberConnector::JabberConnector ( QObject *parent, const char */*name*/ )
+JabberConnector::JabberConnector ( TQObject *parent, const char */*name*/ )
: XMPP::Connector ( parent )
{
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "New Jabber connector." << endl;
@@ -31,8 +31,8 @@ JabberConnector::JabberConnector ( QObject *parent, const char */*name*/ )
mByteStream = new JabberByteStream ( this );
- connect ( mByteStream, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) );
- connect ( mByteStream, SIGNAL ( error ( int ) ), this, SLOT ( slotError ( int ) ) );
+ connect ( mByteStream, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) );
+ connect ( mByteStream, TQT_SIGNAL ( error ( int ) ), this, TQT_SLOT ( slotError ( int ) ) );
}
@@ -43,7 +43,7 @@ JabberConnector::~JabberConnector ()
}
-void JabberConnector::connectToServer ( const QString &server )
+void JabberConnector::connectToServer ( const TQString &server )
{
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Initiating connection to " << server << endl;
@@ -56,7 +56,7 @@ void JabberConnector::connectToServer ( const QString &server )
mErrorCode = KNetwork::KSocketBase::NoError;
- if ( !mByteStream->connect ( mHost, QString::number ( mPort ) ) )
+ if ( !mByteStream->connect ( mHost, TQString::number ( mPort ) ) )
{
// Houston, we have a problem
mErrorCode = mByteStream->socket()->error ();
@@ -71,7 +71,7 @@ void JabberConnector::slotConnected ()
// FIXME: setPeerAddress() is something different, find out correct usage later
//KInetSocketAddress inetAddress = mStreamSocket->address().asInet().makeIPv6 ();
- //setPeerAddress ( QHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () );
+ //setPeerAddress ( TQHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () );
emit connected ();
@@ -107,7 +107,7 @@ void JabberConnector::done ()
}
-void JabberConnector::setOptHostPort ( const QString &host, Q_UINT16 port )
+void JabberConnector::setOptHostPort ( const TQString &host, Q_UINT16 port )
{
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Manually specifying host " << host << " and port " << port << endl;
diff --git a/kopete/protocols/jabber/jabberconnector.h b/kopete/protocols/jabber/jabberconnector.h
index 6fbc4167..b7ee533a 100644
--- a/kopete/protocols/jabber/jabberconnector.h
+++ b/kopete/protocols/jabber/jabberconnector.h
@@ -35,15 +35,15 @@ class JabberConnector : public XMPP::Connector
Q_OBJECT
public:
- JabberConnector ( QObject *parent = 0, const char *name = 0 );
+ JabberConnector ( TQObject *parent = 0, const char *name = 0 );
~JabberConnector ();
- void connectToServer ( const QString &server );
+ void connectToServer ( const TQString &server );
ByteStream *stream () const;
void done ();
- void setOptHostPort ( const QString &host, Q_UINT16 port );
+ void setOptHostPort ( const TQString &host, Q_UINT16 port );
void setOptSSL ( bool );
void setOptProbe ( bool );
@@ -54,7 +54,7 @@ private slots:
void slotError ( int );
private:
- QString mHost;
+ TQString mHost;
Q_UINT16 mPort;
int mErrorCode;
diff --git a/kopete/protocols/jabber/jabbercontact.cpp b/kopete/protocols/jabber/jabbercontact.cpp
index c8589e1e..840f9cf3 100644
--- a/kopete/protocols/jabber/jabbercontact.cpp
+++ b/kopete/protocols/jabber/jabbercontact.cpp
@@ -21,12 +21,12 @@
#include "xmpp_tasks.h"
#include "im.h"
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qstylesheet.h>
-#include <qimage.h>
-#include <qregexp.h>
-#include <qbuffer.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqstylesheet.h>
+#include <tqimage.h>
+#include <tqregexp.h>
+#include <tqbuffer.h>
#include <kdebug.h>
#include <klocale.h>
@@ -63,7 +63,7 @@
/**
* JabberContact constructor
*/
-JabberContact::JabberContact (const XMPP::RosterItem &rosterItem, Kopete::Account *_account, Kopete::MetaContact * mc, const QString &legacyId)
+JabberContact::JabberContact (const XMPP::RosterItem &rosterItem, Kopete::Account *_account, Kopete::MetaContact * mc, const TQString &legacyId)
: JabberBaseContact ( rosterItem, _account, mc, legacyId) , mDiscoDone(false), m_syncTimer(0L)
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << contactId() << " is created - " << this << endl;
@@ -89,19 +89,19 @@ JabberContact::JabberContact (const XMPP::RosterItem &rosterItem, Kopete::Accoun
{
// this contact is a regular contact
connect ( this,
- SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
- this, SLOT ( slotCheckVCard () ) );
+ TQT_SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
+ this, TQT_SLOT ( slotCheckVCard () ) );
}
else
{
// this contact is the myself instance
connect ( account()->myself (),
- SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
- this, SLOT ( slotCheckVCard () ) );
+ TQT_SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
+ this, TQT_SLOT ( slotCheckVCard () ) );
connect ( account()->myself (),
- SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
- this, SLOT ( slotCheckLastActivity ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) );
+ TQT_SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
+ this, TQT_SLOT ( slotCheckLastActivity ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) );
/*
* Trigger update once if we're already connected for contacts
@@ -127,44 +127,44 @@ JabberContact::~JabberContact()
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << contactId() << " is destroyed - " << this << endl;
}
-QPtrList<KAction> *JabberContact::customContextMenuActions ()
+TQPtrList<KAction> *JabberContact::customContextMenuActions ()
{
- QPtrList<KAction> *actionCollection = new QPtrList<KAction>();
+ TQPtrList<KAction> *actionCollection = new TQPtrList<KAction>();
KActionMenu *actionAuthorization = new KActionMenu ( i18n ("Authorization"), "connect_established", this, "jabber_authorization");
KAction *resendAuthAction, *requestAuthAction, *removeAuthAction;
resendAuthAction = new KAction (i18n ("(Re)send Authorization To"), "mail_forward", 0,
- this, SLOT (slotSendAuth ()), actionAuthorization, "actionSendAuth");
+ this, TQT_SLOT (slotSendAuth ()), actionAuthorization, "actionSendAuth");
resendAuthAction->setEnabled( mRosterItem.subscription().type() == XMPP::Subscription::To || mRosterItem.subscription().type() == XMPP::Subscription::None );
actionAuthorization->insert(resendAuthAction);
requestAuthAction = new KAction (i18n ("(Re)request Authorization From"), "mail_reply", 0,
- this, SLOT (slotRequestAuth ()), actionAuthorization, "actionRequestAuth");
+ this, TQT_SLOT (slotRequestAuth ()), actionAuthorization, "actionRequestAuth");
requestAuthAction->setEnabled( mRosterItem.subscription().type() == XMPP::Subscription::From || mRosterItem.subscription().type() == XMPP::Subscription::None );
actionAuthorization->insert(requestAuthAction);
removeAuthAction = new KAction (i18n ("Remove Authorization From"), "mail_delete", 0,
- this, SLOT (slotRemoveAuth ()), actionAuthorization, "actionRemoveAuth");
+ this, TQT_SLOT (slotRemoveAuth ()), actionAuthorization, "actionRemoveAuth");
removeAuthAction->setEnabled( mRosterItem.subscription().type() == XMPP::Subscription::Both || mRosterItem.subscription().type() == XMPP::Subscription::From );
actionAuthorization->insert(removeAuthAction);
KActionMenu *actionSetAvailability = new KActionMenu (i18n ("Set Availability"), "kopeteavailable", this, "jabber_online");
actionSetAvailability->insert(new KAction (i18n ("Online"), protocol()->JabberKOSOnline.iconFor(this),
- 0, this, SLOT (slotStatusOnline ()), actionSetAvailability, "actionOnline"));
+ 0, this, TQT_SLOT (slotStatusOnline ()), actionSetAvailability, "actionOnline"));
actionSetAvailability->insert(new KAction (i18n ("Free to Chat"), protocol()->JabberKOSChatty.iconFor(this),
- 0, this, SLOT (slotStatusChatty ()), actionSetAvailability, "actionChatty"));
+ 0, this, TQT_SLOT (slotStatusChatty ()), actionSetAvailability, "actionChatty"));
actionSetAvailability->insert(new KAction (i18n ("Away"), protocol()->JabberKOSAway.iconFor(this),
- 0, this, SLOT (slotStatusAway ()), actionSetAvailability, "actionAway"));
+ 0, this, TQT_SLOT (slotStatusAway ()), actionSetAvailability, "actionAway"));
actionSetAvailability->insert(new KAction (i18n ("Extended Away"), protocol()->JabberKOSXA.iconFor(this),
- 0, this, SLOT (slotStatusXA ()), actionSetAvailability, "actionXA"));
+ 0, this, TQT_SLOT (slotStatusXA ()), actionSetAvailability, "actionXA"));
actionSetAvailability->insert(new KAction (i18n ("Do Not Disturb"), protocol()->JabberKOSDND.iconFor(this),
- 0, this, SLOT (slotStatusDND ()), actionSetAvailability, "actionDND"));
+ 0, this, TQT_SLOT (slotStatusDND ()), actionSetAvailability, "actionDND"));
actionSetAvailability->insert(new KAction (i18n ("Invisible"), protocol()->JabberKOSInvisible.iconFor(this),
- 0, this, SLOT (slotStatusInvisible ()), actionSetAvailability, "actionInvisible"));
+ 0, this, TQT_SLOT (slotStatusInvisible ()), actionSetAvailability, "actionInvisible"));
KActionMenu *actionSelectResource = new KActionMenu (i18n ("Select Resource"), "connect_no", this, "actionSelectResource");
@@ -176,7 +176,7 @@ QPtrList<KAction> *JabberContact::customContextMenuActions ()
}
else
{
- QStringList items;
+ TQStringList items;
XMPP::ResourceList availableResources;
int activeItem = 0, i = 1;
@@ -198,13 +198,13 @@ QPtrList<KAction> *JabberContact::customContextMenuActions ()
// now go through the string list and add the resources with their icons
i = 0;
- QStringList::const_iterator itemsEnd = items.end ();
- for(QStringList::const_iterator it = items.begin(); it != itemsEnd; ++it)
+ TQStringList::const_iterator itemsEnd = items.end ();
+ for(TQStringList::const_iterator it = items.begin(); it != itemsEnd; ++it)
{
if( i == activeItem )
{
- actionSelectResource->insert ( new KAction( ( *it ), "button_ok", 0, this, SLOT( slotSelectResource() ),
- actionSelectResource, QString::number( i ).latin1() ) );
+ actionSelectResource->insert ( new KAction( ( *it ), "button_ok", 0, this, TQT_SLOT( slotSelectResource() ),
+ actionSelectResource, TQString::number( i ).latin1() ) );
}
else
{
@@ -212,11 +212,11 @@ QPtrList<KAction> *JabberContact::customContextMenuActions ()
* Select icon, using bestResource() without lock for the automatic entry
* and the resources' respective status icons for the rest.
*/
- QIconSet iconSet ( !i ?
+ TQIconSet iconSet ( !i ?
protocol()->resourceToKOS ( account()->resourcePool()->bestResource ( mRosterItem.jid(), false ) ).iconFor ( account () ) : protocol()->resourceToKOS ( *availableResources.find(*it) ).iconFor ( account () ));
- actionSelectResource->insert ( new KAction( ( *it ), iconSet, 0, this, SLOT( slotSelectResource() ),
- actionSelectResource, QString::number( i ).latin1() ) );
+ actionSelectResource->insert ( new KAction( ( *it ), iconSet, 0, this, TQT_SLOT( slotSelectResource() ),
+ actionSelectResource, TQString::number( i ).latin1() ) );
}
i++;
@@ -230,7 +230,7 @@ QPtrList<KAction> *JabberContact::customContextMenuActions ()
#ifdef SUPPORT_JINGLE
- KAction *actionVoiceCall = new KAction (i18n ("Voice call"), "voicecall", 0, this, SLOT (voiceCall ()), this, "jabber_voicecall");
+ KAction *actionVoiceCall = new KAction (i18n ("Voice call"), "voicecall", 0, this, TQT_SLOT (voiceCall ()), this, "jabber_voicecall");
actionVoiceCall->setEnabled( false );
actionCollection->append( actionVoiceCall );
@@ -248,7 +248,7 @@ QPtrList<KAction> *JabberContact::customContextMenuActions ()
void JabberContact::handleIncomingMessage (const XMPP::Message & message)
{
- QString viewPlugin;
+ TQString viewPlugin;
Kopete::Message *newMessage = 0L;
kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Received Message Type:" << message.type () << endl;
@@ -261,17 +261,17 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message)
{
if (!message.invite().isEmpty())
{
- QString room=message.invite();
- QString originalBody=message.body().isEmpty() ? QString() :
- i18n( "The original message is : <i>\" %1 \"</i><br>" ).arg(QStyleSheet::escape(message.body()));
- QString mes=i18n("<qt><i>%1</i> invited you to join the conference <b>%2</b><br>%3<br>"
+ TQString room=message.invite();
+ TQString originalBody=message.body().isEmpty() ? TQString() :
+ i18n( "The original message is : <i>\" %1 \"</i><br>" ).arg(TQStyleSheet::escape(message.body()));
+ TQString mes=i18n("<qt><i>%1</i> invited you to join the conference <b>%2</b><br>%3<br>"
"If you want to accept and join, just <b>enter your nickname</b> and press ok<br>"
"If you want to decline, press cancel</qt>")
.arg(message.from().full(), room , originalBody);
bool ok=false;
- QString futureNewNickName = KInputDialog::getText( i18n( "Invited to a conference - Jabber Plugin" ),
- mes, QString() , &ok , (mManager ? dynamic_cast<QWidget*>(mManager->view(false)) : 0) );
+ TQString futureNewNickName = KInputDialog::getText( i18n( "Invited to a conference - Jabber Plugin" ),
+ mes, TQString() , &ok , (mManager ? dynamic_cast<TQWidget*>(mManager->view(false)) : 0) );
if ( !ok || !account()->isConnected() || futureNewNickName.isEmpty() )
return;
@@ -347,11 +347,11 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message)
mLastReceivedMessageId = message.id ();
// retrieve and reformat body
- QString body = message.body ();
- QString xHTMLBody;
+ TQString body = message.body ();
+ TQString xHTMLBody;
if( !message.xencrypted().isEmpty () )
{
- body = QString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + QString ("\n-----END PGP MESSAGE-----\n");
+ body = TQString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + TQString ("\n-----END PGP MESSAGE-----\n");
}
else
{
@@ -393,11 +393,11 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message)
for ( XMPP::UrlList::const_iterator it = urlList.begin (); it != urlList.end (); ++it )
{
- QString description = (*it).desc().isEmpty() ? (*it).url() : QStyleSheet::escape ( (*it).desc() );
- QString url = (*it).url ();
+ TQString description = (*it).desc().isEmpty() ? (*it).url() : TQStyleSheet::escape ( (*it).desc() );
+ TQString url = (*it).url ();
newMessage = new Kopete::Message ( message.timeStamp (), this, contactList,
- QString ( "<a href=\"%1\">%2</a>" ).arg ( url, description ),
+ TQString ( "<a href=\"%1\">%2</a>" ).arg ( url, description ),
message.subject (), Kopete::Message::Inbound,
Kopete::Message::RichText, viewPlugin );
@@ -411,7 +411,7 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message)
void JabberContact::slotCheckVCard ()
{
- QDateTime cacheDate;
+ TQDateTime cacheDate;
Kopete::ContactProperty cacheDateString = property ( protocol()->propVCardCacheTimeStamp );
// don't do anything while we are offline
@@ -431,8 +431,8 @@ void JabberContact::slotCheckVCard ()
mDiscoDone = true; //or it will happen twice, we don't want that.
//disco to see if it's not a transport
XMPP::JT_DiscoInfo *jt = new XMPP::JT_DiscoInfo(account()->client()->rootTask());
- QObject::connect(jt, SIGNAL(finished()),this, SLOT(slotDiscoFinished()));
- jt->get(rosterItem().jid(), QString());
+ TQObject::connect(jt, TQT_SIGNAL(finished()),this, TQT_SLOT(slotDiscoFinished()));
+ jt->get(rosterItem().jid(), TQString());
jt->go(true);
}
}
@@ -440,20 +440,20 @@ void JabberContact::slotCheckVCard ()
// avoid warning if key does not exist in configuration file
if ( cacheDateString.isNull () )
- cacheDate = QDateTime::currentDateTime().addDays ( -2 );
+ cacheDate = TQDateTime::currentDateTime().addDays ( -2 );
else
- cacheDate = QDateTime::fromString ( cacheDateString.value().toString (), Qt::ISODate );
+ cacheDate = TQDateTime::fromString ( cacheDateString.value().toString (), Qt::ISODate );
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Cached vCard data for " << contactId () << " from " << cacheDate.toString () << endl;
- if ( !mVCardUpdateInProgress && ( cacheDate.addDays ( 1 ) < QDateTime::currentDateTime () ) )
+ if ( !mVCardUpdateInProgress && ( cacheDate.addDays ( 1 ) < TQDateTime::currentDateTime () ) )
{
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Scheduling update." << endl;
mVCardUpdateInProgress = true;
// current data is older than 24 hours, request a new one
- QTimer::singleShot ( account()->client()->getPenaltyTime () * 1000, this, SLOT ( slotGetTimedVCard () ) );
+ TQTimer::singleShot ( account()->client()->getPenaltyTime () * 1000, this, TQT_SLOT ( slotGetTimedVCard () ) );
}
}
@@ -479,8 +479,8 @@ void JabberContact::slotGetTimedVCard ()
{
//disco to see if it's not a transport
XMPP::JT_DiscoInfo *jt = new XMPP::JT_DiscoInfo(account()->client()->rootTask());
- QObject::connect(jt, SIGNAL(finished()),this, SLOT(slotDiscoFinished()));
- jt->get(rosterItem().jid(), QString());
+ TQObject::connect(jt, TQT_SIGNAL(finished()),this, TQT_SLOT(slotDiscoFinished()));
+ jt->get(rosterItem().jid(), TQString());
jt->go(true);
}
}
@@ -492,7 +492,7 @@ void JabberContact::slotGetTimedVCard ()
// request vCard
XMPP::JT_VCard *task = new XMPP::JT_VCard ( account()->client()->rootTask () );
// signal to ourselves when the vCard data arrived
- QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotGotVCard () ) );
+ TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotGotVCard () ) );
task->get ( mRosterItem.jid () );
task->go ( true );
@@ -506,7 +506,7 @@ void JabberContact::slotGotVCard ()
// update timestamp of last vCard retrieval
if ( metaContact() && !metaContact()->isTemporary () )
{
- setProperty ( protocol()->propVCardCacheTimeStamp, QDateTime::currentDateTime().toString ( Qt::ISODate ) );
+ setProperty ( protocol()->propVCardCacheTimeStamp, TQDateTime::currentDateTime().toString ( Qt::ISODate ) );
}
mVCardUpdateInProgress = false;
@@ -551,7 +551,7 @@ void JabberContact::slotCheckLastActivity ( Kopete::Contact *, const Kopete::Onl
{
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Scheduling request for last activity for " << mRosterItem.jid().bare () << endl;
- QTimer::singleShot ( account()->client()->getPenaltyTime () * 1000, this, SLOT ( slotGetTimedLastActivity () ) );
+ TQTimer::singleShot ( account()->client()->getPenaltyTime () * 1000, this, TQT_SLOT ( slotGetTimedLastActivity () ) );
}
}
@@ -578,7 +578,7 @@ void JabberContact::slotGetTimedLastActivity ()
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Requesting last activity from timer for " << mRosterItem.jid().bare () << endl;
XMPP::JT_GetLastActivity *task = new XMPP::JT_GetLastActivity ( account()->client()->rootTask () );
- QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotGotLastActivity () ) );
+ TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotGotLastActivity () ) );
task->get ( mRosterItem.jid () );
task->go ( true );
}
@@ -591,7 +591,7 @@ void JabberContact::slotGotLastActivity ()
if ( task->success () )
{
- setProperty ( protocol()->propLastSeen, QDateTime::currentDateTime().addSecs ( -task->seconds () ) );
+ setProperty ( protocol()->propLastSeen, TQDateTime::currentDateTime().addSecs ( -task->seconds () ) );
if( !task->message().isEmpty() )
{
setProperty( protocol()->propAwayMessage, task->message() );
@@ -668,7 +668,7 @@ void JabberContact::slotSendVCard()
// work information tab
XMPP::VCard::Org org;
org.name = property(protocol()->propCompanyName).value().toString();
- org.unit = QStringList::split(",", property(protocol()->propCompanyDepartement).value().toString());
+ org.unit = TQStringList::split(",", property(protocol()->propCompanyDepartement).value().toString());
vCard.setOrg(org);
vCard.setTitle (property(protocol()->propCompanyPosition).value().toString());
vCard.setRole (property(protocol()->propCompanyRole).value().toString());
@@ -703,10 +703,10 @@ void JabberContact::slotSendVCard()
// Set contact photo as a binary value (if he has set a photo)
if( hasProperty( protocol()->propPhoto.key() ) )
{
- QString photoPath = property( protocol()->propPhoto ).value().toString();
- QImage image( photoPath );
- QByteArray ba;
- QBuffer buffer( ba );
+ TQString photoPath = property( protocol()->propPhoto ).value().toString();
+ TQImage image( photoPath );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
image.save( &buffer, "PNG" );
vCard.setPhoto( ba );
@@ -717,22 +717,22 @@ void JabberContact::slotSendVCard()
XMPP::JT_VCard *task = new XMPP::JT_VCard (account()->client()->rootTask ());
// signal to ourselves when the vCard data arrived
- QObject::connect (task, SIGNAL (finished ()), this, SLOT (slotSentVCard ()));
+ TQObject::connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotSentVCard ()));
task->set (vCard);
task->go (true);
}
-void JabberContact::setPhoto( const QString &photoPath )
+void JabberContact::setPhoto( const TQString &photoPath )
{
- QImage contactPhoto(photoPath);
- QString newPhotoPath = photoPath;
+ TQImage contactPhoto(photoPath);
+ TQString newPhotoPath = photoPath;
if(contactPhoto.width() > 96 || contactPhoto.height() > 96)
{
// Save image to a new location if the image isn't the correct format.
- QString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) );
+ TQString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) );
// Scale and crop the picture.
- contactPhoto = contactPhoto.smoothScale( 96, 96, QImage::ScaleMin );
+ contactPhoto = contactPhoto.smoothScale( 96, 96, TQImage::ScaleMin );
// crop image if not square
if(contactPhoto.width() < contactPhoto.height())
contactPhoto = contactPhoto.copy((contactPhoto.width()-contactPhoto.height())/2, 0, 96, 96);
@@ -741,17 +741,17 @@ void JabberContact::setPhoto( const QString &photoPath )
// Use the cropped/scaled image now.
if(!contactPhoto.save(newLocation, "PNG"))
- newPhotoPath = QString::null;
+ newPhotoPath = TQString::null;
else
newPhotoPath = newLocation;
}
else if (contactPhoto.width() < 32 || contactPhoto.height() < 32)
{
// Save image to a new location if the image isn't the correct format.
- QString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) );
+ TQString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) );
// Scale and crop the picture.
- contactPhoto = contactPhoto.smoothScale( 32, 32, QImage::ScaleMin );
+ contactPhoto = contactPhoto.smoothScale( 32, 32, TQImage::ScaleMin );
// crop image if not square
if(contactPhoto.width() < contactPhoto.height())
contactPhoto = contactPhoto.copy((contactPhoto.width()-contactPhoto.height())/2, 0, 32, 32);
@@ -760,14 +760,14 @@ void JabberContact::setPhoto( const QString &photoPath )
// Use the cropped/scaled image now.
if(!contactPhoto.save(newLocation, "PNG"))
- newPhotoPath = QString::null;
+ newPhotoPath = TQString::null;
else
newPhotoPath = newLocation;
}
else if (contactPhoto.width() != contactPhoto.height())
{
// Save image to a new location if the image isn't the correct format.
- QString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) );
+ TQString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) );
if(contactPhoto.width() < contactPhoto.height())
contactPhoto = contactPhoto.copy((contactPhoto.width()-contactPhoto.height())/2, 0, contactPhoto.height(), contactPhoto.height());
@@ -776,7 +776,7 @@ void JabberContact::setPhoto( const QString &photoPath )
// Use the cropped/scaled image now.
if(!contactPhoto.save(newLocation, "PNG"))
- newPhotoPath = QString::null;
+ newPhotoPath = TQString::null;
else
newPhotoPath = newLocation;
}
@@ -789,7 +789,7 @@ void JabberContact::slotSentVCard ()
}
-void JabberContact::slotChatSessionDeleted ( QObject *sender )
+void JabberContact::slotChatSessionDeleted ( TQObject *sender )
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Message manager deleted, collecting the pieces..." << endl;
@@ -826,7 +826,7 @@ JabberChatSession *JabberContact::manager ( Kopete::ContactPtrList chatMembers,
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "No manager found, creating a new one with resource '" << jid.resource () << "'" << endl;
manager = new JabberChatSession ( protocol(), static_cast<JabberBaseContact *>(account()->myself()), chatMembers, jid.resource () );
- connect ( manager, SIGNAL ( destroyed ( QObject * ) ), this, SLOT ( slotChatSessionDeleted ( QObject * ) ) );
+ connect ( manager, TQT_SIGNAL ( destroyed ( TQObject * ) ), this, TQT_SLOT ( slotChatSessionDeleted ( TQObject * ) ) );
mManagers.append ( manager );
}
@@ -845,7 +845,7 @@ Kopete::ChatSession *JabberContact::manager ( Kopete::Contact::CanCreateFlags ca
}
-JabberChatSession *JabberContact::manager ( const QString &resource, Kopete::Contact::CanCreateFlags canCreate )
+JabberChatSession *JabberContact::manager ( const TQString &resource, Kopete::Contact::CanCreateFlags canCreate )
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "called, canCreate: " << canCreate << ", Resource: '" << resource << "'" << endl;
@@ -880,7 +880,7 @@ JabberChatSession *JabberContact::manager ( const QString &resource, Kopete::Con
JabberChatSession *manager = new JabberChatSession ( protocol(),
static_cast<JabberBaseContact *>(account()->myself()),
chatmembers, resource );
- connect ( manager, SIGNAL ( destroyed ( QObject * ) ), this, SLOT ( slotChatSessionDeleted ( QObject * ) ) );
+ connect ( manager, TQT_SIGNAL ( destroyed ( TQObject * ) ), this, TQT_SLOT ( slotChatSessionDeleted ( TQObject * ) ) );
mManagers.append ( manager );
return manager;
@@ -938,7 +938,7 @@ void JabberContact::deleteContact ()
sendSubscription("unsubscribe");
XMPP::JT_Roster * rosterTask = new XMPP::JT_Roster ( account()->client()->rootTask () );
- rosterTask->set ( mRosterItem.jid (), QString() , QStringList() );
+ rosterTask->set ( mRosterItem.jid (), TQString() , TQStringList() );
rosterTask->go (true);
}
@@ -954,8 +954,8 @@ void JabberContact::sync ( unsigned int )
if(!m_syncTimer)
{
- m_syncTimer=new QTimer(this);
- connect(m_syncTimer, SIGNAL(timeout()) , this , SLOT(slotDelayedSync()));
+ m_syncTimer=new TQTimer(this);
+ connect(m_syncTimer, TQT_SIGNAL(timeout()) , this , TQT_SLOT(slotDelayedSync()));
}
m_syncTimer->start(2*1000,true);
/*
@@ -979,7 +979,7 @@ void JabberContact::slotDelayedSync( )
bool changed=metaContact()->displayName() != mRosterItem.name();
- QStringList groups;
+ TQStringList groups;
Kopete::GroupList groupList = metaContact ()->groups ();
kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Synchronizing contact " << contactId () << endl;
@@ -1009,17 +1009,17 @@ void JabberContact::slotDelayedSync( )
}
-void JabberContact::sendFile ( const KURL &sourceURL, const QString &/*fileName*/, uint /*fileSize*/ )
+void JabberContact::sendFile ( const KURL &sourceURL, const TQString &/*fileName*/, uint /*fileSize*/ )
{
- QString filePath;
+ TQString filePath;
// if the file location is null, then get it from a file open dialog
if ( !sourceURL.isValid () )
- filePath = KFileDialog::getOpenFileName( QString::null , "*", 0L, i18n ( "Kopete File Transfer" ) );
+ filePath = KFileDialog::getOpenFileName( TQString::null , "*", 0L, i18n ( "Kopete File Transfer" ) );
else
filePath = sourceURL.path(-1);
- QFile file ( filePath );
+ TQFile file ( filePath );
if ( file.exists () )
{
@@ -1057,7 +1057,7 @@ void JabberContact::slotRemoveAuth ()
}
-void JabberContact::sendSubscription ( const QString& subType )
+void JabberContact::sendSubscription ( const TQString& subType )
{
if ( !account()->isConnected () )
@@ -1075,7 +1075,7 @@ void JabberContact::sendSubscription ( const QString& subType )
void JabberContact::slotSelectResource ()
{
- int currentItem = QString ( static_cast<const KAction *>( sender() )->name () ).toUInt ();
+ int currentItem = TQString ( static_cast<const KAction *>( sender() )->name () ).toUInt ();
/*
* Warn the user if there is already an active chat window.
@@ -1101,7 +1101,7 @@ void JabberContact::slotSelectResource ()
}
else
{
- QString selectedResource = static_cast<const KAction *>(sender())->text();
+ TQString selectedResource = static_cast<const KAction *>(sender())->text();
kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Moving to resource " << selectedResource << endl;
@@ -1212,7 +1212,7 @@ bool JabberContact::isContactRequestingEvent( XMPP::MsgEvent event )
return false;
}
-QString JabberContact::lastReceivedMessageId () const
+TQString JabberContact::lastReceivedMessageId () const
{
return mLastReceivedMessageId;
}
@@ -1263,12 +1263,12 @@ void JabberContact::slotDiscoFinished( )
JT_DiscoInfo *jt = (JT_DiscoInfo *)sender();
bool is_transport=false;
- QString tr_type;
+ TQString tr_type;
if ( jt->success() )
{
- QValueList<XMPP::DiscoItem::Identity> identities = jt->item().identities();
- QValueList<XMPP::DiscoItem::Identity>::Iterator it;
+ TQValueList<XMPP::DiscoItem::Identity> identities = jt->item().identities();
+ TQValueList<XMPP::DiscoItem::Identity>::Iterator it;
for ( it = identities.begin(); it != identities.end(); ++it )
{
XMPP::DiscoItem::Identity ident=*it;
diff --git a/kopete/protocols/jabber/jabbercontact.h b/kopete/protocols/jabber/jabbercontact.h
index a7a3b024..64402a48 100644
--- a/kopete/protocols/jabber/jabbercontact.h
+++ b/kopete/protocols/jabber/jabbercontact.h
@@ -38,7 +38,7 @@ Q_OBJECT
public:
JabberContact (const XMPP::RosterItem &rosterItem,
- Kopete::Account *account, Kopete::MetaContact * mc, const QString &legacyId = QString());
+ Kopete::Account *account, Kopete::MetaContact * mc, const TQString &legacyId = TQString());
~JabberContact();
@@ -46,12 +46,12 @@ public:
* Create custom context menu items for the contact
* FIXME: implement manager version here?
*/
- QPtrList<KAction> *customContextMenuActions ();
+ TQPtrList<KAction> *customContextMenuActions ();
/**
* Start a rename request.
*/
- void rename ( const QString &newName );
+ void rename ( const TQString &newName );
/**
* Deal with an incoming message for this contact.
@@ -69,7 +69,7 @@ public:
bool isContactRequestingEvent( XMPP::MsgEvent event );
- QString lastReceivedMessageId () const;
+ TQString lastReceivedMessageId () const;
public slots:
@@ -95,7 +95,7 @@ public slots:
* a nondeterminate file size (such as over a socket)
*/
virtual void sendFile( const KURL &sourceURL = KURL(),
- const QString &fileName = QString::null, uint fileSize = 0L );
+ const TQString &fileName = TQString::null, uint fileSize = 0L );
/**
* Update the vCard on the server.
@@ -107,7 +107,7 @@ public slots:
* Set contact photo.
* @param path Path to the photo.
*/
- void setPhoto(const QString &photoPath);
+ void setPhoto(const TQString &photoPath);
/**
* this will start a voice call to the contact
@@ -146,7 +146,7 @@ private slots:
*/
void slotSelectResource ();
- void slotChatSessionDeleted ( QObject *sender );
+ void slotChatSessionDeleted ( TQObject *sender );
/**
* Check if cached vCard is recent.
@@ -209,7 +209,7 @@ private:
* the manager. If a new manager is created, the given
* resource is preselected.
*/
- JabberChatSession *manager ( const QString &resource, Kopete::Contact::CanCreateFlags );
+ JabberChatSession *manager ( const TQString &resource, Kopete::Contact::CanCreateFlags );
/**
* Create a message manager for this contact.
@@ -222,7 +222,7 @@ private:
/**
* Sends subscription messages.
*/
- void sendSubscription (const QString& subType);
+ void sendSubscription (const TQString& subType);
/**
* Sends a presence packet to this contact
@@ -240,7 +240,7 @@ private:
* The casts in manager() and slotChatSessionDeleted()
* are thus legal.
*/
- QPtrList<JabberChatSession> mManagers;
+ TQPtrList<JabberChatSession> mManagers;
/**
* Indicates whether the vCard is currently
@@ -258,8 +258,8 @@ private:
*/
bool mDiscoDone :1;
- QString mLastReceivedMessageId;
- QTimer *m_syncTimer;
+ TQString mLastReceivedMessageId;
+ TQTimer *m_syncTimer;
};
diff --git a/kopete/protocols/jabber/jabbercontactpool.cpp b/kopete/protocols/jabber/jabbercontactpool.cpp
index 736c6045..43724d28 100644
--- a/kopete/protocols/jabber/jabbercontactpool.cpp
+++ b/kopete/protocols/jabber/jabbercontactpool.cpp
@@ -18,7 +18,7 @@
#include "jabbercontactpool.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include <kmessagebox.h>
#include <kopeteaccountmanager.h>
@@ -91,7 +91,7 @@ JabberContact *JabberContactPool::addContact ( const XMPP::RosterItem &contact,
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Adding new contact " << contact.jid().full() << endl;
JabberTransport *transport=0l;
- QString legacyId;
+ TQString legacyId;
//find if the contact should be added to a transport.
if(mAccount->transports().contains(contact.jid().domain()))
{
@@ -102,7 +102,7 @@ JabberContact *JabberContactPool::addContact ( const XMPP::RosterItem &contact,
// create new contact instance and add it to the dictionary
JabberContact *newContact = new JabberContact ( contact, transport ? (Kopete::Account*)transport : (Kopete::Account*)mAccount, metaContact , legacyId );
JabberContactPoolItem *newContactItem = new JabberContactPoolItem ( newContact );
- connect ( newContact, SIGNAL ( contactDestroyed ( Kopete::Contact * ) ), this, SLOT ( slotContactDestroyed ( Kopete::Contact * ) ) );
+ connect ( newContact, TQT_SIGNAL ( contactDestroyed ( Kopete::Contact * ) ), this, TQT_SLOT ( slotContactDestroyed ( Kopete::Contact * ) ) );
newContactItem->setDirty ( dirty );
mPool.append ( newContactItem );
@@ -161,7 +161,7 @@ JabberBaseContact *JabberContactPool::addGroupContact ( const XMPP::RosterItem &
JabberContactPoolItem *newContactItem = new JabberContactPoolItem ( newContact );
- connect ( newContact, SIGNAL ( contactDestroyed ( Kopete::Contact * ) ), this, SLOT ( slotContactDestroyed ( Kopete::Contact * ) ) );
+ connect ( newContact, TQT_SIGNAL ( contactDestroyed ( Kopete::Contact * ) ), this, TQT_SLOT ( slotContactDestroyed ( Kopete::Contact * ) ) );
newContactItem->setDirty ( dirty );
mPool.append ( newContactItem );
@@ -222,7 +222,7 @@ void JabberContactPool::slotContactDestroyed ( Kopete::Contact *contact )
else
{
//this is a legacy contact. we have no way to get the real Jid at this point, we can only guess it.
- QString contactId= contact->contactId().replace('@','%') + "@" + contact->account()->myself()->contactId();
+ TQString contactId= contact->contactId().replace('@','%') + "@" + contact->account()->myself()->contactId();
mAccount->resourcePool()->removeAllResources ( XMPP::Jid ( contactId ) ) ;
}
@@ -311,9 +311,9 @@ JabberBaseContact *JabberContactPool::findRelevantRecipient ( const XMPP::Jid &j
}
-QPtrList<JabberBaseContact> JabberContactPool::findRelevantSources ( const XMPP::Jid &jid )
+TQPtrList<JabberBaseContact> JabberContactPool::findRelevantSources ( const XMPP::Jid &jid )
{
- QPtrList<JabberBaseContact> list;
+ TQPtrList<JabberBaseContact> list;
for(JabberContactPoolItem *mContactItem = mPool.first (); mContactItem; mContactItem = mPool.next ())
{
diff --git a/kopete/protocols/jabber/jabbercontactpool.h b/kopete/protocols/jabber/jabbercontactpool.h
index 6582f64c..419061fd 100644
--- a/kopete/protocols/jabber/jabbercontactpool.h
+++ b/kopete/protocols/jabber/jabbercontactpool.h
@@ -18,7 +18,7 @@
#ifndef JABBERCONTACTPOOL_H
#define JABBERCONTACTPOOL_H
-#include <qobject.h>
+#include <tqobject.h>
#include <im.h>
namespace Kopete { class MetaContact; }
@@ -92,7 +92,7 @@ public:
* Find relevant sources for a given JID.
* This will match user@domain/resource for a given user@domain.
*/
- QPtrList<JabberBaseContact> findRelevantSources ( const XMPP::Jid &jid );
+ TQPtrList<JabberBaseContact> findRelevantSources ( const XMPP::Jid &jid );
private slots:
void slotContactDestroyed ( Kopete::Contact *contact );
@@ -100,7 +100,7 @@ private slots:
private:
JabberContactPoolItem *findPoolItem ( const XMPP::RosterItem &contact );
- QPtrList<JabberContactPoolItem> mPool;
+ TQPtrList<JabberContactPoolItem> mPool;
JabberAccount *mAccount;
};
diff --git a/kopete/protocols/jabber/jabberfiletransfer.cpp b/kopete/protocols/jabber/jabberfiletransfer.cpp
index fde5b105..00d8be18 100644
--- a/kopete/protocols/jabber/jabberfiletransfer.cpp
+++ b/kopete/protocols/jabber/jabberfiletransfer.cpp
@@ -35,7 +35,7 @@
JabberFileTransfer::JabberFileTransfer ( JabberAccount *account, XMPP::FileTransfer *incomingTransfer )
{
- kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "New incoming transfer from " << incomingTransfer->peer().full () << ", filename " << incomingTransfer->fileName () << ", size " << QString::number ( incomingTransfer->fileSize () ) << endl;
+ kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "New incoming transfer from " << incomingTransfer->peer().full () << ", filename " << incomingTransfer->fileName () << ", size " << TQString::number ( incomingTransfer->fileSize () ) << endl;
mAccount = account;
mXMPPTransfer = incomingTransfer;
@@ -62,10 +62,10 @@ JabberFileTransfer::JabberFileTransfer ( JabberAccount *account, XMPP::FileTrans
Kopete::ContactList::self ()->addMetaContact ( metaContact );
}
- connect ( Kopete::TransferManager::transferManager (), SIGNAL ( accepted ( Kopete::Transfer *, const QString & ) ),
- this, SLOT ( slotIncomingTransferAccepted ( Kopete::Transfer *, const QString & ) ) );
- connect ( Kopete::TransferManager::transferManager (), SIGNAL ( refused ( const Kopete::FileTransferInfo & ) ),
- this, SLOT ( slotTransferRefused ( const Kopete::FileTransferInfo & ) ) );
+ connect ( Kopete::TransferManager::transferManager (), TQT_SIGNAL ( accepted ( Kopete::Transfer *, const TQString & ) ),
+ this, TQT_SLOT ( slotIncomingTransferAccepted ( Kopete::Transfer *, const TQString & ) ) );
+ connect ( Kopete::TransferManager::transferManager (), TQT_SIGNAL ( refused ( const Kopete::FileTransferInfo & ) ),
+ this, TQT_SLOT ( slotTransferRefused ( const Kopete::FileTransferInfo & ) ) );
initializeVariables ();
@@ -76,7 +76,7 @@ JabberFileTransfer::JabberFileTransfer ( JabberAccount *account, XMPP::FileTrans
}
-JabberFileTransfer::JabberFileTransfer ( JabberAccount *account, JabberBaseContact *contact, const QString &file )
+JabberFileTransfer::JabberFileTransfer ( JabberAccount *account, JabberBaseContact *contact, const TQString &file )
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "New outgoing transfer for " << contact->contactId() << ": " << file << endl;
@@ -90,15 +90,15 @@ JabberFileTransfer::JabberFileTransfer ( JabberAccount *account, JabberBaseConta
contact->contactId (),
Kopete::FileTransferInfo::Outgoing );
- connect ( mKopeteTransfer, SIGNAL ( result ( KIO::Job * ) ), this, SLOT ( slotTransferResult () ) );
+ connect ( mKopeteTransfer, TQT_SIGNAL ( result ( KIO::Job * ) ), this, TQT_SLOT ( slotTransferResult () ) );
mXMPPTransfer = mAccount->client()->fileTransferManager()->createTransfer ();
initializeVariables ();
- connect ( mXMPPTransfer, SIGNAL ( connected () ), this, SLOT ( slotOutgoingConnected () ) );
- connect ( mXMPPTransfer, SIGNAL ( bytesWritten ( int ) ), this, SLOT ( slotOutgoingBytesWritten ( int ) ) );
- connect ( mXMPPTransfer, SIGNAL ( error ( int ) ), this, SLOT ( slotTransferError ( int ) ) );
+ connect ( mXMPPTransfer, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotOutgoingConnected () ) );
+ connect ( mXMPPTransfer, TQT_SIGNAL ( bytesWritten ( int ) ), this, TQT_SLOT ( slotOutgoingBytesWritten ( int ) ) );
+ connect ( mXMPPTransfer, TQT_SIGNAL ( error ( int ) ), this, TQT_SLOT ( slotTransferError ( int ) ) );
mXMPPTransfer->sendFile ( XMPP::Jid ( contact->fullAddress () ), KURL(file).fileName (), mLocalFile.size (), "" );
@@ -125,7 +125,7 @@ void JabberFileTransfer::initializeVariables ()
}
-void JabberFileTransfer::slotIncomingTransferAccepted ( Kopete::Transfer *transfer, const QString &fileName )
+void JabberFileTransfer::slotIncomingTransferAccepted ( Kopete::Transfer *transfer, const TQString &fileName )
{
if ( (long)transfer->info().transferId () != mTransferId )
@@ -188,9 +188,9 @@ void JabberFileTransfer::slotIncomingTransferAccepted ( Kopete::Transfer *transf
}
else
{
- connect ( mKopeteTransfer, SIGNAL ( result ( KIO::Job * ) ), this, SLOT ( slotTransferResult () ) );
- connect ( mXMPPTransfer, SIGNAL ( readyRead ( const QByteArray& ) ), this, SLOT ( slotIncomingDataReady ( const QByteArray & ) ) );
- connect ( mXMPPTransfer, SIGNAL ( error ( int ) ), this, SLOT ( slotTransferError ( int ) ) );
+ connect ( mKopeteTransfer, TQT_SIGNAL ( result ( KIO::Job * ) ), this, TQT_SLOT ( slotTransferResult () ) );
+ connect ( mXMPPTransfer, TQT_SIGNAL ( readyRead ( const TQByteArray& ) ), this, TQT_SLOT ( slotIncomingDataReady ( const TQByteArray & ) ) );
+ connect ( mXMPPTransfer, TQT_SIGNAL ( error ( int ) ), this, TQT_SLOT ( slotTransferError ( int ) ) );
mXMPPTransfer->accept ( offset, length );
}
@@ -260,7 +260,7 @@ void JabberFileTransfer::slotTransferError ( int errorCode )
}
-void JabberFileTransfer::slotIncomingDataReady ( const QByteArray &data )
+void JabberFileTransfer::slotIncomingDataReady ( const TQByteArray &data )
{
mBytesTransferred += data.size ();
@@ -306,7 +306,7 @@ void JabberFileTransfer::slotOutgoingBytesWritten ( int nrWritten )
{
int nrToWrite = mXMPPTransfer->dataSizeNeeded ();
- QByteArray readBuffer ( nrToWrite );
+ TQByteArray readBuffer ( nrToWrite );
mLocalFile.readBlock ( readBuffer.data (), nrToWrite );
diff --git a/kopete/protocols/jabber/jabberfiletransfer.h b/kopete/protocols/jabber/jabberfiletransfer.h
index 01ba99e1..296e38ca 100644
--- a/kopete/protocols/jabber/jabberfiletransfer.h
+++ b/kopete/protocols/jabber/jabberfiletransfer.h
@@ -18,7 +18,7 @@
#ifndef JABBERFILETRANSFER_H
#define JABBERFILETRANSFER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <filetransfer.h>
class QString;
@@ -41,12 +41,12 @@ public:
/**
* Constructor for an outgoing transfer
*/
- JabberFileTransfer ( JabberAccount *account, JabberBaseContact *contact, const QString &file );
+ JabberFileTransfer ( JabberAccount *account, JabberBaseContact *contact, const TQString &file );
~JabberFileTransfer ();
private slots:
- void slotIncomingTransferAccepted ( Kopete::Transfer *transfer, const QString &fileName );
+ void slotIncomingTransferAccepted ( Kopete::Transfer *transfer, const TQString &fileName );
void slotTransferRefused ( const Kopete::FileTransferInfo &transfer );
void slotTransferResult ();
void slotTransferError ( int errorCode );
@@ -54,7 +54,7 @@ private slots:
void slotOutgoingConnected ();
void slotOutgoingBytesWritten ( int nrWritten );
- void slotIncomingDataReady ( const QByteArray &data );
+ void slotIncomingDataReady ( const TQByteArray &data );
private:
void initializeVariables ();
@@ -62,7 +62,7 @@ private:
JabberAccount *mAccount;
XMPP::FileTransfer *mXMPPTransfer;
Kopete::Transfer *mKopeteTransfer;
- QFile mLocalFile;
+ TQFile mLocalFile;
int mTransferId;
Q_LLONG mBytesTransferred;
Q_LLONG mBytesToTransfer;
diff --git a/kopete/protocols/jabber/jabberformlineedit.cpp b/kopete/protocols/jabber/jabberformlineedit.cpp
index 04187b20..991d4a56 100644
--- a/kopete/protocols/jabber/jabberformlineedit.cpp
+++ b/kopete/protocols/jabber/jabberformlineedit.cpp
@@ -17,7 +17,7 @@
#include "jabberformlineedit.h"
-JabberFormLineEdit::JabberFormLineEdit (const int type, const QString & realName, const QString & value, QWidget * parent, const char *name):QLineEdit (value,
+JabberFormLineEdit::JabberFormLineEdit (const int type, const TQString & realName, const TQString & value, TQWidget * parent, const char *name):TQLineEdit (value,
parent,
name)
{
@@ -38,7 +38,7 @@ JabberFormLineEdit::~JabberFormLineEdit ()
{
}
-JabberFormPasswordEdit::JabberFormPasswordEdit (const int type, const QString & realName, const QString & value, QWidget * parent, const char *name):KPasswordEdit(parent, name)
+JabberFormPasswordEdit::JabberFormPasswordEdit (const int type, const TQString & realName, const TQString & value, TQWidget * parent, const char *name):KPasswordEdit(parent, name)
{
setText(value);
diff --git a/kopete/protocols/jabber/jabberformlineedit.h b/kopete/protocols/jabber/jabberformlineedit.h
index 770bab39..179a8844 100644
--- a/kopete/protocols/jabber/jabberformlineedit.h
+++ b/kopete/protocols/jabber/jabberformlineedit.h
@@ -18,8 +18,8 @@
#ifndef JABBERFORMLINEEDIT_H
#define JABBERFORMLINEEDIT_H
-#include <qwidget.h>
-#include <qlineedit.h>
+#include <tqwidget.h>
+#include <tqlineedit.h>
#include <kpassdlg.h>
#include "xmpp_tasks.h"
@@ -32,14 +32,14 @@ class JabberFormLineEdit:public QLineEdit
{
Q_OBJECT public:
- JabberFormLineEdit (const int type, const QString & realName, const QString & value, QWidget * parent = 0, const char *name = 0);
+ JabberFormLineEdit (const int type, const TQString & realName, const TQString & value, TQWidget * parent = 0, const char *name = 0);
~JabberFormLineEdit ();
public slots:void slotGatherData (XMPP::Form & form);
private:
int fieldType;
- QString fieldName;
+ TQString fieldName;
};
@@ -47,13 +47,13 @@ class JabberFormPasswordEdit:public KPasswordEdit
{
Q_OBJECT public:
- JabberFormPasswordEdit(const int type, const QString & realName, const QString & value, QWidget * parent = 0, const char *name = 0);
+ JabberFormPasswordEdit(const int type, const TQString & realName, const TQString & value, TQWidget * parent = 0, const char *name = 0);
public slots:void slotGatherData (XMPP::Form & form);
private:
int fieldType;
- QString fieldName;
+ TQString fieldName;
};
#endif
diff --git a/kopete/protocols/jabber/jabberformtranslator.cpp b/kopete/protocols/jabber/jabberformtranslator.cpp
index fe6ec230..3344f802 100644
--- a/kopete/protocols/jabber/jabberformtranslator.cpp
+++ b/kopete/protocols/jabber/jabberformtranslator.cpp
@@ -15,14 +15,14 @@
* *************************************************************************
*/
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kdebug.h>
#include "jabberformlineedit.h"
#include "jabberformtranslator.h"
-JabberFormTranslator::JabberFormTranslator (const XMPP::Form & form, QWidget * parent, const char *name):QWidget (parent, name)
+JabberFormTranslator::JabberFormTranslator (const XMPP::Form & form, TQWidget * parent, const char *name):TQWidget (parent, name)
{
/* Copy basic form values. */
privForm.setJid (form.jid ());
@@ -32,16 +32,16 @@ JabberFormTranslator::JabberFormTranslator (const XMPP::Form & form, QWidget * p
emptyForm = privForm;
/* Add instructions to layout. */
- QVBoxLayout *innerLayout = new QVBoxLayout (this, 0, 4);
+ TQVBoxLayout *innerLayout = new TQVBoxLayout (this, 0, 4);
- QLabel *label = new QLabel (form.instructions (), this, "InstructionLabel");
- label->setAlignment (int (QLabel::WordBreak | QLabel::AlignVCenter));
- label->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Fixed, true);
+ TQLabel *label = new TQLabel (form.instructions (), this, "InstructionLabel");
+ label->setAlignment (int (TQLabel::WordBreak | TQLabel::AlignVCenter));
+ label->setSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Fixed, true);
label->show ();
innerLayout->addWidget (label, 0);
- QGridLayout *formLayout = new QGridLayout (innerLayout, form.count (), 2);
+ TQGridLayout *formLayout = new TQGridLayout (innerLayout, form.count (), 2);
int row = 1;
XMPP::Form::const_iterator formEnd = form.end ();
@@ -50,11 +50,11 @@ JabberFormTranslator::JabberFormTranslator (const XMPP::Form & form, QWidget * p
kdDebug (14130) << "[JabberFormTranslator] Adding field realName()==" <<
(*it).realName () << ", fieldName()==" << (*it).fieldName () << " to the dialog" << endl;
- label = new QLabel ((*it).fieldName (), this, (*it).fieldName ().latin1 ());
+ label = new TQLabel ((*it).fieldName (), this, (*it).fieldName ().latin1 ());
formLayout->addWidget (label, row, 0);
label->show ();
- QLineEdit *edit;
+ TQLineEdit *edit;
if ((*it).type() == XMPP::FormField::password)
{
edit = new JabberFormPasswordEdit((*it).type (), (*it).realName (), (*it).value (), this);
@@ -67,7 +67,7 @@ JabberFormTranslator::JabberFormTranslator (const XMPP::Form & form, QWidget * p
formLayout->addWidget (edit, row, 1);
edit->show ();
- connect (this, SIGNAL (gatherData (XMPP::Form &)), edit, SLOT (slotGatherData (XMPP::Form &)));
+ connect (this, TQT_SIGNAL (gatherData (XMPP::Form &)), edit, TQT_SLOT (slotGatherData (XMPP::Form &)));
}
innerLayout->addStretch ();
diff --git a/kopete/protocols/jabber/jabberformtranslator.h b/kopete/protocols/jabber/jabberformtranslator.h
index d9cf4044..875594df 100644
--- a/kopete/protocols/jabber/jabberformtranslator.h
+++ b/kopete/protocols/jabber/jabberformtranslator.h
@@ -18,8 +18,8 @@
#ifndef JABBERFORMTRANSLATOR_H
#define JABBERFORMTRANSLATOR_H
-#include <qwidget.h>
-#include <qlayout.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
#include "xmpp_tasks.h"
@@ -33,7 +33,7 @@ class JabberFormTranslator:public QWidget
Q_OBJECT
public:
- JabberFormTranslator (const XMPP::Form & form, QWidget * parent = 0, const char *name = 0);
+ JabberFormTranslator (const XMPP::Form & form, TQWidget * parent = 0, const char *name = 0);
~JabberFormTranslator ();
XMPP::Form & resultData ();
diff --git a/kopete/protocols/jabber/jabbergroupchatmanager.cpp b/kopete/protocols/jabber/jabbergroupchatmanager.cpp
index 7686ba8c..e098fdad 100644
--- a/kopete/protocols/jabber/jabbergroupchatmanager.cpp
+++ b/kopete/protocols/jabber/jabbergroupchatmanager.cpp
@@ -17,7 +17,7 @@
#include "jabbergroupchatmanager.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include <klocale.h>
#include "kopetechatsessionmanager.h"
@@ -40,8 +40,8 @@ JabberGroupChatManager::JabberGroupChatManager ( JabberProtocol *protocol, const
// make sure Kopete knows about this instance
Kopete::ChatSessionManager::self()->registerChatSession ( this );
- connect ( this, SIGNAL ( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ),
- this, SLOT ( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) );
+ connect ( this, TQT_SIGNAL ( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ),
+ this, TQT_SLOT ( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) );
updateDisplayName ();
}
@@ -102,10 +102,10 @@ void JabberGroupChatManager::slotMessageSent ( Kopete::Message &message, Kopete:
// please don't translate the following string
jabberMessage.setBody ( i18n ( "This message is encrypted." ) );
- QString encryptedBody = message.plainBody ();
+ TQString encryptedBody = message.plainBody ();
// remove PGP header and footer from message
- encryptedBody.truncate ( encryptedBody.length () - QString("-----END PGP MESSAGE-----").length () - 2 );
+ encryptedBody.truncate ( encryptedBody.length () - TQString("-----END PGP MESSAGE-----").length () - 2 );
encryptedBody = encryptedBody.right ( encryptedBody.length () - encryptedBody.find ( "\n\n" ) - 2 );
// assign payload to message
@@ -135,7 +135,7 @@ void JabberGroupChatManager::slotMessageSent ( Kopete::Message &message, Kopete:
}
}
-void JabberGroupChatManager::inviteContact( const QString & contactId )
+void JabberGroupChatManager::inviteContact( const TQString & contactId )
{
if( account()->isConnected () )
{
diff --git a/kopete/protocols/jabber/jabbergroupchatmanager.h b/kopete/protocols/jabber/jabbergroupchatmanager.h
index 96c689d0..98fda47a 100644
--- a/kopete/protocols/jabber/jabbergroupchatmanager.h
+++ b/kopete/protocols/jabber/jabbergroupchatmanager.h
@@ -61,7 +61,7 @@ public:
* reimplemented from Kopete::ChatSession
* called when a contact is droped in the window
*/
- virtual void inviteContact(const QString &contactId);
+ virtual void inviteContact(const TQString &contactId);
private slots:
void slotMessageSent ( Kopete::Message &message, Kopete::ChatSession *kmm );
diff --git a/kopete/protocols/jabber/jabbergroupcontact.cpp b/kopete/protocols/jabber/jabbergroupcontact.cpp
index 83d69ab9..4cc9d628 100644
--- a/kopete/protocols/jabber/jabbergroupcontact.cpp
+++ b/kopete/protocols/jabber/jabbergroupcontact.cpp
@@ -58,10 +58,10 @@ JabberGroupContact::JabberGroupContact (const XMPP::RosterItem &rosterItem, Jabb
mManager = new JabberGroupChatManager ( protocol (), mSelfContact,
Kopete::ContactPtrList (), XMPP::Jid ( rosterItem.jid().userHost () ) );
- connect ( mManager, SIGNAL ( closing ( Kopete::ChatSession* ) ), this, SLOT ( slotChatSessionDeleted () ) );
+ connect ( mManager, TQT_SIGNAL ( closing ( Kopete::ChatSession* ) ), this, TQT_SLOT ( slotChatSessionDeleted () ) );
- connect ( account->myself() , SIGNAL(onlineStatusChanged( Kopete::Contact*, const Kopete::OnlineStatus&, const Kopete::OnlineStatus& ) ) ,
- this , SLOT(slotStatusChanged() ) ) ;
+ connect ( account->myself() , TQT_SIGNAL(onlineStatusChanged( Kopete::Contact*, const Kopete::OnlineStatus&, const Kopete::OnlineStatus& ) ) ,
+ this , TQT_SLOT(slotStatusChanged() ) ) ;
/**
* FIXME: The first contact in the list of the message manager
@@ -109,11 +109,11 @@ JabberGroupContact::~JabberGroupContact ()
}
}
-QPtrList<KAction> *JabberGroupContact::customContextMenuActions ()
+TQPtrList<KAction> *JabberGroupContact::customContextMenuActions ()
{
- QPtrList<KAction> *actionCollection = new QPtrList<KAction>();
+ TQPtrList<KAction> *actionCollection = new TQPtrList<KAction>();
- KAction *actionSetNick = new KAction (i18n ("Change nick name"), 0, 0, this, SLOT (slotChangeNick()), this, "jabber_changenick");
+ KAction *actionSetNick = new KAction (i18n ("Change nick name"), 0, 0, this, TQT_SLOT (slotChangeNick()), this, "jabber_changenick");
actionCollection->append( actionSetNick );
return actionCollection;
@@ -129,7 +129,7 @@ Kopete::ChatSession *JabberGroupContact::manager ( Kopete::Contact::CanCreateFla
mManager->addContact ( this );
- connect ( mManager, SIGNAL ( closing ( Kopete::ChatSession* ) ), this, SLOT ( slotChatSessionDeleted () ) );
+ connect ( mManager, TQT_SIGNAL ( closing ( Kopete::ChatSession* ) ), this, TQT_SLOT ( slotChatSessionDeleted () ) );
//if we have to recreate the manager, we probably have to connect again to the chat.
slotStatusChanged();
@@ -141,7 +141,7 @@ Kopete::ChatSession *JabberGroupContact::manager ( Kopete::Contact::CanCreateFla
void JabberGroupContact::handleIncomingMessage (const XMPP::Message & message)
{
// message type is always chat in a groupchat
- QString viewType = "kopete_chatwindow";
+ TQString viewType = "kopete_chatwindow";
Kopete::Message *newMessage = 0L;
kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Received a message" << endl;
@@ -168,11 +168,11 @@ void JabberGroupContact::handleIncomingMessage (const XMPP::Message & message)
else
{
// retrieve and reformat body
- QString body = message.body ();
+ TQString body = message.body ();
if( !message.xencrypted().isEmpty () )
{
- body = QString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + QString ("\n-----END PGP MESSAGE-----\n");
+ body = TQString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + TQString ("\n-----END PGP MESSAGE-----\n");
}
// locate the originating contact
@@ -238,7 +238,7 @@ JabberBaseContact *JabberGroupContact::addSubContact ( const XMPP::RosterItem &r
// now, add the contact also to our own list
mContactList.append ( subContact );
- connect(subContact , SIGNAL(contactDestroyed(Kopete::Contact*)) , this , SLOT(slotSubContactDestroyed(Kopete::Contact*)));
+ connect(subContact , TQT_SIGNAL(contactDestroyed(Kopete::Contact*)) , this , TQT_SLOT(slotSubContactDestroyed(Kopete::Contact*)));
return subContact;
@@ -290,17 +290,17 @@ void JabberGroupContact::removeSubContact ( const XMPP::RosterItem &rosterItem )
}
-void JabberGroupContact::sendFile ( const KURL &sourceURL, const QString &/*fileName*/, uint /*fileSize*/ )
+void JabberGroupContact::sendFile ( const KURL &sourceURL, const TQString &/*fileName*/, uint /*fileSize*/ )
{
- QString filePath;
+ TQString filePath;
// if the file location is null, then get it from a file open dialog
if ( !sourceURL.isValid () )
- filePath = KFileDialog::getOpenFileName( QString::null , "*", 0L, i18n ( "Kopete File Transfer" ) );
+ filePath = KFileDialog::getOpenFileName( TQString::null , "*", 0L, i18n ( "Kopete File Transfer" ) );
else
filePath = sourceURL.path(-1);
- QFile file ( filePath );
+ TQFile file ( filePath );
if ( file.exists () )
{
@@ -329,7 +329,7 @@ void JabberGroupContact::slotStatusChanged( )
if( !account()->isConnected() )
{
//we need to remove all contact, because when we connect again, we will not receive the notificaion they are gone.
- QPtrList<Kopete::Contact> copy_contactlist=mContactList;
+ TQPtrList<Kopete::Contact> copy_contactlist=mContactList;
for ( Kopete::Contact *contact = copy_contactlist.first (); contact; contact = copy_contactlist.next () )
{
removeSubContact( XMPP::Jid(contact->contactId()) );
@@ -353,7 +353,7 @@ void JabberGroupContact::slotChangeNick( )
{
bool ok;
- QString futureNewNickName = KInputDialog::getText( i18n( "Change nickanme - Jabber Plugin" ),
+ TQString futureNewNickName = KInputDialog::getText( i18n( "Change nickanme - Jabber Plugin" ),
i18n( "Please enter the new nick name you want to have on the room <i>%1</i>" ).arg(rosterItem().jid().userHost()),
mNick, &ok );
if ( !ok || !account()->isConnected())
diff --git a/kopete/protocols/jabber/jabbergroupcontact.h b/kopete/protocols/jabber/jabbergroupcontact.h
index c157b823..7cbd4f36 100644
--- a/kopete/protocols/jabber/jabbergroupcontact.h
+++ b/kopete/protocols/jabber/jabbergroupcontact.h
@@ -39,7 +39,7 @@ public:
* Create custom context menu items for the contact
* FIXME: implement manager version here?
*/
- QPtrList<KAction> *customContextMenuActions ();
+ TQPtrList<KAction> *customContextMenuActions ();
/**
* Deal with an incoming message for this contact.
@@ -70,7 +70,7 @@ public slots:
* a nondeterminate file size (such as over a socket)
*/
virtual void sendFile( const KURL &sourceURL = KURL(),
- const QString &fileName = QString::null, uint fileSize = 0L );
+ const TQString &fileName = TQString::null, uint fileSize = 0L );
private slots:
@@ -96,12 +96,12 @@ private slots:
private:
- QPtrList<Kopete::Contact> mContactList;
- QPtrList<Kopete::MetaContact> mMetaContactList;
+ TQPtrList<Kopete::Contact> mContactList;
+ TQPtrList<Kopete::MetaContact> mMetaContactList;
JabberGroupChatManager *mManager;
JabberBaseContact *mSelfContact;
- QString mNick;
+ TQString mNick;
};
#endif
diff --git a/kopete/protocols/jabber/jabbergroupmembercontact.cpp b/kopete/protocols/jabber/jabbergroupmembercontact.cpp
index 2e86b898..ca71b472 100644
--- a/kopete/protocols/jabber/jabbergroupmembercontact.cpp
+++ b/kopete/protocols/jabber/jabbergroupmembercontact.cpp
@@ -56,7 +56,7 @@ JabberGroupMemberContact::~JabberGroupMemberContact ()
}
}
-QPtrList<KAction> *JabberGroupMemberContact::customContextMenuActions ()
+TQPtrList<KAction> *JabberGroupMemberContact::customContextMenuActions ()
{
return 0;
@@ -80,7 +80,7 @@ Kopete::ChatSession *JabberGroupMemberContact::manager ( Kopete::Contact::CanCre
* the global myself() instance for a correct representation.
*/
mManager = new JabberChatSession ( protocol(), static_cast<JabberBaseContact *>(account()->myself()), chatMembers );
- connect ( mManager, SIGNAL ( destroyed ( QObject * ) ), this, SLOT ( slotChatSessionDeleted () ) );
+ connect ( mManager, TQT_SIGNAL ( destroyed ( TQObject * ) ), this, TQT_SLOT ( slotChatSessionDeleted () ) );
return mManager;
@@ -96,7 +96,7 @@ void JabberGroupMemberContact::slotChatSessionDeleted ()
void JabberGroupMemberContact::handleIncomingMessage ( const XMPP::Message &message )
{
// message type is always chat in a groupchat
- QString viewType = "kopete_chatwindow";
+ TQString viewType = "kopete_chatwindow";
Kopete::Message *newMessage = 0L;
kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Received Message Type:" << message.type () << endl;
@@ -124,11 +124,11 @@ void JabberGroupMemberContact::handleIncomingMessage ( const XMPP::Message &mess
else
{
// retrieve and reformat body
- QString body = message.body ();
+ TQString body = message.body ();
if( !message.xencrypted().isEmpty () )
{
- body = QString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + QString ("\n-----END PGP MESSAGE-----\n");
+ body = TQString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + TQString ("\n-----END PGP MESSAGE-----\n");
}
// convert XMPP::Message into Kopete::Message
@@ -144,17 +144,17 @@ void JabberGroupMemberContact::handleIncomingMessage ( const XMPP::Message &mess
}
-void JabberGroupMemberContact::sendFile ( const KURL &sourceURL, const QString &/*fileName*/, uint /*fileSize*/ )
+void JabberGroupMemberContact::sendFile ( const KURL &sourceURL, const TQString &/*fileName*/, uint /*fileSize*/ )
{
- QString filePath;
+ TQString filePath;
// if the file location is null, then get it from a file open dialog
if ( !sourceURL.isValid () )
- filePath = KFileDialog::getOpenFileName( QString::null , "*", 0L, i18n ( "Kopete File Transfer" ) );
+ filePath = KFileDialog::getOpenFileName( TQString::null , "*", 0L, i18n ( "Kopete File Transfer" ) );
else
filePath = sourceURL.path(-1);
- QFile file ( filePath );
+ TQFile file ( filePath );
if ( file.exists () )
{
diff --git a/kopete/protocols/jabber/jabbergroupmembercontact.h b/kopete/protocols/jabber/jabbergroupmembercontact.h
index d4ec5b06..2936a5f8 100644
--- a/kopete/protocols/jabber/jabbergroupmembercontact.h
+++ b/kopete/protocols/jabber/jabbergroupmembercontact.h
@@ -40,7 +40,7 @@ public:
* Create custom context menu items for the contact
* FIXME: implement manager version here?
*/
- QPtrList<KAction> *customContextMenuActions ();
+ TQPtrList<KAction> *customContextMenuActions ();
/**
* Return message manager for this instance.
@@ -64,7 +64,7 @@ public slots:
* a nondeterminate file size (such as over a socket)
*/
virtual void sendFile( const KURL &sourceURL = KURL(),
- const QString &fileName = QString::null, uint fileSize = 0L );
+ const TQString &fileName = TQString::null, uint fileSize = 0L );
private slots:
/**
diff --git a/kopete/protocols/jabber/jabberprotocol.cpp b/kopete/protocols/jabber/jabberprotocol.cpp
index ea2e8039..df8dba7d 100644
--- a/kopete/protocols/jabber/jabberprotocol.cpp
+++ b/kopete/protocols/jabber/jabberprotocol.cpp
@@ -26,12 +26,12 @@
#include <kstandarddirs.h>
#include <klineeditdlg.h>
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qmap.h>
-#include <qtimer.h>
-#include <qpixmap.h>
-#include <qstringlist.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqmap.h>
+#include <tqtimer.h>
+#include <tqpixmap.h>
+#include <tqstringlist.h>
#include "im.h"
#include "xmpp.h"
@@ -69,14 +69,14 @@ typedef KGenericFactory<JabberProtocol> JabberProtocolFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_jabber, JabberProtocolFactory( "kopete_jabber" ) )
-JabberProtocol::JabberProtocol (QObject * parent, const char *name, const QStringList &)
+JabberProtocol::JabberProtocol (TQObject * parent, const char *name, const TQStringList &)
: Kopete::Protocol( JabberProtocolFactory::instance(), parent, name ),
JabberKOSChatty(Kopete::OnlineStatus::Online, 100, this, JabberFreeForChat, "jabber_chatty", i18n ("Free for Chat"), i18n ("Free for Chat"), Kopete::OnlineStatusManager::FreeForChat, Kopete::OnlineStatusManager::HasAwayMessage ),
- JabberKOSOnline(Kopete::OnlineStatus::Online, 90, this, JabberOnline, QString::null, i18n ("Online"), i18n ("Online"), Kopete::OnlineStatusManager::Online, Kopete::OnlineStatusManager::HasAwayMessage ),
+ JabberKOSOnline(Kopete::OnlineStatus::Online, 90, this, JabberOnline, TQString::null, i18n ("Online"), i18n ("Online"), Kopete::OnlineStatusManager::Online, Kopete::OnlineStatusManager::HasAwayMessage ),
JabberKOSAway(Kopete::OnlineStatus::Away, 80, this, JabberAway, "contact_away_overlay", i18n ("Away"), i18n ("Away"), Kopete::OnlineStatusManager::Away, Kopete::OnlineStatusManager::HasAwayMessage),
JabberKOSXA(Kopete::OnlineStatus::Away, 70, this, JabberXA, "contact_xa_overlay", i18n ("Extended Away"), i18n ("Extended Away"), 0, Kopete::OnlineStatusManager::HasAwayMessage),
JabberKOSDND(Kopete::OnlineStatus::Away, 60, this, JabberDND, "contact_busy_overlay", i18n ("Do not Disturb"), i18n ("Do not Disturb"), Kopete::OnlineStatusManager::Busy, Kopete::OnlineStatusManager::HasAwayMessage),
- JabberKOSOffline(Kopete::OnlineStatus::Offline, 50, this, JabberOffline, QString::null, i18n ("Offline") ,i18n ("Offline"), Kopete::OnlineStatusManager::Offline, Kopete::OnlineStatusManager::HasAwayMessage ),
+ JabberKOSOffline(Kopete::OnlineStatus::Offline, 50, this, JabberOffline, TQString::null, i18n ("Offline") ,i18n ("Offline"), Kopete::OnlineStatusManager::Offline, Kopete::OnlineStatusManager::HasAwayMessage ),
JabberKOSInvisible(Kopete::OnlineStatus::Invisible, 40, this, JabberInvisible, "contact_invisible_overlay", i18n ("Invisible") ,i18n ("Invisible"), Kopete::OnlineStatusManager::Invisible),
JabberKOSConnecting(Kopete::OnlineStatus::Connecting, 30, this, JabberConnecting, "jabber_connecting", i18n("Connecting")),
propLastSeen(Kopete::Global::Properties::self()->lastSeen()),
@@ -90,34 +90,34 @@ JabberProtocol::JabberProtocol (QObject * parent, const char *name, const QStrin
propWorkPhone(Kopete::Global::Properties::self()->workPhone()),
propWorkMobilePhone(Kopete::Global::Properties::self()->workMobilePhone()),
propNickName(Kopete::Global::Properties::self()->nickName()),
- propSubscriptionStatus("jabberSubscriptionStatus", i18n ("Subscription"), QString::null, true, false),
- propAuthorizationStatus("jabberAuthorizationStatus", i18n ("Authorization Status"), QString::null, true, false),
+ propSubscriptionStatus("jabberSubscriptionStatus", i18n ("Subscription"), TQString::null, true, false),
+ propAuthorizationStatus("jabberAuthorizationStatus", i18n ("Authorization Status"), TQString::null, true, false),
propAvailableResources("jabberAvailableResources", i18n ("Available Resources"), "jabber_chatty", false, true),
- propVCardCacheTimeStamp("jabberVCardCacheTimeStamp", i18n ("vCard Cache Timestamp"), QString::null, true, false, true),
+ propVCardCacheTimeStamp("jabberVCardCacheTimeStamp", i18n ("vCard Cache Timestamp"), TQString::null, true, false, true),
propPhoto(Kopete::Global::Properties::self()->photo()),
- propJid("jabberVCardJid", i18n("Jabber ID"), QString::null, true, false),
- propBirthday("jabberVCardBirthday", i18n("Birthday"), QString::null, true, false),
- propTimezone("jabberVCardTimezone", i18n("Timezone"), QString::null, true, false),
- propHomepage("jabberVCardHomepage", i18n("Homepage"), QString::null, true, false),
- propCompanyName("jabberVCardCompanyName", i18n("Company name"), QString::null, true, false),
- propCompanyDepartement("jabberVCardCompanyDepartement", i18n("Company Departement"), QString::null, true, false),
- propCompanyPosition("jabberVCardCompanyPosition", i18n("Company Position"), QString::null, true, false),
- propCompanyRole("jabberVCardCompanyRole", i18n("Company Role"), QString::null, true, false),
- propWorkStreet("jabberVCardWorkStreet", i18n("Work Street"), QString::null, true, false),
- propWorkExtAddr("jabberVCardWorkExtAddr", i18n("Work Extra Address"), QString::null, true, false),
- propWorkPOBox("jabberVCardWorkPOBox", i18n("Work PO Box"), QString::null, true, false),
- propWorkCity("jabberVCardWorkCity", i18n("Work City"), QString::null, true, false),
- propWorkPostalCode("jabberVCardWorkPostalCode", i18n("Work Postal Code"), QString::null, true, false),
- propWorkCountry("jabberVCardWorkCountry", i18n("Work Country"), QString::null, true, false),
- propWorkEmailAddress("jabberVCardWorkEmailAddress", i18n("Work Email Address"), QString::null, true, false),
- propHomeStreet("jabberVCardHomeStreet", i18n("Home Street"), QString::null, true, false),
- propHomeExtAddr("jabberVCardHomeExt", i18n("Home Extra Address"), QString::null, true, false),
- propHomePOBox("jabberVCardHomePOBox", i18n("Home PO Box"), QString::null, true, false),
- propHomeCity("jabberVCardHomeCity", i18n("Home City"), QString::null, true, false),
- propHomePostalCode("jabberVCardHomePostalCode", i18n("Home Postal Code"), QString::null, true, false),
- propHomeCountry("jabberVCardHomeCountry", i18n("Home Country"), QString::null, true, false),
- propPhoneFax("jabberVCardPhoneFax", i18n("Fax"), QString::null, true, false),
- propAbout("jabberVCardAbout", i18n("About"), QString::null, true, false)
+ propJid("jabberVCardJid", i18n("Jabber ID"), TQString::null, true, false),
+ propBirthday("jabberVCardBirthday", i18n("Birthday"), TQString::null, true, false),
+ propTimezone("jabberVCardTimezone", i18n("Timezone"), TQString::null, true, false),
+ propHomepage("jabberVCardHomepage", i18n("Homepage"), TQString::null, true, false),
+ propCompanyName("jabberVCardCompanyName", i18n("Company name"), TQString::null, true, false),
+ propCompanyDepartement("jabberVCardCompanyDepartement", i18n("Company Departement"), TQString::null, true, false),
+ propCompanyPosition("jabberVCardCompanyPosition", i18n("Company Position"), TQString::null, true, false),
+ propCompanyRole("jabberVCardCompanyRole", i18n("Company Role"), TQString::null, true, false),
+ propWorkStreet("jabberVCardWorkStreet", i18n("Work Street"), TQString::null, true, false),
+ propWorkExtAddr("jabberVCardWorkExtAddr", i18n("Work Extra Address"), TQString::null, true, false),
+ propWorkPOBox("jabberVCardWorkPOBox", i18n("Work PO Box"), TQString::null, true, false),
+ propWorkCity("jabberVCardWorkCity", i18n("Work City"), TQString::null, true, false),
+ propWorkPostalCode("jabberVCardWorkPostalCode", i18n("Work Postal Code"), TQString::null, true, false),
+ propWorkCountry("jabberVCardWorkCountry", i18n("Work Country"), TQString::null, true, false),
+ propWorkEmailAddress("jabberVCardWorkEmailAddress", i18n("Work Email Address"), TQString::null, true, false),
+ propHomeStreet("jabberVCardHomeStreet", i18n("Home Street"), TQString::null, true, false),
+ propHomeExtAddr("jabberVCardHomeExt", i18n("Home Extra Address"), TQString::null, true, false),
+ propHomePOBox("jabberVCardHomePOBox", i18n("Home PO Box"), TQString::null, true, false),
+ propHomeCity("jabberVCardHomeCity", i18n("Home City"), TQString::null, true, false),
+ propHomePostalCode("jabberVCardHomePostalCode", i18n("Home Postal Code"), TQString::null, true, false),
+ propHomeCountry("jabberVCardHomeCountry", i18n("Home Country"), TQString::null, true, false),
+ propPhoneFax("jabberVCardPhoneFax", i18n("Fax"), TQString::null, true, false),
+ propAbout("jabberVCardAbout", i18n("About"), TQString::null, true, false)
{
@@ -155,13 +155,13 @@ JabberProtocol::~JabberProtocol ()
-AddContactPage *JabberProtocol::createAddContactWidget (QWidget * parent, Kopete::Account * i)
+AddContactPage *JabberProtocol::createAddContactWidget (TQWidget * parent, Kopete::Account * i)
{
kdDebug (JABBER_DEBUG_GLOBAL) << "[Jabber Protocol] Create Add Contact Widget\n" << endl;
return new JabberAddContactPage (i, parent);
}
-KopeteEditAccountWidget *JabberProtocol::createEditAccountWidget (Kopete::Account * account, QWidget * parent)
+KopeteEditAccountWidget *JabberProtocol::createEditAccountWidget (Kopete::Account * account, TQWidget * parent)
{
kdDebug (JABBER_DEBUG_GLOBAL) << "[Jabber Protocol] Edit Account Widget\n" << endl;
JabberAccount *ja=dynamic_cast < JabberAccount * >(account);
@@ -179,7 +179,7 @@ KopeteEditAccountWidget *JabberProtocol::createEditAccountWidget (Kopete::Accoun
}
}
-Kopete::Account *JabberProtocol::createNewAccount (const QString & accountId)
+Kopete::Account *JabberProtocol::createNewAccount (const TQString & accountId)
{
kdDebug (JABBER_DEBUG_GLOBAL) << "[Jabber Protocol] Create New Account. ID: " << accountId << "\n" << endl;
if( Kopete::AccountManager::self()->findAccount( pluginId() , accountId ) )
@@ -188,7 +188,7 @@ Kopete::Account *JabberProtocol::createNewAccount (const QString & accountId)
int slash=accountId.find('/');
if(slash>=0)
{
- QString realAccountId=accountId.left(slash);
+ TQString realAccountId=accountId.left(slash);
JabberAccount *realAccount=dynamic_cast<JabberAccount*>(Kopete::AccountManager::self()->findAccount( pluginId() , realAccountId ));
if(!realAccount) //if it doesn't exist yet, create it
{
@@ -278,16 +278,16 @@ JabberProtocol *JabberProtocol::protocol ()
}
Kopete::Contact *JabberProtocol::deserializeContact (Kopete::MetaContact * metaContact,
- const QMap < QString, QString > &serializedData, const QMap < QString, QString > & /* addressBookData */ )
+ const TQMap < TQString, TQString > &serializedData, const TQMap < TQString, TQString > & /* addressBookData */ )
{
// kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Deserializing data for metacontact " << metaContact->displayName () << "\n" << endl;
- QString contactId = serializedData["contactId"];
- QString displayName = serializedData["displayName"];
- QString accountId = serializedData["accountId"];
- QString jid = serializedData["JID"];
+ TQString contactId = serializedData["contactId"];
+ TQString displayName = serializedData["displayName"];
+ TQString accountId = serializedData["accountId"];
+ TQString jid = serializedData["JID"];
- QDict < Kopete::Account > accounts = Kopete::AccountManager::self ()->accounts (this);
+ TQDict < Kopete::Account > accounts = Kopete::AccountManager::self ()->accounts (this);
Kopete::Account *account = accounts[accountId];
if (!account)
@@ -304,7 +304,7 @@ Kopete::Contact *JabberProtocol::deserializeContact (Kopete::MetaContact * metaC
return account->contacts()[contactId];
}
-XMPP::Status JabberProtocol::kosToStatus( const Kopete::OnlineStatus & status , const QString & message )
+XMPP::Status JabberProtocol::kosToStatus( const Kopete::OnlineStatus & status , const TQString & message )
{
XMPP::Status xmppStatus ( "", message );
diff --git a/kopete/protocols/jabber/jabberprotocol.h b/kopete/protocols/jabber/jabberprotocol.h
index 798aafb4..35c8cdbc 100644
--- a/kopete/protocols/jabber/jabberprotocol.h
+++ b/kopete/protocols/jabber/jabberprotocol.h
@@ -19,11 +19,11 @@
#ifndef JABBERPROTOCOL_H
#define JABBERPROTOCOL_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qmovie.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqmovie.h>
#include <kaction.h>
#include <kpopupmenu.h>
@@ -55,21 +55,21 @@ public:
/**
* Object constructor and destructor
*/
- JabberProtocol (QObject * parent, const char *name, const QStringList &);
+ JabberProtocol (TQObject * parent, const char *name, const TQStringList &);
~JabberProtocol ();
/**
* Creates the "add contact" dialog specific to this protocol
*/
- virtual AddContactPage *createAddContactWidget (QWidget * parent, Kopete::Account * i);
- virtual KopeteEditAccountWidget *createEditAccountWidget (Kopete::Account * account, QWidget * parent);
- virtual Kopete::Account *createNewAccount (const QString & accountId);
+ virtual AddContactPage *createAddContactWidget (TQWidget * parent, Kopete::Account * i);
+ virtual KopeteEditAccountWidget *createEditAccountWidget (Kopete::Account * account, TQWidget * parent);
+ virtual Kopete::Account *createNewAccount (const TQString & accountId);
/**
* Deserialize contact data
*/
virtual Kopete::Contact *deserializeContact (Kopete::MetaContact * metaContact,
- const QMap < QString, QString > &serializedData, const QMap < QString, QString > &addressBookData);
+ const TQMap < TQString, TQString > &serializedData, const TQMap < TQString, TQString > &addressBookData);
enum OnlineStatus { JabberOnline, JabberFreeForChat, JabberAway, JabberXA, JabberDND,
JabberOffline, JabberInvisible, JabberConnecting };
@@ -142,7 +142,7 @@ public:
/**
* Convert an online status to a XMPP::Status
*/
- XMPP::Status kosToStatus( const Kopete::OnlineStatus & status, const QString& message=QString() );
+ XMPP::Status kosToStatus( const Kopete::OnlineStatus & status, const TQString& message=TQString() );
/**
* Return the Entity Capabilities(JEP-0115) manager instance.
diff --git a/kopete/protocols/jabber/jabberresource.cpp b/kopete/protocols/jabber/jabberresource.cpp
index e74a0fa9..04b7d9f3 100644
--- a/kopete/protocols/jabber/jabberresource.cpp
+++ b/kopete/protocols/jabber/jabberresource.cpp
@@ -19,7 +19,7 @@
#include "jabberresource.h"
// Qt includes
-#include <qtimer.h>
+#include <tqtimer.h>
// KDE includes
#include <kdebug.h>
@@ -47,7 +47,7 @@ public:
XMPP::Jid jid;
XMPP::Resource resource;
- QString clientName, clientSystem;
+ TQString clientName, clientSystem;
XMPP::Features supportedFeatures;
bool capsEnabled;
};
@@ -59,10 +59,10 @@ JabberResource::JabberResource ( JabberAccount *account, const XMPP::Jid &jid, c
if ( account->isConnected () )
{
- QTimer::singleShot ( account->client()->getPenaltyTime () * 1000, this, SLOT ( slotGetTimedClientVersion () ) );
+ TQTimer::singleShot ( account->client()->getPenaltyTime () * 1000, this, TQT_SLOT ( slotGetTimedClientVersion () ) );
if(!d->capsEnabled)
{
- QTimer::singleShot ( account->client()->getPenaltyTime () * 1000, this, SLOT ( slotGetDiscoCapabilties () ) );
+ TQTimer::singleShot ( account->client()->getPenaltyTime () * 1000, this, TQT_SLOT ( slotGetDiscoCapabilties () ) );
}
}
}
@@ -92,12 +92,12 @@ void JabberResource::setResource ( const XMPP::Resource &resource )
emit updated( this );
}
-const QString &JabberResource::clientName () const
+const TQString &JabberResource::clientName () const
{
return d->clientName;
}
-const QString &JabberResource::clientSystem () const
+const TQString &JabberResource::clientSystem () const
{
return d->clientSystem;
}
@@ -123,7 +123,7 @@ void JabberResource::slotGetTimedClientVersion ()
// request client version
XMPP::JT_ClientVersion *task = new XMPP::JT_ClientVersion ( d->account->client()->rootTask () );
// signal to ourselves when the vCard data arrived
- QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotGotClientVersion () ) );
+ TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotGotClientVersion () ) );
task->get ( d->jid );
task->go ( true );
}
@@ -150,7 +150,7 @@ void JabberResource:: slotGetDiscoCapabilties ()
XMPP:: JT_DiscoInfo *task = new XMPP::JT_DiscoInfo ( d->account->client()->rootTask () );
// Retrive features when service discovery is done.
- QObject::connect ( task, SIGNAL ( finished () ), this, SLOT (slotGotDiscoCapabilities () ) );
+ TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT (slotGotDiscoCapabilities () ) );
task->get ( d->jid);
task->go ( true );
}
diff --git a/kopete/protocols/jabber/jabberresource.h b/kopete/protocols/jabber/jabberresource.h
index 7b398c09..b29129be 100644
--- a/kopete/protocols/jabber/jabberresource.h
+++ b/kopete/protocols/jabber/jabberresource.h
@@ -23,8 +23,8 @@
* Container class for a contact's resource
*/
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
class JabberAccount;
@@ -55,12 +55,12 @@ public:
* Return the client name for this resource.
* @return the client name
*/
- const QString &clientName () const;
+ const TQString &clientName () const;
/**
* Return the client system for this resource.
* @return the client system.
*/
- const QString &clientSystem () const;
+ const TQString &clientSystem () const;
/**
* Get the available features for this resource.
diff --git a/kopete/protocols/jabber/jabberresourcepool.cpp b/kopete/protocols/jabber/jabberresourcepool.cpp
index 9d953ce6..19492790 100644
--- a/kopete/protocols/jabber/jabberresourcepool.cpp
+++ b/kopete/protocols/jabber/jabberresourcepool.cpp
@@ -16,7 +16,7 @@
* *************************************************************************
*/
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include "jabberresourcepool.h"
@@ -44,8 +44,8 @@ public:
pool.setAutoDelete(true);
}
- QPtrList<JabberResource> pool;
- QPtrList<JabberResource> lockList;
+ TQPtrList<JabberResource> pool;
+ TQPtrList<JabberResource> lockList;
/**
* Pointer to the JabberAccount instance.
@@ -62,7 +62,7 @@ JabberResourcePool::~JabberResourcePool ()
delete d;
}
-void JabberResourcePool::slotResourceDestroyed (QObject *sender)
+void JabberResourcePool::slotResourceDestroyed (TQObject *sender)
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Resource has been destroyed, collecting the pieces." << endl;
@@ -74,7 +74,7 @@ void JabberResourcePool::slotResourceDestroyed (QObject *sender)
void JabberResourcePool::slotResourceUpdated ( JabberResource *resource )
{
- QPtrList<JabberBaseContact> list = d->account->contactPool()->findRelevantSources ( resource->jid () );
+ TQPtrList<JabberBaseContact> list = d->account->contactPool()->findRelevantSources ( resource->jid () );
for(JabberBaseContact *mContact = list.first (); mContact; mContact = list.next ())
{
@@ -91,7 +91,7 @@ void JabberResourcePool::slotResourceUpdated ( JabberResource *resource )
void JabberResourcePool::notifyRelevantContacts ( const XMPP::Jid &jid )
{
- QPtrList<JabberBaseContact> list = d->account->contactPool()->findRelevantSources ( jid );
+ TQPtrList<JabberBaseContact> list = d->account->contactPool()->findRelevantSources ( jid );
for(JabberBaseContact *mContact = list.first (); mContact; mContact = list.next ())
{
@@ -133,8 +133,8 @@ void JabberResourcePool::addResource ( const XMPP::Jid &jid, const XMPP::Resourc
// create new resource instance and add it to the dictionary
JabberResource *newResource = new JabberResource(d->account, jid, resource);
- connect ( newResource, SIGNAL ( destroyed (QObject *) ), this, SLOT ( slotResourceDestroyed (QObject *) ) );
- connect ( newResource, SIGNAL ( updated (JabberResource *) ), this, SLOT ( slotResourceUpdated (JabberResource *) ) );
+ connect ( newResource, TQT_SIGNAL ( destroyed (TQObject *) ), this, TQT_SLOT ( slotResourceDestroyed (TQObject *) ) );
+ connect ( newResource, TQT_SIGNAL ( updated (JabberResource *) ), this, TQT_SLOT ( slotResourceUpdated (JabberResource *) ) );
d->pool.append ( newResource );
// send notifications out to the relevant contacts that
@@ -189,7 +189,7 @@ void JabberResourcePool::clear ()
* and then notify all JIDs after the resources have been deleted.
*/
- QStringList jidList;
+ TQStringList jidList;
for ( JabberResource *mResource = d->pool.first (); mResource; mResource = d->pool.next () )
{
@@ -206,7 +206,7 @@ void JabberResourcePool::clear ()
* Now go through the list of JIDs and notify each contact
* of its status change
*/
- for ( QStringList::Iterator it = jidList.begin (); it != jidList.end (); ++it )
+ for ( TQStringList::Iterator it = jidList.begin (); it != jidList.end (); ++it )
{
notifyRelevantContacts ( XMPP::Jid ( *it ) );
}
diff --git a/kopete/protocols/jabber/jabberresourcepool.h b/kopete/protocols/jabber/jabberresourcepool.h
index a6cefcde..7378cbe0 100644
--- a/kopete/protocols/jabber/jabberresourcepool.h
+++ b/kopete/protocols/jabber/jabberresourcepool.h
@@ -19,7 +19,7 @@
#ifndef JABBERRESOURCEPOOL_H
#define JABBERRESOURCEPOOL_H
-#include <qobject.h>
+#include <tqobject.h>
#include <im.h>
class JabberResource;
@@ -35,7 +35,7 @@ class JabberResourcePool : public QObject
public:
static XMPP::Resource EmptyResource;
- typedef QPtrList<JabberResource> ResourceList;
+ typedef TQPtrList<JabberResource> ResourceList;
/**
* Default constructor
@@ -118,7 +118,7 @@ public:
void findResources ( const XMPP::Jid &jid, XMPP::ResourceList &resourceList );
private slots:
- void slotResourceDestroyed ( QObject *sender );
+ void slotResourceDestroyed ( TQObject *sender );
void slotResourceUpdated ( JabberResource *resource );
private:
diff --git a/kopete/protocols/jabber/jabbertransport.cpp b/kopete/protocols/jabber/jabbertransport.cpp
index e7a8e7d3..26d16b28 100644
--- a/kopete/protocols/jabber/jabbertransport.cpp
+++ b/kopete/protocols/jabber/jabbertransport.cpp
@@ -29,8 +29,8 @@
#include <kopeteversion.h>
-#include <qpixmap.h>
-#include <qtimer.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
#include <kaction.h>
#include <kdebug.h>
#include <klocale.h>
@@ -38,7 +38,7 @@
#include "xmpp_tasks.h"
-JabberTransport::JabberTransport (JabberAccount * parentAccount, const XMPP::RosterItem & item, const QString& gateway_type)
+JabberTransport::JabberTransport (JabberAccount * parentAccount, const XMPP::RosterItem & item, const TQString& gateway_type)
: Kopete::Account ( parentAccount->protocol(), parentAccount->accountId()+"/"+ item.jid().bare() )
{
m_status=Creating;
@@ -53,7 +53,7 @@ JabberTransport::JabberTransport (JabberAccount * parentAccount, const XMPP::Ros
setColor( account()->color() );
#if KOPETE_IS_VERSION(0,11,51) //setCustomIcon is new in kopete 0.12
- QString cIcon;
+ TQString cIcon;
if(gateway_type=="msn")
cIcon="jabber_gateway_msn";
else if(gateway_type=="icq")
@@ -83,18 +83,18 @@ JabberTransport::JabberTransport (JabberAccount * parentAccount, const XMPP::Ros
configGroup()->writeEntry("GatewayJID" , item.jid().full() );
- QTimer::singleShot(0, this, SLOT(eatContacts()));
+ TQTimer::singleShot(0, this, TQT_SLOT(eatContacts()));
m_status=Normal;
}
-JabberTransport::JabberTransport( JabberAccount * parentAccount, const QString & _accountId )
+JabberTransport::JabberTransport( JabberAccount * parentAccount, const TQString & _accountId )
: Kopete::Account ( parentAccount->protocol(), _accountId )
{
m_status=Creating;
m_account = parentAccount;
- const QString contactJID_s = configGroup()->readEntry("GatewayJID");
+ const TQString contactJID_s = configGroup()->readEntry("GatewayJID");
if(contactJID_s.isEmpty())
{
@@ -124,13 +124,13 @@ JabberTransport::~JabberTransport ()
KActionMenu *JabberTransport::actionMenu ()
{
KActionMenu *menu = new KActionMenu( accountId(), myself()->onlineStatus().iconFor( this ), this );
- QString nick = myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString();
+ TQString nick = myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString();
menu->popupMenu()->insertTitle( myself()->onlineStatus().iconFor( myself() ),
nick.isNull() ? accountLabel() : i18n( "%2 <%1>" ).arg( accountLabel(), nick )
);
- QPtrList<KAction> *customActions = myself()->customContextMenuActions( );
+ TQPtrList<KAction> *customActions = myself()->customContextMenuActions( );
if( customActions && !customActions->isEmpty() )
{
menu->popupMenu()->insertSeparator();
@@ -147,28 +147,28 @@ KActionMenu *JabberTransport::actionMenu ()
m_actionMenu->popupMenu()->insertSeparator();
m_actionMenu->insert(new KAction (i18n ("Join Groupchat..."), "jabber_group", 0,
- this, SLOT (slotJoinNewChat ()), this, "actionJoinChat"));
+ this, TQT_SLOT (slotJoinNewChat ()), this, "actionJoinChat"));
m_actionMenu->popupMenu()->insertSeparator();
m_actionMenu->insert ( new KAction ( i18n ("Services..."), "jabber_serv_on", 0,
- this, SLOT ( slotGetServices () ), this, "actionJabberServices") );
+ this, TQT_SLOT ( slotGetServices () ), this, "actionJabberServices") );
m_actionMenu->insert ( new KAction ( i18n ("Send Raw Packet to Server..."), "mail_new", 0,
- this, SLOT ( slotSendRaw () ), this, "actionJabberSendRaw") );
+ this, TQT_SLOT ( slotSendRaw () ), this, "actionJabberSendRaw") );
m_actionMenu->insert ( new KAction ( i18n ("Edit User Info..."), "identity", 0,
- this, SLOT ( slotEditVCard () ), this, "actionEditVCard") );
+ this, TQT_SLOT ( slotEditVCard () ), this, "actionEditVCard") );
return m_actionMenu;*/
}
-bool JabberTransport::createContact (const QString & contactId, Kopete::MetaContact * metaContact)
+bool JabberTransport::createContact (const TQString & contactId, Kopete::MetaContact * metaContact)
{
#if 0 //TODO
// collect all group names
- QStringList groupNames;
+ TQStringList groupNames;
Kopete::GroupList groupList = metaContact->groups();
for(Kopete::Group *group = groupList.first(); group; group = groupList.next())
groupNames += group->displayName();
@@ -188,7 +188,7 @@ bool JabberTransport::createContact (const QString & contactId, Kopete::MetaCon
}
-void JabberTransport::setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason)
+void JabberTransport::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason)
{
#if 0
if( status.status() == Kopete::OnlineStatus::Offline )
@@ -263,7 +263,7 @@ bool JabberTransport::removeAccount( )
m_status = Removing;
XMPP::JT_Register *task = new XMPP::JT_Register ( m_account->client()->rootTask () );
- QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( removeAllContacts() ) );
+ TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( removeAllContacts() ) );
//JabberContact *my=static_cast<JabberContact*>(myself());
task->unreg ( myself()->contactId() );
@@ -282,7 +282,7 @@ void JabberTransport::removeAllContacts( )
*/ //we don't really care, we remove everithing anyway.
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "delete all contacts of the transport"<< endl;
- QDictIterator<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> it( contacts() );
for( ; it.current(); ++it )
{
XMPP::JT_Roster * rosterTask = new XMPP::JT_Roster ( account()->client()->rootTask () );
@@ -293,11 +293,11 @@ void JabberTransport::removeAllContacts( )
Kopete::AccountManager::self()->removeAccount( this ); //this will delete this
}
-QString JabberTransport::legacyId( const XMPP::Jid & jid )
+TQString JabberTransport::legacyId( const XMPP::Jid & jid )
{
if(jid.node().isEmpty())
- return QString();
- QString node = jid.node();
+ return TQString();
+ TQString node = jid.node();
return node.replace("%","@");
}
@@ -319,8 +319,8 @@ void JabberTransport::eatContacts( )
* - Olivier 2006-01-17 -
*/
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << endl;
- QDict<Kopete::Contact> cts=account()->contacts();
- QDictIterator<Kopete::Contact> it( cts );
+ TQDict<Kopete::Contact> cts=account()->contacts();
+ TQDictIterator<Kopete::Contact> it( cts );
for( ; it.current(); ++it )
{
JabberContact *contact=dynamic_cast<JabberContact*>(it.current());
diff --git a/kopete/protocols/jabber/jabbertransport.h b/kopete/protocols/jabber/jabbertransport.h
index b26fd9c0..605f5cc4 100644
--- a/kopete/protocols/jabber/jabbertransport.h
+++ b/kopete/protocols/jabber/jabbertransport.h
@@ -48,14 +48,14 @@ public:
* @param item is the roster item of the gateway
* @param gateway_type eg: "msn" or "icq" only used when the account is not loaded from config file for determining the icon
*/
- JabberTransport (JabberAccount * parentAccount, const XMPP::RosterItem &item, const QString& gateway_type=QString());
+ JabberTransport (JabberAccount * parentAccount, const XMPP::RosterItem &item, const TQString& gateway_type=TQString());
/**
* constructor called when the transport is loaded from config
* @param parentAccount is the parent jabber account.
* @param accountId is the accountId
*/
- JabberTransport (JabberAccount * parentAccount, const QString &accountId );
+ JabberTransport (JabberAccount * parentAccount, const TQString &accountId );
~JabberTransport ();
@@ -86,12 +86,12 @@ public:
* return the legacyId conrresponding to the jid
* example: jhon%msn.com@msn.foojabber.org -> jhon@msn.com
*/
- QString legacyId( const XMPP::Jid &jid );
+ TQString legacyId( const XMPP::Jid &jid );
public slots:
/* Reimplemented from Kopete::Account */
- void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null);
+ void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null);
/**
* the account has been unregistered.
@@ -127,7 +127,7 @@ protected:
* @param contactId The unique ID for this protocol
* @param parentContact The metacontact to add this contact to
*/
- virtual bool createContact (const QString & contactID, Kopete::MetaContact * parentContact);
+ virtual bool createContact (const TQString & contactID, Kopete::MetaContact * parentContact);
private:
JabberAccount *m_account;
diff --git a/kopete/protocols/jabber/jingle/jinglesession.cpp b/kopete/protocols/jabber/jingle/jinglesession.cpp
index 6c370fca..9bebb3b8 100644
--- a/kopete/protocols/jabber/jingle/jinglesession.cpp
+++ b/kopete/protocols/jabber/jingle/jinglesession.cpp
@@ -34,7 +34,7 @@ public:
};
JingleSession::JingleSession(JabberAccount *account, const JidList &peers)
- : QObject(account, 0), d(new Private(account, peers))
+ : TQObject(account, 0), d(new Private(account, peers))
{
d->myself = account->client()->jid();
}
@@ -64,7 +64,7 @@ JabberAccount *JingleSession::account()
return d->account;
}
-void JingleSession::sendStanza(const QString &stanza)
+void JingleSession::sendStanza(const TQString &stanza)
{
account()->client()->send( stanza );
}
diff --git a/kopete/protocols/jabber/jingle/jinglesession.h b/kopete/protocols/jabber/jingle/jinglesession.h
index 00c192bd..a9d73440 100644
--- a/kopete/protocols/jabber/jingle/jinglesession.h
+++ b/kopete/protocols/jabber/jingle/jinglesession.h
@@ -17,11 +17,11 @@
#ifndef JINGLESESSION_H
#define JINGLESESSION_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <xmpp.h> // XMPP::Jid
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class JabberAccount;
/**
@@ -33,7 +33,7 @@ class JingleSession : public QObject
{
Q_OBJECT
public:
- typedef QValueList<XMPP::Jid> JidList;
+ typedef TQValueList<XMPP::Jid> JidList;
JingleSession(JabberAccount *account, const JidList &peers);
virtual ~JingleSession();
@@ -52,7 +52,7 @@ public:
* Note that you must return the XML namespace that define
* the session: ex:(http://jabber.org/protocol/jingle/sessions/audio)
*/
- virtual QString sessionType() = 0;
+ virtual TQString sessionType() = 0;
public slots:
/**
@@ -74,7 +74,7 @@ public slots:
virtual void terminate() = 0;
protected slots:
- void sendStanza(const QString &stanza);
+ void sendStanza(const TQString &stanza);
signals:
/**
diff --git a/kopete/protocols/jabber/jingle/jinglesessionmanager.cpp b/kopete/protocols/jabber/jingle/jinglesessionmanager.cpp
index aeec2889..54fc7274 100644
--- a/kopete/protocols/jabber/jingle/jinglesessionmanager.cpp
+++ b/kopete/protocols/jabber/jingle/jinglesessionmanager.cpp
@@ -90,7 +90,7 @@ public:
}
JabberAccount *account;
- QValueList<JingleSession*> sessionList;
+ TQValueList<JingleSession*> sessionList;
JingleWatchSessionTask *watchSessionTask;
cricket::NetworkManager *networkManager;
@@ -101,18 +101,18 @@ public:
//END JingleSessionManager::Private
JingleSessionManager::JingleSessionManager(JabberAccount *account)
- : QObject(account, 0), d(new Private(account))
+ : TQObject(account, 0), d(new Private(account))
{
// Create slots proxy for libjingle
slotsProxy = new SlotsProxy(this);
// Create watch incoming session task.
d->watchSessionTask = new JingleWatchSessionTask(account->client()->rootTask());
- connect(d->watchSessionTask, SIGNAL(watchSession(const QString &, const QString &)), this, SLOT(slotIncomingSession(const QString &, const QString &)));
+ connect(d->watchSessionTask, TQT_SIGNAL(watchSession(const TQString &, const TQString &)), this, TQT_SLOT(slotIncomingSession(const TQString &, const TQString &)));
// Create global cricket variables common to all sessions.
// Seed random generation with the JID of the account.
- QString accountJid = account->client()->jid().full();
+ TQString accountJid = account->client()->jid().full();
cricket::InitRandom( accountJid.ascii(), accountJid.length() );
// Create the libjingle NetworkManager that manager local network connections
@@ -137,7 +137,7 @@ JingleSessionManager::~JingleSessionManager()
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << endl;
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Cleaning up Jingle sessions." << endl;
- QValueList<JingleSession*>::Iterator it, itEnd = d->sessionList.end();
+ TQValueList<JingleSession*>::Iterator it, itEnd = d->sessionList.end();
for(it = d->sessionList.begin(); it != itEnd; ++it)
{
JingleSession *deletedSession = *it;
@@ -162,7 +162,7 @@ JabberAccount *JingleSessionManager::account()
return d->account;
}
-JingleSession *JingleSessionManager::createSession(const QString &sessionType, const JidList &peers)
+JingleSession *JingleSessionManager::createSession(const TQString &sessionType, const JidList &peers)
{
JingleSession *newSession = 0L;
@@ -178,7 +178,7 @@ JingleSession *JingleSessionManager::createSession(const QString &sessionType, c
return newSession;
}
-JingleSession *JingleSessionManager::createSession(const QString &sessionType, const XMPP::Jid &user)
+JingleSession *JingleSessionManager::createSession(const TQString &sessionType, const XMPP::Jid &user)
{
JingleSessionManager::JidList jidList;
jidList.append(user);
@@ -194,7 +194,7 @@ void JingleSessionManager::removeSession(JingleSession *session)
delete session;
}
-void JingleSessionManager::slotIncomingSession(const QString &sessionType, const QString &initiator)
+void JingleSessionManager::slotIncomingSession(const TQString &sessionType, const TQString &initiator)
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Incoming session: " << sessionType << ". Initiator: " << initiator << endl;
diff --git a/kopete/protocols/jabber/jingle/jinglesessionmanager.h b/kopete/protocols/jabber/jingle/jinglesessionmanager.h
index 06951c2f..f9bb82b9 100644
--- a/kopete/protocols/jabber/jingle/jinglesessionmanager.h
+++ b/kopete/protocols/jabber/jingle/jinglesessionmanager.h
@@ -20,8 +20,8 @@
#include <xmpp.h>
#include <im.h>
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
namespace cricket
{
@@ -40,7 +40,7 @@ class JingleSessionManager : public QObject
{
Q_OBJECT
public:
- typedef QValueList<XMPP::Jid> JidList;
+ typedef TQValueList<XMPP::Jid> JidList;
JingleSessionManager(JabberAccount *account);
~JingleSessionManager();
@@ -61,22 +61,22 @@ public slots:
* @param sessionType the session you want to create. You must pass its XML namespace(ex: http://jabber.org/protocol/sessions/audio)
* @param peers Lists of participants of the session.
*/
- JingleSession *createSession(const QString &sessionType, const JidList &peers);
+ JingleSession *createSession(const TQString &sessionType, const JidList &peers);
/**
* Override method that create a session for a one-to-one session.
* It behave like createSession method.
* @param sessionType the sesion you want to create. You must pass its XML namespace(ex: http://jabber.org/protocol/sessions/audio)
* @param user The JID of the user you want to begin a session with.
*/
- JingleSession *createSession(const QString &sessionType, const XMPP::Jid &user);
+ JingleSession *createSession(const TQString &sessionType, const XMPP::Jid &user);
void removeSession(JingleSession *session);
signals:
- void incomingSession(const QString &sessionType, JingleSession *session);
+ void incomingSession(const TQString &sessionType, JingleSession *session);
private slots:
- void slotIncomingSession(const QString &sessionType, const QString &initiator);
+ void slotIncomingSession(const TQString &sessionType, const TQString &initiator);
private:
class Private;
diff --git a/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp b/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp
index 3ad6a89a..dd809cea 100644
--- a/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp
+++ b/kopete/protocols/jabber/jingle/jinglevoicecaller.cpp
@@ -20,8 +20,8 @@
-#include <qstring.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqdom.h>
@@ -47,7 +47,7 @@ public:
JingleIQResponder(XMPP::Task *);
~JingleIQResponder();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
};
/**
@@ -63,14 +63,14 @@ JingleIQResponder::~JingleIQResponder()
{
}
-bool JingleIQResponder::take(const QDomElement &e)
+bool JingleIQResponder::take(const TQDomElement &e)
{
if(e.tagName() != "iq")
return false;
- QDomElement first = e.firstChild().toElement();
+ TQDomElement first = e.firstChild().toElement();
if (!first.isNull() && first.attribute("xmlns") == JINGLE_NS) {
- QDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
+ TQDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
send(iq);
return true;
}
@@ -114,7 +114,7 @@ void JingleClientSlots::callDestroyed(cricket::Call *call)
qDebug("JingleClientSlots: Call destroyed");
Jid jid(call->sessions()[0]->remote_address().c_str());
if (voiceCaller_->calling(jid)) {
- qDebug(QString("Removing unterminated call to %1").arg(jid.full()));
+ qDebug(TQString("Removing unterminated call to %1").arg(jid.full()));
voiceCaller_->removeCall(jid);
emit voiceCaller_->terminated(jid);
}
@@ -122,7 +122,7 @@ void JingleClientSlots::callDestroyed(cricket::Call *call)
void JingleClientSlots::sendStanza(cricket::SessionClient*, const buzz::XmlElement *stanza)
{
- QString st(stanza->Str().c_str());
+ TQString st(stanza->Str().c_str());
st.replace("cli:iq","iq");
st.replace(":cli=","=");
fprintf(stderr,"bling\n");
@@ -138,7 +138,7 @@ void JingleClientSlots::requestSignaling()
void JingleClientSlots::stateChanged(cricket::Call *call, cricket::Session *session, cricket::Session::State state)
{
- qDebug(QString("jinglevoicecaller.cpp: State changed (%1)").arg(state));
+ qDebug(TQString("jinglevoicecaller.cpp: State changed (%1)").arg(state));
// Why is c_str() stuff needed to make it compile on OS X ?
Jid jid(session->remote_address().c_str());
@@ -156,7 +156,7 @@ void JingleClientSlots::stateChanged(cricket::Call *call, cricket::Session *sess
}
else if (state == cricket::Session::STATE_SENTMODIFY) { }
else if (state == cricket::Session::STATE_RECEIVEDMODIFY) {
- qWarning(QString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full()));
+ qWarning(TQString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full()));
}
else if (state == cricket::Session::STATE_SENTREJECT) { }
else if (state == cricket::Session::STATE_RECEIVEDREJECT) {
@@ -194,8 +194,8 @@ void JingleVoiceCaller::initialize()
if (initialized_)
return;
- QString jid = ((ClientStream&) account()->client()->client()->stream()).jid().full();
- qDebug(QString("jinglevoicecaller.cpp: Creating new caller for %1").arg(jid));
+ TQString jid = ((ClientStream&) account()->client()->client()->stream()).jid().full();
+ qDebug(TQString("jinglevoicecaller.cpp: Creating new caller for %1").arg(jid));
if (jid.isEmpty()) {
qWarning("jinglevoicecaller.cpp: Empty JID");
return;
@@ -233,7 +233,7 @@ void JingleVoiceCaller::initialize()
new JingleIQResponder(account()->client()->rootTask());
// Listen to incoming packets
- connect(account()->client()->client(),SIGNAL(xmlIncoming(const QString&)),SLOT(receiveStanza(const QString&)));
+ connect(account()->client()->client(),TQT_SIGNAL(xmlIncoming(const TQString&)),TQT_SLOT(receiveStanza(const TQString&)));
initialized_ = true;
}
@@ -245,7 +245,7 @@ void JingleVoiceCaller::deinitialize()
return;
// Stop listening to incoming packets
- disconnect(account()->client(),SIGNAL(xmlIncoming(const QString&)),this,SLOT(receiveStanza(const QString&)));
+ disconnect(account()->client(),TQT_SIGNAL(xmlIncoming(const TQString&)),this,TQT_SLOT(receiveStanza(const TQString&)));
// Disconnect signals (is this needed)
//phone_client_->SignalCallCreate.disconnect(slots_);
@@ -271,7 +271,7 @@ bool JingleVoiceCaller::calling(const Jid& jid)
void JingleVoiceCaller::call(const Jid& jid)
{
- qDebug(QString("jinglevoicecaller.cpp: Calling %1").arg(jid.full()));
+ qDebug(TQString("jinglevoicecaller.cpp: Calling %1").arg(jid.full()));
cricket::Call *c = ((cricket::PhoneSessionClient*)(phone_client_))->CreateCall();
c->InitiateSession(buzz::Jid(jid.full().ascii()));
phone_client_->SetFocus(c);
@@ -299,7 +299,7 @@ void JingleVoiceCaller::reject(const Jid& j)
void JingleVoiceCaller::terminate(const Jid& j)
{
- qDebug(QString("jinglevoicecaller.cpp: Terminating call to %1").arg(j.full()));
+ qDebug(TQString("jinglevoicecaller.cpp: Terminating call to %1").arg(j.full()));
cricket::Call* call = calls_[j.full()];
if (call != NULL) {
call->Terminate();
@@ -309,7 +309,7 @@ void JingleVoiceCaller::terminate(const Jid& j)
void JingleVoiceCaller::sendStanza(const char* stanza)
{
- account()->client()->send(QString(stanza));
+ account()->client()->send(TQString(stanza));
}
void JingleVoiceCaller::registerCall(const Jid& jid, cricket::Call* call)
@@ -327,19 +327,19 @@ void JingleVoiceCaller::registerCall(const Jid& jid, cricket::Call* call)
void JingleVoiceCaller::removeCall(const Jid& j)
{
- qDebug(QString("JingleVoiceCaller: Removing call to %1").arg(j.full()));
+ qDebug(TQString("JingleVoiceCaller: Removing call to %1").arg(j.full()));
calls_.remove(j.full());
}
-void JingleVoiceCaller::receiveStanza(const QString& stanza)
+void JingleVoiceCaller::receiveStanza(const TQString& stanza)
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(stanza);
// Check if it is offline presence from an open chat
if (doc.documentElement().tagName() == "presence") {
Jid from = Jid(doc.documentElement().attribute("from"));
- QString type = doc.documentElement().attribute("type");
+ TQString type = doc.documentElement().attribute("type");
if (type == "unavailable" && calls_.contains(from.full())) {
qDebug("JingleVoiceCaller: User went offline without closing a call.");
removeCall(from);
@@ -351,10 +351,10 @@ void JingleVoiceCaller::receiveStanza(const QString& stanza)
// Check if the packet is destined for libjingle.
// We could use Session::IsClientStanza to check this, but this one crashes
// for some reason.
- QDomNode n = doc.documentElement().firstChild();
+ TQDomNode n = doc.documentElement().firstChild();
bool ok = false;
while (!n.isNull() && !ok) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (!e.isNull() && e.attribute("xmlns") == JINGLE_NS) {
ok = true;
}
@@ -363,7 +363,7 @@ void JingleVoiceCaller::receiveStanza(const QString& stanza)
// Spread the word
if (ok) {
- qDebug(QString("jinglevoicecaller.cpp: Handing down %1").arg(stanza));
+ qDebug(TQString("jinglevoicecaller.cpp: Handing down %1").arg(stanza));
buzz::XmlElement *e = buzz::XmlElement::ForStr(stanza.ascii());
phone_client_->OnIncomingStanza(e);
}
diff --git a/kopete/protocols/jabber/jingle/jinglevoicecaller.h b/kopete/protocols/jabber/jingle/jinglevoicecaller.h
index 4448d530..50070289 100644
--- a/kopete/protocols/jabber/jingle/jinglevoicecaller.h
+++ b/kopete/protocols/jabber/jingle/jinglevoicecaller.h
@@ -3,7 +3,7 @@
#ifndef JINGLEVOICECALLER_H
#define JINGLEVOICECALLER_H
-#include <qmap.h>
+#include <tqmap.h>
#include "im.h"
#include "voicecaller.h"
@@ -54,7 +54,7 @@ protected:
void removeCall(const Jid&);
protected slots:
- void receiveStanza(const QString&);
+ void receiveStanza(const TQString&);
private:
bool initialized_;
@@ -66,7 +66,7 @@ private:
cricket::SessionManager *session_manager_;
cricket::PhoneSessionClient *phone_client_;
JingleClientSlots *slots_;
- QMap<QString,cricket::Call*> calls_;
+ TQMap<TQString,cricket::Call*> calls_;
};
#endif
diff --git a/kopete/protocols/jabber/jingle/jinglevoicesession.cpp b/kopete/protocols/jabber/jingle/jinglevoicesession.cpp
index 09019ce4..91fa1a77 100644
--- a/kopete/protocols/jabber/jingle/jinglevoicesession.cpp
+++ b/kopete/protocols/jabber/jingle/jinglevoicesession.cpp
@@ -39,7 +39,7 @@
#include "jinglesessionmanager.h"
// Qt includes
-#include <qdom.h>
+#include <tqdom.h>
// KDE includes
#include <kdebug.h>
@@ -115,7 +115,7 @@ public:
{}
else if (state == cricket::Session::STATE_RECEIVEDMODIFY)
{
- //qWarning(QString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full()));
+ //qWarning(TQString("jinglevoicecaller.cpp: RECEIVEDMODIFY not implemented yet (was from %1)").arg(jid.full()));
}
else if (state == cricket::Session::STATE_SENTREJECT)
{}
@@ -141,7 +141,7 @@ public:
void OnSendingStanza(cricket::SessionClient*, const buzz::XmlElement *buzzStanza)
{
- QString irisStanza(buzzStanza->Str().c_str());
+ TQString irisStanza(buzzStanza->Str().c_str());
irisStanza.replace("cli:iq","iq");
irisStanza.replace(":cli=","=");
@@ -159,7 +159,7 @@ public:
JingleIQResponder(XMPP::Task *);
~JingleIQResponder();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
};
/**
@@ -175,14 +175,14 @@ JingleVoiceSession::JingleIQResponder::~JingleIQResponder()
{
}
-bool JingleVoiceSession::JingleIQResponder::take(const QDomElement &e)
+bool JingleVoiceSession::JingleIQResponder::take(const TQDomElement &e)
{
if(e.tagName() != "iq")
return false;
- QDomElement first = e.firstChild().toElement();
+ TQDomElement first = e.firstChild().toElement();
if (!first.isNull() && first.attribute("xmlns") == JINGLE_NS) {
- QDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
+ TQDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
send(iq);
return true;
}
@@ -224,7 +224,7 @@ JingleVoiceSession::JingleVoiceSession(JabberAccount *account, const JidList &pe
d->phoneSessionClient->SignalCallCreate.connect(slotsProxy, &JingleVoiceSession::SlotsProxy::OnCallCreated);
// Listen to incoming packets
- connect(account->client()->client(), SIGNAL(xmlIncoming(const QString&)), this, SLOT(receiveStanza(const QString&)));
+ connect(account->client()->client(), TQT_SIGNAL(xmlIncoming(const TQString&)), this, TQT_SLOT(receiveStanza(const TQString&)));
new JingleIQResponder(account->client()->rootTask());
}
@@ -236,9 +236,9 @@ JingleVoiceSession::~JingleVoiceSession()
delete d;
}
-QString JingleVoiceSession::sessionType()
+TQString JingleVoiceSession::sessionType()
{
- return QString(JINGLE_VOICE_SESSION_NS);
+ return TQString(JINGLE_VOICE_SESSION_NS);
}
void JingleVoiceSession::start()
@@ -246,7 +246,7 @@ void JingleVoiceSession::start()
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Starting a voice session..." << endl;
d->currentCall = d->phoneSessionClient->CreateCall();
- QString firstPeerJid = ((XMPP::Jid)peers().first()).full();
+ TQString firstPeerJid = ((XMPP::Jid)peers().first()).full();
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "With peer: " << firstPeerJid << endl;
d->currentCall->InitiateSession( buzz::Jid(firstPeerJid.ascii()) );
@@ -287,16 +287,16 @@ void JingleVoiceSession::setCall(cricket::Call *call)
d->phoneSessionClient->SetFocus(d->currentCall);
}
-void JingleVoiceSession::receiveStanza(const QString &stanza)
+void JingleVoiceSession::receiveStanza(const TQString &stanza)
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(stanza);
// Check if it is offline presence from an open chat
if( doc.documentElement().tagName() == "presence" )
{
XMPP::Jid from = XMPP::Jid(doc.documentElement().attribute("from"));
- QString type = doc.documentElement().attribute("type");
+ TQString type = doc.documentElement().attribute("type");
if( type == "unavailable" && hasPeer(peers(), from) )
{
//qDebug("JingleVoiceCaller: User went offline without closing a call.");
@@ -309,11 +309,11 @@ void JingleVoiceSession::receiveStanza(const QString &stanza)
// Check if the packet is destined for libjingle.
// We could use Session::IsClientStanza to check this, but this one crashes
// for some reason.
- QDomNode node = doc.documentElement().firstChild();
+ TQDomNode node = doc.documentElement().firstChild();
bool ok = false;
while( !node.isNull() && !ok )
{
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() && element.attribute("xmlns") == JINGLE_NS)
{
ok = true;
diff --git a/kopete/protocols/jabber/jingle/jinglevoicesession.h b/kopete/protocols/jabber/jingle/jinglevoicesession.h
index e70d3b54..2769d351 100644
--- a/kopete/protocols/jabber/jingle/jinglevoicesession.h
+++ b/kopete/protocols/jabber/jingle/jinglevoicesession.h
@@ -20,7 +20,7 @@
#include <jinglesession.h>
#include <xmpp.h> // XMPP::Jid
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
namespace cricket
{
@@ -39,12 +39,12 @@ class JingleVoiceSession : public JingleSession
{
Q_OBJECT
public:
- typedef QValueList<XMPP::Jid> JidList;
+ typedef TQValueList<XMPP::Jid> JidList;
JingleVoiceSession(JabberAccount *account, const JidList &peers);
virtual ~JingleVoiceSession();
- virtual QString sessionType();
+ virtual TQString sessionType();
public slots:
virtual void accept();
@@ -53,7 +53,7 @@ public slots:
virtual void terminate();
protected slots:
- void receiveStanza(const QString &stanza);
+ void receiveStanza(const TQString &stanza);
private:
void setCall(cricket::Call *call);
diff --git a/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp b/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp
index 9fb61274..b017cdfd 100644
--- a/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp
+++ b/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.cpp
@@ -17,9 +17,9 @@
#include "jinglevoicesessiondialog.h"
// Qt includes
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
// Jingle includes
// #include "jinglevoicesession.h"
@@ -40,27 +40,27 @@
using namespace XMPP;
-JingleVoiceSessionDialog::JingleVoiceSessionDialog(const Jid &peerJid, VoiceCaller *caller, QWidget *parent, const char *name)
+JingleVoiceSessionDialog::JingleVoiceSessionDialog(const Jid &peerJid, VoiceCaller *caller, TQWidget *parent, const char *name)
: JingleVoiceSessionDialogBase(parent, name), m_session(caller), m_peerJid(peerJid), m_sessionState(Incoming)
{
- QString contactJid = m_peerJid.full();
+ TQString contactJid = m_peerJid.full();
setCaption( i18n("Voice session with %1").arg(contactJid) );
- connect(buttonAccept, SIGNAL(clicked()), this, SLOT(slotAcceptClicked()));
- connect(buttonDecline, SIGNAL(clicked()), this, SLOT(slotDeclineClicked()));
- connect(buttonTerminate, SIGNAL(clicked()), this, SLOT(slotTerminateClicked()));
+ connect(buttonAccept, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAcceptClicked()));
+ connect(buttonDecline, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeclineClicked()));
+ connect(buttonTerminate, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotTerminateClicked()));
// NOTE: Disabled for 0.12
#if 0
- connect(m_session, SIGNAL(sessionStarted()), this, SLOT(sessionStarted()));
- connect(m_session, SIGNAL(accepted()), this, SLOT(sessionAccepted()));
- connect(m_session, SIGNAL(declined()), this, SLOT(sessionDeclined()));
- connect(m_session, SIGNAL(terminated()), this, SLOT(sessionTerminated()));
+ connect(m_session, TQT_SIGNAL(sessionStarted()), this, TQT_SLOT(sessionStarted()));
+ connect(m_session, TQT_SIGNAL(accepted()), this, TQT_SLOT(sessionAccepted()));
+ connect(m_session, TQT_SIGNAL(declined()), this, TQT_SLOT(sessionDeclined()));
+ connect(m_session, TQT_SIGNAL(terminated()), this, TQT_SLOT(sessionTerminated()));
#endif
- connect(m_session, SIGNAL(accepted( const Jid & )), this, SLOT( sessionAccepted(const Jid &) ));
- connect(m_session, SIGNAL(in_progress( const Jid & )), this, SLOT( sessionStarted(const Jid &) ));
- connect(m_session, SIGNAL(rejected( const Jid& )), this, SLOT( sessionDeclined(const Jid &) ));
- connect(m_session, SIGNAL(terminated( const Jid& )), this, SLOT( sessionTerminated(const Jid &) ));
+ connect(m_session, TQT_SIGNAL(accepted( const Jid & )), this, TQT_SLOT( sessionAccepted(const Jid &) ));
+ connect(m_session, TQT_SIGNAL(in_progress( const Jid & )), this, TQT_SLOT( sessionStarted(const Jid &) ));
+ connect(m_session, TQT_SIGNAL(rejected( const Jid& )), this, TQT_SLOT( sessionDeclined(const Jid &) ));
+ connect(m_session, TQT_SIGNAL(terminated( const Jid& )), this, TQT_SLOT( sessionTerminated(const Jid &) ));
// Find JabberContact for the peer and fill this dialog with contact information.
JabberContact *peerContact = static_cast<JabberContact*>( m_session->account()->contactPool()->findRelevantRecipient( m_peerJid ) );
@@ -84,12 +84,12 @@ void JingleVoiceSessionDialog::setContactInformation(JabberContact *contact)
if( contact->metaContact() )
{
labelDisplayName->setText( contact->metaContact()->displayName() );
- labelContactPhoto->setPixmap( QPixmap(contact->metaContact()->photo()) );
+ labelContactPhoto->setPixmap( TQPixmap(contact->metaContact()->photo()) );
}
else
{
labelDisplayName->setText( contact->nickName() );
- labelDisplayName->setPixmap( QPixmap(contact->property(Kopete::Global::Properties::self()->photo()).value().toString()) );
+ labelDisplayName->setPixmap( TQPixmap(contact->property(Kopete::Global::Properties::self()->photo()).value().toString()) );
}
}
@@ -194,15 +194,15 @@ void JingleVoiceSessionDialog::sessionTerminated(const Jid &jid)
void JingleVoiceSessionDialog::reject()
{
finalize();
- QDialog::reject();
+ TQDialog::reject();
}
void JingleVoiceSessionDialog::finalize()
{
- disconnect(m_session, SIGNAL(accepted( const Jid & )), this, SLOT( sessionAccepted(const Jid &) ));
- disconnect(m_session, SIGNAL(in_progress( const Jid & )), this, SLOT( sessionStarted(const Jid &) ));
- disconnect(m_session, SIGNAL(rejected( const Jid& )), this, SLOT( sessionDeclined(const Jid &) ));
- disconnect(m_session, SIGNAL(terminated( const Jid& )), this, SLOT( sessionTerminated(const Jid &) ));
+ disconnect(m_session, TQT_SIGNAL(accepted( const Jid & )), this, TQT_SLOT( sessionAccepted(const Jid &) ));
+ disconnect(m_session, TQT_SIGNAL(in_progress( const Jid & )), this, TQT_SLOT( sessionStarted(const Jid &) ));
+ disconnect(m_session, TQT_SIGNAL(rejected( const Jid& )), this, TQT_SLOT( sessionDeclined(const Jid &) ));
+ disconnect(m_session, TQT_SIGNAL(terminated( const Jid& )), this, TQT_SLOT( sessionTerminated(const Jid &) ));
}
#include "jinglevoicesessiondialog.moc"
diff --git a/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h b/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h
index 29d0c091..1a911bae 100644
--- a/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h
+++ b/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h
@@ -33,7 +33,7 @@ class JingleVoiceSessionDialog : public JingleVoiceSessionDialogBase
public:
enum SessionState { Incoming, Waiting, Accepted, Declined, Started, Terminated };
- JingleVoiceSessionDialog(const Jid &peerJid, VoiceCaller *caller, QWidget *parent = 0, const char *name = 0);
+ JingleVoiceSessionDialog(const Jid &peerJid, VoiceCaller *caller, TQWidget *parent = 0, const char *name = 0);
~JingleVoiceSessionDialog();
public slots:
diff --git a/kopete/protocols/jabber/jingle/jinglewatchsessiontask.cpp b/kopete/protocols/jabber/jingle/jinglewatchsessiontask.cpp
index fc7de053..571f9ff6 100644
--- a/kopete/protocols/jabber/jingle/jinglewatchsessiontask.cpp
+++ b/kopete/protocols/jabber/jingle/jinglewatchsessiontask.cpp
@@ -31,30 +31,30 @@ JingleWatchSessionTask::~JingleWatchSessionTask()
{}
//NOTE: This task watch for pre-JEP session.
-bool JingleWatchSessionTask::take(const QDomElement &element)
+bool JingleWatchSessionTask::take(const TQDomElement &element)
{
if(element.tagName() != "iq")
return false;
- QString sessionType, initiator;
+ TQString sessionType, initiator;
- QDomElement first = element.firstChild().toElement();
+ TQDomElement first = element.firstChild().toElement();
if( !first.isNull() && first.attribute("xmlns") == JINGLE_NS && first.tagName() == "session" )
{
kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Checking for incoming sesssion." << endl;
initiator = first.attribute("initiator");
// Only proceed initiate type Jingle XMPP call.
- if( first.attribute("type") != QString::fromUtf8("initiate") )
+ if( first.attribute("type") != TQString::fromUtf8("initiate") )
return false;
int nodeIndex;
- QDomNodeList nodeList = first.childNodes();
+ TQDomNodeList nodeList = first.childNodes();
// Do not check first child
for(nodeIndex = 0; nodeIndex < nodeList.length(); nodeIndex++)
{
- QDomElement nodeElement = nodeList.item(nodeIndex).toElement();
+ TQDomElement nodeElement = nodeList.item(nodeIndex).toElement();
if(nodeElement.tagName() == "description")
{
sessionType = nodeElement.attribute("xmlns");
diff --git a/kopete/protocols/jabber/jingle/jinglewatchsessiontask.h b/kopete/protocols/jabber/jingle/jinglewatchsessiontask.h
index 99b76661..09dbdbce 100644
--- a/kopete/protocols/jabber/jingle/jinglewatchsessiontask.h
+++ b/kopete/protocols/jabber/jingle/jinglewatchsessiontask.h
@@ -30,10 +30,10 @@ public:
JingleWatchSessionTask(XMPP::Task *parent);
~JingleWatchSessionTask();
- bool take(const QDomElement &element);
+ bool take(const TQDomElement &element);
signals:
- void watchSession(const QString &sessionType, const QString &initiator);
+ void watchSession(const TQString &sessionType, const TQString &initiator);
};
#endif
diff --git a/kopete/protocols/jabber/kioslave/jabberdisco.cpp b/kopete/protocols/jabber/kioslave/jabberdisco.cpp
index a6775320..4ceeca09 100644
--- a/kopete/protocols/jabber/kioslave/jabberdisco.cpp
+++ b/kopete/protocols/jabber/kioslave/jabberdisco.cpp
@@ -22,8 +22,8 @@
#include "jabberdisco.h"
#include <stdlib.h>
-#include <qcstring.h>
-#include <qthread.h>
+#include <tqcstring.h>
+#include <tqthread.h>
#include <kdebug.h>
#include <klocale.h>
#include <kapplication.h>
@@ -32,7 +32,7 @@
#include <xmpp_tasks.h>
#include "jabberclient.h"
-JabberDiscoProtocol::JabberDiscoProtocol ( const QCString &pool_socket, const QCString &app_socket )
+JabberDiscoProtocol::JabberDiscoProtocol ( const TQCString &pool_socket, const TQCString &app_socket )
: KIO::SlaveBase ( "kio_jabberdisco", pool_socket, app_socket )
{
kdDebug ( JABBER_DISCO_DEBUG ) << k_funcinfo << "Slave launched." << endl;
@@ -51,13 +51,13 @@ JabberDiscoProtocol::~JabberDiscoProtocol ()
}
-void JabberDiscoProtocol::setHost ( const QString &host, int port, const QString &user, const QString &pass )
+void JabberDiscoProtocol::setHost ( const TQString &host, int port, const TQString &user, const TQString &pass )
{
kdDebug ( JABBER_DISCO_DEBUG ) << k_funcinfo << " Host " << host << ", port " << port << ", user " << user << endl;
m_host = host;
m_port = !port ? 5222 : port;
- m_user = QString(user).replace ( "%", "@" );
+ m_user = TQString(user).replace ( "%", "@" );
m_password = pass;
}
@@ -76,14 +76,14 @@ void JabberDiscoProtocol::openConnection ()
{
m_jabberClient = new JabberClient;
- QObject::connect ( m_jabberClient, SIGNAL ( csDisconnected () ), this, SLOT ( slotCSDisconnected () ) );
- QObject::connect ( m_jabberClient, SIGNAL ( csError ( int ) ), this, SLOT ( slotCSError ( int ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( tlsWarning ( int ) ), this, SLOT ( slotHandleTLSWarning ( int ) ) );
- QObject::connect ( m_jabberClient, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) );
- QObject::connect ( m_jabberClient, SIGNAL ( error ( JabberClient::ErrorCode ) ), this, SLOT ( slotClientError ( JabberClient::ErrorCode ) ) );
-
- QObject::connect ( m_jabberClient, SIGNAL ( debugMessage ( const QString & ) ),
- this, SLOT ( slotClientDebugMessage ( const QString & ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( csDisconnected () ), this, TQT_SLOT ( slotCSDisconnected () ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( csError ( int ) ), this, TQT_SLOT ( slotCSError ( int ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( tlsWarning ( int ) ), this, TQT_SLOT ( slotHandleTLSWarning ( int ) ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) );
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( error ( JabberClient::ErrorCode ) ), this, TQT_SLOT ( slotClientError ( JabberClient::ErrorCode ) ) );
+
+ TQObject::connect ( m_jabberClient, TQT_SIGNAL ( debugMessage ( const TQString & ) ),
+ this, TQT_SLOT ( slotClientDebugMessage ( const TQString & ) ) );
}
else
{
@@ -102,7 +102,7 @@ void JabberDiscoProtocol::openConnection ()
// allow plaintext password authentication or not?
m_jabberClient->setAllowPlainTextPassword ( false );
- switch ( m_jabberClient->connect ( XMPP::Jid ( m_user + QString("/") + "JabberBrowser" ), m_password ) )
+ switch ( m_jabberClient->connect ( XMPP::Jid ( m_user + TQString("/") + "JabberBrowser" ), m_password ) )
{
case JabberClient::NoTLS:
// no SSL support, at the connecting stage this means the problem is client-side
@@ -173,7 +173,7 @@ void JabberDiscoProtocol::mimetype ( const KURL &/*url*/ )
}
-void JabberDiscoProtocol::slotClientDebugMessage ( const QString &msg )
+void JabberDiscoProtocol::slotClientDebugMessage ( const TQString &msg )
{
kdDebug ( JABBER_DISCO_DEBUG ) << k_funcinfo << msg << endl;
@@ -228,7 +228,7 @@ void JabberDiscoProtocol::slotConnected ()
case ListDir: // list a directory
kdDebug ( JABBER_DISCO_DEBUG ) << k_funcinfo << "Listing directory..." << endl;
discoTask = new XMPP::JT_DiscoItems ( m_jabberClient->rootTask () );
- connect ( discoTask, SIGNAL ( finished () ), this, SLOT ( slotQueryFinished () ) );
+ connect ( discoTask, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotQueryFinished () ) );
discoTask->get ( m_host );
discoTask->go ( true );
break;
diff --git a/kopete/protocols/jabber/kioslave/jabberdisco.h b/kopete/protocols/jabber/kioslave/jabberdisco.h
index f2f6d78d..ef6e75fa 100644
--- a/kopete/protocols/jabber/kioslave/jabberdisco.h
+++ b/kopete/protocols/jabber/kioslave/jabberdisco.h
@@ -20,9 +20,9 @@
#ifndef _JABBERDISCO_H_
#define _JABBERDISCO_H_
-#include <qobject.h>
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include <kurl.h>
#include <kio/global.h>
@@ -33,16 +33,16 @@
class JabberClient;
-class JabberDiscoProtocol : public QObject, public KIO::SlaveBase
+class JabberDiscoProtocol : public TQObject, public KIO::SlaveBase
{
Q_OBJECT
public:
- JabberDiscoProtocol ( const QCString &pool_socket, const QCString &app_socket );
+ JabberDiscoProtocol ( const TQCString &pool_socket, const TQCString &app_socket );
virtual ~JabberDiscoProtocol ();
- void setHost ( const QString &host, int port, const QString &user, const QString &pass );
+ void setHost ( const TQString &host, int port, const TQString &user, const TQString &pass );
void openConnection ();
void closeConnection ();
@@ -56,7 +56,7 @@ public:
void dispatchLoop ();
private slots:
- void slotClientDebugMessage ( const QString &msg );
+ void slotClientDebugMessage ( const TQString &msg );
void slotHandleTLSWarning ( int validityResult );
void slotClientError ( JabberClient::ErrorCode errorCode );
void slotConnected ();
@@ -68,7 +68,7 @@ private slots:
private:
enum CommandType { Get, ListDir };
- QString m_host, m_user, m_password;
+ TQString m_host, m_user, m_password;
int m_port;
KURL m_url;
bool m_connected;
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp
index 75b1fe2a..33c5ec8a 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp
@@ -1,5 +1,5 @@
/*
- * bsocket.cpp - QSocket wrapper based on Bytestream with SRV DNS support
+ * bsocket.cpp - TQSocket wrapper based on Bytestream with SRV DNS support
* Copyright (C) 2003 Justin Karneges
*
* This library is free software; you can redistribute it and/or
@@ -20,10 +20,10 @@
#include"bsocket.h"
-#include<qcstring.h>
-#include<qsocket.h>
-#include<qdns.h>
-#include<qguardedptr.h>
+#include<tqcstring.h>
+#include<tqsocket.h>
+#include<tqdns.h>
+#include<tqguardedptr.h>
#include"safedelete.h"
#ifndef NO_NDNS
#include"ndns.h"
@@ -46,26 +46,26 @@ public:
qsock = 0;
}
- QSocket *qsock;
+ TQSocket *qsock;
int state;
#ifndef NO_NDNS
NDns ndns;
#endif
SrvResolver srv;
- QString host;
+ TQString host;
int port;
SafeDelete sd;
};
-BSocket::BSocket(QObject *parent)
+BSocket::BSocket(TQObject *parent)
:ByteStream(parent)
{
d = new Private;
#ifndef NO_NDNS
- connect(&d->ndns, SIGNAL(resultsReady()), SLOT(ndns_done()));
+ connect(&d->ndns, TQT_SIGNAL(resultsReady()), TQT_SLOT(ndns_done()));
#endif
- connect(&d->srv, SIGNAL(resultsReady()), SLOT(srv_done()));
+ connect(&d->srv, TQT_SIGNAL(resultsReady()), TQT_SLOT(srv_done()));
reset();
}
@@ -83,7 +83,7 @@ void BSocket::reset(bool clear)
if(!clear && d->qsock->isOpen()) {
// move remaining into the local queue
- QByteArray block(d->qsock->bytesAvailable());
+ TQByteArray block(d->qsock->bytesAvailable());
d->qsock->readBlock(block.data(), block.size());
appendRead(block);
}
@@ -112,17 +112,17 @@ void BSocket::ensureSocket()
#if QT_VERSION >= 0x030200
d->qsock->setReadBufferSize(READBUFSIZE);
#endif
- connect(d->qsock, SIGNAL(hostFound()), SLOT(qs_hostFound()));
- connect(d->qsock, SIGNAL(connected()), SLOT(qs_connected()));
- connect(d->qsock, SIGNAL(connectionClosed()), SLOT(qs_connectionClosed()));
- connect(d->qsock, SIGNAL(delayedCloseFinished()), SLOT(qs_delayedCloseFinished()));
- connect(d->qsock, SIGNAL(readyRead()), SLOT(qs_readyRead()));
- connect(d->qsock, SIGNAL(bytesWritten(int)), SLOT(qs_bytesWritten(int)));
- connect(d->qsock, SIGNAL(error(int)), SLOT(qs_error(int)));
+ connect(d->qsock, TQT_SIGNAL(hostFound()), TQT_SLOT(qs_hostFound()));
+ connect(d->qsock, TQT_SIGNAL(connected()), TQT_SLOT(qs_connected()));
+ connect(d->qsock, TQT_SIGNAL(connectionClosed()), TQT_SLOT(qs_connectionClosed()));
+ connect(d->qsock, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(qs_delayedCloseFinished()));
+ connect(d->qsock, TQT_SIGNAL(readyRead()), TQT_SLOT(qs_readyRead()));
+ connect(d->qsock, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(qs_bytesWritten(int)));
+ connect(d->qsock, TQT_SIGNAL(error(int)), TQT_SLOT(qs_error(int)));
}
}
-void BSocket::connectToHost(const QString &host, Q_UINT16 port)
+void BSocket::connectToHost(const TQString &host, Q_UINT16 port)
{
reset(true);
d->host = host;
@@ -136,7 +136,7 @@ void BSocket::connectToHost(const QString &host, Q_UINT16 port)
#endif
}
-void BSocket::connectToServer(const QString &srv, const QString &type)
+void BSocket::connectToServer(const TQString &srv, const TQString &type)
{
reset(true);
d->state = HostLookup;
@@ -188,23 +188,23 @@ void BSocket::close()
}
}
-void BSocket::write(const QByteArray &a)
+void BSocket::write(const TQByteArray &a)
{
if(d->state != Connected)
return;
#ifdef BS_DEBUG
- QCString cs;
+ TQCString cs;
cs.resize(a.size()+1);
memcpy(cs.data(), a.data(), a.size());
- QString s = QString::fromUtf8(cs);
+ TQString s = TQString::fromUtf8(cs);
fprintf(stderr, "BSocket: writing [%d]: {%s}\n", a.size(), cs.data());
#endif
d->qsock->writeBlock(a.data(), a.size());
}
-QByteArray BSocket::read(int bytes)
+TQByteArray BSocket::read(int bytes)
{
- QByteArray block;
+ TQByteArray block;
if(d->qsock) {
int max = bytesAvailable();
if(bytes <= 0 || bytes > max)
@@ -216,10 +216,10 @@ QByteArray BSocket::read(int bytes)
block = ByteStream::read(bytes);
#ifdef BS_DEBUG
- QCString cs;
+ TQCString cs;
cs.resize(block.size()+1);
memcpy(cs.data(), block.data(), block.size());
- QString s = QString::fromUtf8(cs);
+ TQString s = TQString::fromUtf8(cs);
fprintf(stderr, "BSocket: read [%d]: {%s}\n", block.size(), s.latin1());
#endif
return block;
@@ -240,12 +240,12 @@ int BSocket::bytesToWrite() const
return d->qsock->bytesToWrite();
}
-QHostAddress BSocket::address() const
+TQHostAddress BSocket::address() const
{
if(d->qsock)
return d->qsock->address();
else
- return QHostAddress();
+ return TQHostAddress();
}
Q_UINT16 BSocket::port() const
@@ -256,12 +256,12 @@ Q_UINT16 BSocket::port() const
return 0;
}
-QHostAddress BSocket::peerAddress() const
+TQHostAddress BSocket::peerAddress() const
{
if(d->qsock)
return d->qsock->peerAddress();
else
- return QHostAddress();
+ return TQHostAddress();
}
Q_UINT16 BSocket::peerPort() const
@@ -285,7 +285,7 @@ void BSocket::srv_done()
d->host = d->srv.resultAddress().toString();
d->port = d->srv.resultPort();
do_connect();
- //QTimer::singleShot(0, this, SLOT(do_connect()));
+ //TQTimer::singleShot(0, this, TQT_SLOT(do_connect()));
//hostFound();
}
@@ -296,7 +296,7 @@ void BSocket::ndns_done()
d->host = d->ndns.resultString();
d->state = Connecting;
do_connect();
- //QTimer::singleShot(0, this, SLOT(do_connect()));
+ //TQTimer::singleShot(0, this, TQT_SLOT(do_connect()));
//hostFound();
}
else {
@@ -375,17 +375,17 @@ void BSocket::qs_error(int x)
SafeDeleteLock s(&d->sd);
// connection error during SRV host connect? try next
- if(d->state == HostLookup && (x == QSocket::ErrConnectionRefused || x == QSocket::ErrHostNotFound)) {
+ if(d->state == HostLookup && (x == TQSocket::ErrConnectionRefused || x == TQSocket::ErrHostNotFound)) {
d->srv.next();
return;
}
reset();
- if(x == QSocket::ErrConnectionRefused)
+ if(x == TQSocket::ErrConnectionRefused)
error(ErrConnectionRefused);
- else if(x == QSocket::ErrHostNotFound)
+ else if(x == TQSocket::ErrHostNotFound)
error(ErrHostNotFound);
- else if(x == QSocket::ErrSocketRead)
+ else if(x == TQSocket::ErrSocketRead)
error(ErrRead);
}
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h
index f51b3470..7887b9c0 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h
@@ -1,5 +1,5 @@
/*
- * bsocket.h - QSocket wrapper based on Bytestream with SRV DNS support
+ * bsocket.h - TQSocket wrapper based on Bytestream with SRV DNS support
* Copyright (C) 2003 Justin Karneges
*
* This library is free software; you can redistribute it and/or
@@ -21,8 +21,8 @@
#ifndef CS_BSOCKET_H
#define CS_BSOCKET_H
-#include<qobject.h>
-#include<qhostaddress.h>
+#include<tqobject.h>
+#include<tqhostaddress.h>
#include"bytestream.h"
// CS_NAMESPACE_BEGIN
@@ -33,11 +33,11 @@ class BSocket : public ByteStream
public:
enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound };
enum State { Idle, HostLookup, Connecting, Connected, Closing };
- BSocket(QObject *parent=0);
+ BSocket(TQObject *parent=0);
~BSocket();
- void connectToHost(const QString &host, Q_UINT16 port);
- void connectToServer(const QString &srv, const QString &type);
+ void connectToHost(const TQString &host, Q_UINT16 port);
+ void connectToServer(const TQString &srv, const TQString &type);
int socket() const;
void setSocket(int);
int state() const;
@@ -45,17 +45,17 @@ public:
// from ByteStream
bool isOpen() const;
void close();
- void write(const QByteArray &);
- QByteArray read(int bytes=0);
+ void write(const TQByteArray &);
+ TQByteArray read(int bytes=0);
int bytesAvailable() const;
int bytesToWrite() const;
// local
- QHostAddress address() const;
+ TQHostAddress address() const;
Q_UINT16 port() const;
// remote
- QHostAddress peerAddress() const;
+ TQHostAddress peerAddress() const;
Q_UINT16 peerPort() const;
signals:
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp
index 76550db0..6abeb556 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp
@@ -20,7 +20,7 @@
#include"httpconnect.h"
-#include<qstringlist.h>
+#include<tqstringlist.h>
#include"bsocket.h"
#include"base64.h"
@@ -30,20 +30,20 @@
// CS_NAMESPACE_BEGIN
-static QString extractLine(QByteArray *buf, bool *found)
+static TQString extractLine(TQByteArray *buf, bool *found)
{
// scan for newline
int n;
for(n = 0; n < (int)buf->size()-1; ++n) {
if(buf->at(n) == '\r' && buf->at(n+1) == '\n') {
- QCString cstr;
+ TQCString cstr;
cstr.resize(n+1);
memcpy(cstr.data(), buf->data(), n);
n += 2; // hack off CR/LF
memmove(buf->data(), buf->data() + n, buf->size() - n);
buf->resize(buf->size() - n);
- QString s = QString::fromUtf8(cstr);
+ TQString s = TQString::fromUtf8(cstr);
if(found)
*found = true;
@@ -56,7 +56,7 @@ static QString extractLine(QByteArray *buf, bool *found)
return "";
}
-static bool extractMainHeader(const QString &line, QString *proto, int *code, QString *msg)
+static bool extractMainHeader(const TQString &line, TQString *proto, int *code, TQString *msg)
{
int n = line.find(' ');
if(n == -1)
@@ -81,31 +81,31 @@ public:
Private() {}
BSocket sock;
- QString host;
+ TQString host;
int port;
- QString user, pass;
- QString real_host;
+ TQString user, pass;
+ TQString real_host;
int real_port;
- QByteArray recvBuf;
+ TQByteArray recvBuf;
bool inHeader;
- QStringList headerLines;
+ TQStringList headerLines;
int toWrite;
bool active;
};
-HttpConnect::HttpConnect(QObject *parent)
+HttpConnect::HttpConnect(TQObject *parent)
:ByteStream(parent)
{
d = new Private;
- connect(&d->sock, SIGNAL(connected()), SLOT(sock_connected()));
- connect(&d->sock, SIGNAL(connectionClosed()), SLOT(sock_connectionClosed()));
- connect(&d->sock, SIGNAL(delayedCloseFinished()), SLOT(sock_delayedCloseFinished()));
- connect(&d->sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
- connect(&d->sock, SIGNAL(bytesWritten(int)), SLOT(sock_bytesWritten(int)));
- connect(&d->sock, SIGNAL(error(int)), SLOT(sock_error(int)));
+ connect(&d->sock, TQT_SIGNAL(connected()), TQT_SLOT(sock_connected()));
+ connect(&d->sock, TQT_SIGNAL(connectionClosed()), TQT_SLOT(sock_connectionClosed()));
+ connect(&d->sock, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(sock_delayedCloseFinished()));
+ connect(&d->sock, TQT_SIGNAL(readyRead()), TQT_SLOT(sock_readyRead()));
+ connect(&d->sock, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sock_bytesWritten(int)));
+ connect(&d->sock, TQT_SIGNAL(error(int)), TQT_SLOT(sock_error(int)));
reset(true);
}
@@ -127,13 +127,13 @@ void HttpConnect::reset(bool clear)
d->active = false;
}
-void HttpConnect::setAuth(const QString &user, const QString &pass)
+void HttpConnect::setAuth(const TQString &user, const TQString &pass)
{
d->user = user;
d->pass = pass;
}
-void HttpConnect::connectToHost(const QString &proxyHost, int proxyPort, const QString &host, int port)
+void HttpConnect::connectToHost(const TQString &proxyHost, int proxyPort, const TQString &host, int port)
{
reset(true);
@@ -164,13 +164,13 @@ void HttpConnect::close()
reset();
}
-void HttpConnect::write(const QByteArray &buf)
+void HttpConnect::write(const TQByteArray &buf)
{
if(d->active)
d->sock.write(buf);
}
-QByteArray HttpConnect::read(int bytes)
+TQByteArray HttpConnect::read(int bytes)
{
return ByteStream::read(bytes);
}
@@ -197,18 +197,18 @@ void HttpConnect::sock_connected()
d->headerLines.clear();
// connected, now send the request
- QString s;
- s += QString("CONNECT ") + d->real_host + ':' + QString::number(d->real_port) + " HTTP/1.0\r\n";
+ TQString s;
+ s += TQString("CONNECT ") + d->real_host + ':' + TQString::number(d->real_port) + " HTTP/1.0\r\n";
if(!d->user.isEmpty()) {
- QString str = d->user + ':' + d->pass;
- s += QString("Proxy-Authorization: Basic ") + Base64::encodeString(str) + "\r\n";
+ TQString str = d->user + ':' + d->pass;
+ s += TQString("Proxy-Authorization: Basic ") + Base64::encodeString(str) + "\r\n";
}
s += "Proxy-Connection: Keep-Alive\r\n";
s += "Pragma: no-cache\r\n";
s += "\r\n";
- QCString cs = s.utf8();
- QByteArray block(cs.length());
+ TQCString cs = s.utf8();
+ TQByteArray block(cs.length());
memcpy(block.data(), cs.data(), block.size());
d->toWrite = block.size();
d->sock.write(block);
@@ -235,7 +235,7 @@ void HttpConnect::sock_delayedCloseFinished()
void HttpConnect::sock_readyRead()
{
- QByteArray block = d->sock.read();
+ TQByteArray block = d->sock.read();
if(!d->active) {
ByteStream::appendArray(&d->recvBuf, block);
@@ -244,7 +244,7 @@ void HttpConnect::sock_readyRead()
// grab available lines
while(1) {
bool found;
- QString line = extractLine(&d->recvBuf, &found);
+ TQString line = extractLine(&d->recvBuf, &found);
if(!found)
break;
if(line.isEmpty()) {
@@ -256,12 +256,12 @@ void HttpConnect::sock_readyRead()
// done with grabbing the header?
if(!d->inHeader) {
- QString str = d->headerLines.first();
+ TQString str = d->headerLines.first();
d->headerLines.remove(d->headerLines.begin());
- QString proto;
+ TQString proto;
int code;
- QString msg;
+ TQString msg;
if(!extractMainHeader(str, &proto, &code, &msg)) {
#ifdef PROX_DEBUG
fprintf(stderr, "HttpConnect: invalid header!\n");
@@ -273,7 +273,7 @@ void HttpConnect::sock_readyRead()
else {
#ifdef PROX_DEBUG
fprintf(stderr, "HttpConnect: header proto=[%s] code=[%d] msg=[%s]\n", proto.latin1(), code, msg.latin1());
- for(QStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it)
+ for(TQStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it)
fprintf(stderr, "HttpConnect: * [%s]\n", (*it).latin1());
#endif
}
@@ -294,7 +294,7 @@ void HttpConnect::sock_readyRead()
}
else {
int err;
- QString errStr;
+ TQString errStr;
if(code == 407) { // Authentication failed
err = ErrProxyAuth;
errStr = tr("Authentication failed");
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h
index e383969b..2acef809 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h
@@ -30,17 +30,17 @@ class HttpConnect : public ByteStream
Q_OBJECT
public:
enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth };
- HttpConnect(QObject *parent=0);
+ HttpConnect(TQObject *parent=0);
~HttpConnect();
- void setAuth(const QString &user, const QString &pass="");
- void connectToHost(const QString &proxyHost, int proxyPort, const QString &host, int port);
+ void setAuth(const TQString &user, const TQString &pass="");
+ void connectToHost(const TQString &proxyHost, int proxyPort, const TQString &host, int port);
// from ByteStream
bool isOpen() const;
void close();
- void write(const QByteArray &);
- QByteArray read(int bytes=0);
+ void write(const TQByteArray &);
+ TQByteArray read(int bytes=0);
int bytesAvailable() const;
int bytesToWrite() const;
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp
index 605d44e9..3a182457 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp
@@ -20,10 +20,10 @@
#include"httppoll.h"
-#include<qstringlist.h>
-#include<qurl.h>
-#include<qtimer.h>
-#include<qguardedptr.h>
+#include<tqstringlist.h>
+#include<tqurl.h>
+#include<tqtimer.h>
+#include<tqguardedptr.h>
#include<qca.h>
#include<stdlib.h>
#include"bsocket.h"
@@ -37,9 +37,9 @@
// CS_NAMESPACE_BEGIN
-static QByteArray randomArray(int size)
+static TQByteArray randomArray(int size)
{
- QByteArray a(size);
+ TQByteArray a(size);
for(int n = 0; n < size; ++n)
a[n] = (char)(256.0*rand()/(RAND_MAX+1.0));
return a;
@@ -48,12 +48,12 @@ static QByteArray randomArray(int size)
//----------------------------------------------------------------------------
// HttpPoll
//----------------------------------------------------------------------------
-static QString hpk(int n, const QString &s)
+static TQString hpk(int n, const TQString &s)
{
if(n == 0)
return s;
else
- return Base64::arrayToString( QCA::SHA1::hash( QCString(hpk(n - 1, s).latin1()) ) );
+ return Base64::arrayToString( QCA::SHA1::hash( TQCString(hpk(n - 1, s).latin1()) ) );
}
class HttpPoll::Private
@@ -62,37 +62,37 @@ public:
Private() {}
HttpProxyPost http;
- QString host;
+ TQString host;
int port;
- QString user, pass;
- QString url;
+ TQString user, pass;
+ TQString url;
bool use_proxy;
- QByteArray out;
+ TQByteArray out;
int state;
bool closing;
- QString ident;
+ TQString ident;
- QTimer *t;
+ TQTimer *t;
- QString key[POLL_KEYS];
+ TQString key[POLL_KEYS];
int key_n;
int polltime;
};
-HttpPoll::HttpPoll(QObject *parent)
+HttpPoll::HttpPoll(TQObject *parent)
:ByteStream(parent)
{
d = new Private;
d->polltime = 30;
d->t = new QTimer;
- connect(d->t, SIGNAL(timeout()), SLOT(do_sync()));
+ connect(d->t, TQT_SIGNAL(timeout()), TQT_SLOT(do_sync()));
- connect(&d->http, SIGNAL(result()), SLOT(http_result()));
- connect(&d->http, SIGNAL(error(int)), SLOT(http_error(int)));
+ connect(&d->http, TQT_SIGNAL(result()), TQT_SLOT(http_result()));
+ connect(&d->http, TQT_SIGNAL(error(int)), TQT_SLOT(http_error(int)));
reset(true);
}
@@ -117,18 +117,18 @@ void HttpPoll::reset(bool clear)
d->t->stop();
}
-void HttpPoll::setAuth(const QString &user, const QString &pass)
+void HttpPoll::setAuth(const TQString &user, const TQString &pass)
{
d->user = user;
d->pass = pass;
}
-void HttpPoll::connectToUrl(const QString &url)
+void HttpPoll::connectToUrl(const TQString &url)
{
connectToHost("", 0, url);
}
-void HttpPoll::connectToHost(const QString &proxyHost, int proxyPort, const QString &url)
+void HttpPoll::connectToHost(const TQString &proxyHost, int proxyPort, const TQString &url)
{
reset(true);
@@ -140,7 +140,7 @@ void HttpPoll::connectToHost(const QString &proxyHost, int proxyPort, const QStr
d->use_proxy = true;
}
else {
- QUrl u = url;
+ TQUrl u = url;
d->host = u.host();
if(u.hasPort())
d->port = u.port();
@@ -152,7 +152,7 @@ void HttpPoll::connectToHost(const QString &proxyHost, int proxyPort, const QStr
resetKey();
bool last;
- QString key = getKey(&last);
+ TQString key = getKey(&last);
#ifdef PROX_DEBUG
fprintf(stderr, "HttpPoll: Connecting to %s:%d [%s]", d->host.latin1(), d->port, d->url.latin1());
@@ -161,19 +161,19 @@ void HttpPoll::connectToHost(const QString &proxyHost, int proxyPort, const QStr
else
fprintf(stderr, ", auth {%s,%s}\n", d->user.latin1(), d->pass.latin1());
#endif
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
syncStarted();
if(!self)
return;
d->state = 1;
d->http.setAuth(d->user, d->pass);
- d->http.post(d->host, d->port, d->url, makePacket("0", key, "", QByteArray()), d->use_proxy);
+ d->http.post(d->host, d->port, d->url, makePacket("0", key, "", TQByteArray()), d->use_proxy);
}
-QByteArray HttpPoll::makePacket(const QString &ident, const QString &key, const QString &newkey, const QByteArray &block)
+TQByteArray HttpPoll::makePacket(const TQString &ident, const TQString &key, const TQString &newkey, const TQByteArray &block)
{
- QString str = ident;
+ TQString str = ident;
if(!key.isEmpty()) {
str += ';';
str += key;
@@ -183,10 +183,10 @@ QByteArray HttpPoll::makePacket(const QString &ident, const QString &key, const
str += newkey;
}
str += ',';
- QCString cs = str.latin1();
+ TQCString cs = str.latin1();
int len = cs.length();
- QByteArray a(len + block.size());
+ TQByteArray a(len + block.size());
memcpy(a.data(), cs.data(), len);
memcpy(a.data() + len, block.data(), block.size());
return a;
@@ -221,14 +221,14 @@ void HttpPoll::close()
void HttpPoll::http_result()
{
// check for death :)
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
syncFinished();
if(!self)
return;
// get id and packet
- QString id;
- QString cookie = d->http.getHeader("Set-Cookie");
+ TQString id;
+ TQString cookie = d->http.getHeader("Set-Cookie");
int n = cookie.find("ID=");
if(n == -1) {
reset();
@@ -241,7 +241,7 @@ void HttpPoll::http_result()
id = cookie.mid(n, n2-n);
else
id = cookie.mid(n);
- QByteArray block = d->http.body();
+ TQByteArray block = d->http.body();
// session error?
if(id.right(2) == ":0") {
@@ -337,14 +337,14 @@ void HttpPoll::do_sync()
d->out = takeWrite(0, false);
bool last;
- QString key = getKey(&last);
- QString newkey;
+ TQString key = getKey(&last);
+ TQString newkey;
if(last) {
resetKey();
newkey = getKey(&last);
}
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
syncStarted();
if(!self)
return;
@@ -357,15 +357,15 @@ void HttpPoll::resetKey()
#ifdef PROX_DEBUG
fprintf(stderr, "HttpPoll: reset key!\n");
#endif
- QByteArray a = randomArray(64);
- QString str = QString::fromLatin1(a.data(), a.size());
+ TQByteArray a = randomArray(64);
+ TQString str = TQString::fromLatin1(a.data(), a.size());
d->key_n = POLL_KEYS;
for(int n = 0; n < POLL_KEYS; ++n)
d->key[n] = hpk(n+1, str);
}
-const QString & HttpPoll::getKey(bool *last)
+const TQString & HttpPoll::getKey(bool *last)
{
*last = false;
--(d->key_n);
@@ -378,20 +378,20 @@ const QString & HttpPoll::getKey(bool *last)
//----------------------------------------------------------------------------
// HttpProxyPost
//----------------------------------------------------------------------------
-static QString extractLine(QByteArray *buf, bool *found)
+static TQString extractLine(TQByteArray *buf, bool *found)
{
// scan for newline
int n;
for(n = 0; n < (int)buf->size()-1; ++n) {
if(buf->at(n) == '\r' && buf->at(n+1) == '\n') {
- QCString cstr;
+ TQCString cstr;
cstr.resize(n+1);
memcpy(cstr.data(), buf->data(), n);
n += 2; // hack off CR/LF
memmove(buf->data(), buf->data() + n, buf->size() - n);
buf->resize(buf->size() - n);
- QString s = QString::fromUtf8(cstr);
+ TQString s = TQString::fromUtf8(cstr);
if(found)
*found = true;
@@ -404,7 +404,7 @@ static QString extractLine(QByteArray *buf, bool *found)
return "";
}
-static bool extractMainHeader(const QString &line, QString *proto, int *code, QString *msg)
+static bool extractMainHeader(const TQString &line, TQString *proto, int *code, TQString *msg)
{
int n = line.find(' ');
if(n == -1)
@@ -429,23 +429,23 @@ public:
Private() {}
BSocket sock;
- QByteArray postdata, recvBuf, body;
- QString url;
- QString user, pass;
+ TQByteArray postdata, recvBuf, body;
+ TQString url;
+ TQString user, pass;
bool inHeader;
- QStringList headerLines;
+ TQStringList headerLines;
bool asProxy;
- QString host;
+ TQString host;
};
-HttpProxyPost::HttpProxyPost(QObject *parent)
-:QObject(parent)
+HttpProxyPost::HttpProxyPost(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
- connect(&d->sock, SIGNAL(connected()), SLOT(sock_connected()));
- connect(&d->sock, SIGNAL(connectionClosed()), SLOT(sock_connectionClosed()));
- connect(&d->sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
- connect(&d->sock, SIGNAL(error(int)), SLOT(sock_error(int)));
+ connect(&d->sock, TQT_SIGNAL(connected()), TQT_SLOT(sock_connected()));
+ connect(&d->sock, TQT_SIGNAL(connectionClosed()), TQT_SLOT(sock_connectionClosed()));
+ connect(&d->sock, TQT_SIGNAL(readyRead()), TQT_SLOT(sock_readyRead()));
+ connect(&d->sock, TQT_SIGNAL(error(int)), TQT_SLOT(sock_error(int)));
reset(true);
}
@@ -464,7 +464,7 @@ void HttpProxyPost::reset(bool clear)
d->body.resize(0);
}
-void HttpProxyPost::setAuth(const QString &user, const QString &pass)
+void HttpProxyPost::setAuth(const TQString &user, const TQString &pass)
{
d->user = user;
d->pass = pass;
@@ -475,7 +475,7 @@ bool HttpProxyPost::isActive() const
return (d->sock.state() == BSocket::Idle ? false: true);
}
-void HttpProxyPost::post(const QString &proxyHost, int proxyPort, const QString &url, const QByteArray &data, bool asProxy)
+void HttpProxyPost::post(const TQString &proxyHost, int proxyPort, const TQString &url, const TQByteArray &data, bool asProxy)
{
reset(true);
@@ -499,19 +499,19 @@ void HttpProxyPost::stop()
reset();
}
-QByteArray HttpProxyPost::body() const
+TQByteArray HttpProxyPost::body() const
{
return d->body;
}
-QString HttpProxyPost::getHeader(const QString &var) const
+TQString HttpProxyPost::getHeader(const TQString &var) const
{
- for(QStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it) {
- const QString &s = *it;
+ for(TQStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it) {
+ const TQString &s = *it;
int n = s.find(": ");
if(n == -1)
continue;
- QString v = s.mid(0, n);
+ TQString v = s.mid(0, n);
if(v == var)
return s.mid(n+2);
}
@@ -526,30 +526,30 @@ void HttpProxyPost::sock_connected()
d->inHeader = true;
d->headerLines.clear();
- QUrl u = d->url;
+ TQUrl u = d->url;
// connected, now send the request
- QString s;
- s += QString("POST ") + d->url + " HTTP/1.0\r\n";
+ TQString s;
+ s += TQString("POST ") + d->url + " HTTP/1.0\r\n";
if(d->asProxy) {
if(!d->user.isEmpty()) {
- QString str = d->user + ':' + d->pass;
- s += QString("Proxy-Authorization: Basic ") + Base64::encodeString(str) + "\r\n";
+ TQString str = d->user + ':' + d->pass;
+ s += TQString("Proxy-Authorization: Basic ") + Base64::encodeString(str) + "\r\n";
}
s += "Proxy-Connection: Keep-Alive\r\n";
s += "Pragma: no-cache\r\n";
- s += QString("Host: ") + u.host() + "\r\n";
+ s += TQString("Host: ") + u.host() + "\r\n";
}
else {
- s += QString("Host: ") + d->host + "\r\n";
+ s += TQString("Host: ") + d->host + "\r\n";
}
s += "Content-Type: application/x-www-form-urlencoded\r\n";
- s += QString("Content-Length: ") + QString::number(d->postdata.size()) + "\r\n";
+ s += TQString("Content-Length: ") + TQString::number(d->postdata.size()) + "\r\n";
s += "\r\n";
// write request
- QCString cs = s.utf8();
- QByteArray block(cs.length());
+ TQCString cs = s.utf8();
+ TQByteArray block(cs.length());
memcpy(block.data(), cs.data(), block.size());
d->sock.write(block);
@@ -566,14 +566,14 @@ void HttpProxyPost::sock_connectionClosed()
void HttpProxyPost::sock_readyRead()
{
- QByteArray block = d->sock.read();
+ TQByteArray block = d->sock.read();
ByteStream::appendArray(&d->recvBuf, block);
if(d->inHeader) {
// grab available lines
while(1) {
bool found;
- QString line = extractLine(&d->recvBuf, &found);
+ TQString line = extractLine(&d->recvBuf, &found);
if(!found)
break;
if(line.isEmpty()) {
@@ -585,12 +585,12 @@ void HttpProxyPost::sock_readyRead()
// done with grabbing the header?
if(!d->inHeader) {
- QString str = d->headerLines.first();
+ TQString str = d->headerLines.first();
d->headerLines.remove(d->headerLines.begin());
- QString proto;
+ TQString proto;
int code;
- QString msg;
+ TQString msg;
if(!extractMainHeader(str, &proto, &code, &msg)) {
#ifdef PROX_DEBUG
fprintf(stderr, "HttpProxyPost: invalid header!\n");
@@ -602,7 +602,7 @@ void HttpProxyPost::sock_readyRead()
else {
#ifdef PROX_DEBUG
fprintf(stderr, "HttpProxyPost: header proto=[%s] code=[%d] msg=[%s]\n", proto.latin1(), code, msg.latin1());
- for(QStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it)
+ for(TQStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it)
fprintf(stderr, "HttpProxyPost: * [%s]\n", (*it).latin1());
#endif
}
@@ -614,7 +614,7 @@ void HttpProxyPost::sock_readyRead()
}
else {
int err;
- QString errStr;
+ TQString errStr;
if(code == 407) { // Authentication failed
err = ErrProxyAuth;
errStr = tr("Authentication failed");
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h
index 4c02ead2..c38b7a8a 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h
@@ -30,12 +30,12 @@ class HttpPoll : public ByteStream
Q_OBJECT
public:
enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth };
- HttpPoll(QObject *parent=0);
+ HttpPoll(TQObject *parent=0);
~HttpPoll();
- void setAuth(const QString &user, const QString &pass="");
- void connectToUrl(const QString &url);
- void connectToHost(const QString &proxyHost, int proxyPort, const QString &url);
+ void setAuth(const TQString &user, const TQString &pass="");
+ void connectToUrl(const TQString &url);
+ void connectToHost(const TQString &proxyHost, int proxyPort, const TQString &url);
int pollInterval() const;
void setPollInterval(int seconds);
@@ -62,9 +62,9 @@ private:
Private *d;
void reset(bool clear=false);
- QByteArray makePacket(const QString &ident, const QString &key, const QString &newkey, const QByteArray &block);
+ TQByteArray makePacket(const TQString &ident, const TQString &key, const TQString &newkey, const TQByteArray &block);
void resetKey();
- const QString & getKey(bool *);
+ const TQString & getKey(bool *);
};
class HttpProxyPost : public QObject
@@ -72,15 +72,15 @@ class HttpProxyPost : public QObject
Q_OBJECT
public:
enum Error { ErrConnectionRefused, ErrHostNotFound, ErrSocket, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth };
- HttpProxyPost(QObject *parent=0);
+ HttpProxyPost(TQObject *parent=0);
~HttpProxyPost();
- void setAuth(const QString &user, const QString &pass="");
+ void setAuth(const TQString &user, const TQString &pass="");
bool isActive() const;
- void post(const QString &proxyHost, int proxyPort, const QString &url, const QByteArray &data, bool asProxy=true);
+ void post(const TQString &proxyHost, int proxyPort, const TQString &url, const TQByteArray &data, bool asProxy=true);
void stop();
- QByteArray body() const;
- QString getHeader(const QString &) const;
+ TQByteArray body() const;
+ TQString getHeader(const TQString &) const;
signals:
void result();
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp
index 1203315a..748db248 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp
@@ -21,9 +21,9 @@
//! \class NDns ndns.h
//! \brief Simple DNS resolution using native system calls
//!
-//! This class is to be used when Qt's QDns is not good enough. Because QDns
+//! This class is to be used when Qt's TQDns is not good enough. Because QDns
//! does not use threads, it cannot make a system call asyncronously. Thus,
-//! QDns tries to imitate the behavior of each platform's native behavior, and
+//! TQDns tries to imitate the behavior of each platform's native behavior, and
//! generally falls short.
//!
//! NDns uses a thread to make the system call happen in the background. This
@@ -45,15 +45,15 @@
//!
//! // or if you want to get the IP address as a string:
//!
-//! QString ip_address = dns.resultString();
+//! TQString ip_address = dns.resultString();
//! \endcode
#include"ndns.h"
-#include<qapplication.h>
-#include<qsocketdevice.h>
-#include<qptrlist.h>
-#include<qeventloop.h>
+#include<tqapplication.h>
+#include<tqsocketdevice.h>
+#include<tqptrlist.h>
+#include<tqeventloop.h>
#ifdef Q_OS_UNIX
#include<netdb.h>
@@ -72,7 +72,7 @@
class NDnsWorkerEvent : public QCustomEvent
{
public:
- enum Type { WorkerEvent = QEvent::User + 100 };
+ enum Type { WorkerEvent = TQEvent::User + 100 };
NDnsWorkerEvent(NDnsWorker *);
NDnsWorker *worker;
@@ -81,18 +81,18 @@ public:
class NDnsWorker : public QThread
{
public:
- NDnsWorker(QObject *, const QCString &);
+ NDnsWorker(TQObject *, const TQCString &);
bool success;
bool cancelled;
- QHostAddress addr;
+ TQHostAddress addr;
protected:
void run();
private:
- QCString host;
- QObject *par;
+ TQCString host;
+ TQObject *par;
};
//! \endif
@@ -100,8 +100,8 @@ private:
// NDnsManager
//----------------------------------------------------------------------------
#ifndef HAVE_GETHOSTBYNAME_R
-static QMutex *workerMutex = 0;
-static QMutex *workerCancelled = 0;
+static TQMutex *workerMutex = 0;
+static TQMutex *workerCancelled = 0;
#endif
static NDnsManager *man = 0;
bool winsock_init = false;
@@ -118,7 +118,7 @@ class NDnsManager::Private
public:
Item *find(const NDns *n)
{
- QPtrListIterator<Item> it(list);
+ TQPtrListIterator<Item> it(list);
for(Item *i; (i = it.current()); ++it) {
if(i->ndns == n)
return i;
@@ -128,7 +128,7 @@ public:
Item *find(const NDnsWorker *w)
{
- QPtrListIterator<Item> it(list);
+ TQPtrListIterator<Item> it(list);
for(Item *i; (i = it.current()); ++it) {
if(i->worker == w)
return i;
@@ -136,7 +136,7 @@ public:
return 0;
}
- QPtrList<Item> list;
+ TQPtrList<Item> list;
};
NDnsManager::NDnsManager()
@@ -149,7 +149,7 @@ NDnsManager::NDnsManager()
#ifdef Q_OS_WIN32
if(!winsock_init) {
winsock_init = true;
- QSocketDevice *sd = new QSocketDevice;
+ TQSocketDevice *sd = new QSocketDevice;
delete sd;
}
#endif
@@ -157,7 +157,7 @@ NDnsManager::NDnsManager()
d = new Private;
d->list.setAutoDelete(true);
- connect(qApp, SIGNAL(aboutToQuit()), SLOT(app_aboutToQuit()));
+ connect(qApp, TQT_SIGNAL(aboutToQuit()), TQT_SLOT(app_aboutToQuit()));
}
NDnsManager::~NDnsManager()
@@ -172,7 +172,7 @@ NDnsManager::~NDnsManager()
#endif
}
-void NDnsManager::resolve(NDns *self, const QString &name)
+void NDnsManager::resolve(NDns *self, const TQString &name)
{
Item *i = new Item;
i->ndns = self;
@@ -204,7 +204,7 @@ bool NDnsManager::isBusy(const NDns *self) const
return (i ? true: false);
}
-bool NDnsManager::event(QEvent *e)
+bool NDnsManager::event(TQEvent *e)
{
if((int)e->type() == (int)NDnsWorkerEvent::WorkerEvent) {
NDnsWorkerEvent *we = static_cast<NDnsWorkerEvent*>(e);
@@ -215,7 +215,7 @@ bool NDnsManager::event(QEvent *e)
// should NOT happen
return true;
}
- QHostAddress addr = i->worker->addr;
+ TQHostAddress addr = i->worker->addr;
NDns *ndns = i->ndns;
delete i->worker;
d->list.removeRef(i);
@@ -242,8 +242,8 @@ void NDnsManager::tryDestroy()
void NDnsManager::app_aboutToQuit()
{
while(man) {
- QEventLoop *e = qApp->eventLoop();
- e->processEvents(QEventLoop::WaitForMore);
+ TQEventLoop *e = qApp->eventLoop();
+ e->processEvents(TQEventLoop::WaitForMore);
}
}
@@ -257,8 +257,8 @@ void NDnsManager::app_aboutToQuit()
//!
//! Constructs an NDns object with parent \a parent.
-NDns::NDns(QObject *parent)
-:QObject(parent)
+NDns::NDns(TQObject *parent)
+:TQObject(parent)
{
}
@@ -271,7 +271,7 @@ NDns::~NDns()
//!
//! Resolves hostname \a host (eg. psi.affinix.com)
-void NDns::resolve(const QString &host)
+void NDns::resolve(const TQString &host)
{
stop();
if(!man)
@@ -299,7 +299,7 @@ uint NDns::result() const
//!
//! Returns the IP address as a string. This will be an empty string if the lookup failed.
//! \sa resultsReady()
-QString NDns::resultString() const
+TQString NDns::resultString() const
{
return addr.toString();
}
@@ -313,7 +313,7 @@ bool NDns::isBusy() const
return man->isBusy(this);
}
-void NDns::finished(const QHostAddress &a)
+void NDns::finished(const TQHostAddress &a)
{
addr = a;
resultsReady();
@@ -323,7 +323,7 @@ void NDns::finished(const QHostAddress &a)
// NDnsWorkerEvent
//----------------------------------------------------------------------------
NDnsWorkerEvent::NDnsWorkerEvent(NDnsWorker *p)
-:QCustomEvent(WorkerEvent)
+:TQCustomEvent(WorkerEvent)
{
worker = p;
}
@@ -331,7 +331,7 @@ NDnsWorkerEvent::NDnsWorkerEvent(NDnsWorker *p)
//----------------------------------------------------------------------------
// NDnsWorker
//----------------------------------------------------------------------------
-NDnsWorker::NDnsWorker(QObject *_par, const QCString &_host)
+NDnsWorker::NDnsWorker(TQObject *_par, const TQCString &_host)
{
success = cancelled = false;
par = _par;
@@ -349,7 +349,7 @@ void NDnsWorker::run()
gethostbyname_r(host.data(), &buf, char_buf, sizeof(char_buf), &h, &err);
#else
// lock for gethostbyname
- QMutexLocker locker(workerMutex);
+ TQMutexLocker locker(workerMutex);
// check for cancel
workerCancelled->lock();
@@ -362,7 +362,7 @@ void NDnsWorker::run()
if(!h) {
success = false;
- QApplication::postEvent(par, new NDnsWorkerEvent(this));
+ TQApplication::postEvent(par, new NDnsWorkerEvent(this));
return;
}
@@ -370,7 +370,7 @@ void NDnsWorker::run()
addr.setAddress(ntohl(a.s_addr));
success = true;
- QApplication::postEvent(par, new NDnsWorkerEvent(this));
+ TQApplication::postEvent(par, new NDnsWorkerEvent(this));
}
// CS_NAMESPACE_END
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h
index ccbc6b57..48243e30 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h
@@ -21,11 +21,11 @@
#ifndef CS_NDNS_H
#define CS_NDNS_H
-#include<qobject.h>
-#include<qcstring.h>
-#include<qthread.h>
-#include<qmutex.h>
-#include<qhostaddress.h>
+#include<tqobject.h>
+#include<tqcstring.h>
+#include<tqthread.h>
+#include<tqmutex.h>
+#include<tqhostaddress.h>
// CS_NAMESPACE_BEGIN
@@ -36,24 +36,24 @@ class NDns : public QObject
{
Q_OBJECT
public:
- NDns(QObject *parent=0);
+ NDns(TQObject *parent=0);
~NDns();
- void resolve(const QString &);
+ void resolve(const TQString &);
void stop();
bool isBusy() const;
uint result() const;
- QString resultString() const;
+ TQString resultString() const;
signals:
void resultsReady();
private:
- QHostAddress addr;
+ TQHostAddress addr;
friend class NDnsManager;
- void finished(const QHostAddress &);
+ void finished(const TQHostAddress &);
};
class NDnsManager : public QObject
@@ -65,7 +65,7 @@ public:
//! \if _hide_doc_
protected:
- bool event(QEvent *);
+ bool event(TQEvent *);
//! \endif
private slots:
@@ -77,7 +77,7 @@ private:
friend class NDns;
NDnsManager();
- void resolve(NDns *self, const QString &name);
+ void resolve(NDns *self, const TQString &name);
void stop(NDns *self);
bool isBusy(const NDns *self) const;
void tryDestroy();
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp
index e503d57a..5b88b4e5 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp
@@ -33,8 +33,8 @@ public:
ServSockSignal *serv;
};
-ServSock::ServSock(QObject *parent)
-:QObject(parent)
+ServSock::ServSock(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
d->serv = 0;
@@ -61,7 +61,7 @@ bool ServSock::listen(Q_UINT16 port)
d->serv = 0;
return false;
}
- connect(d->serv, SIGNAL(connectionReady(int)), SLOT(sss_connectionReady(int)));
+ connect(d->serv, TQT_SIGNAL(connectionReady(int)), TQT_SLOT(sss_connectionReady(int)));
return true;
}
@@ -80,12 +80,12 @@ int ServSock::port() const
return -1;
}
-QHostAddress ServSock::address() const
+TQHostAddress ServSock::address() const
{
if(d->serv)
return d->serv->address();
else
- return QHostAddress();
+ return TQHostAddress();
}
void ServSock::sss_connectionReady(int s)
@@ -98,7 +98,7 @@ void ServSock::sss_connectionReady(int s)
// ServSockSignal
//----------------------------------------------------------------------------
ServSockSignal::ServSockSignal(int port)
-:QServerSocket(port, 16)
+:TQServerSocket(port, 16)
{
}
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h
index a19cd38e..4628d8ea 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h
@@ -21,7 +21,7 @@
#ifndef CS_SERVSOCK_H
#define CS_SERVSOCK_H
-#include<qserversocket.h>
+#include<tqserversocket.h>
// CS_NAMESPACE_BEGIN
@@ -29,14 +29,14 @@ class ServSock : public QObject
{
Q_OBJECT
public:
- ServSock(QObject *parent=0);
+ ServSock(TQObject *parent=0);
~ServSock();
bool isActive() const;
bool listen(Q_UINT16 port);
void stop();
int port() const;
- QHostAddress address() const;
+ TQHostAddress address() const;
signals:
void connectionReady(int);
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp
index 2f3ca5a8..59504170 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp
@@ -20,13 +20,13 @@
#include"socks.h"
-#include<qhostaddress.h>
-#include<qstringlist.h>
-#include<qptrlist.h>
-#include<qtimer.h>
-#include<qguardedptr.h>
-#include<qsocketdevice.h>
-#include<qsocketnotifier.h>
+#include<tqhostaddress.h>
+#include<tqstringlist.h>
+#include<tqptrlist.h>
+#include<tqtimer.h>
+#include<tqguardedptr.h>
+#include<tqsocketdevice.h>
+#include<tqsocketnotifier.h>
#ifdef Q_OS_UNIX
#include<sys/types.h>
@@ -49,20 +49,20 @@
//----------------------------------------------------------------------------
// SocksUDP
//----------------------------------------------------------------------------
-static QByteArray sp_create_udp(const QString &host, Q_UINT16 port, const QByteArray &buf)
+static TQByteArray sp_create_udp(const TQString &host, Q_UINT16 port, const TQByteArray &buf)
{
// detect for IP addresses
- //QHostAddress addr;
+ //TQHostAddress addr;
//if(addr.setAddress(host))
// return sp_set_request(addr, port, cmd1);
- QCString h = host.utf8();
+ TQCString h = host.utf8();
h.truncate(255);
- h = QString::fromUtf8(h).utf8(); // delete any partial characters?
+ h = TQString::fromUtf8(h).utf8(); // delete any partial characters?
int hlen = h.length();
int at = 0;
- QByteArray a(4);
+ TQByteArray a(4);
a[at++] = 0x00; // reserved
a[at++] = 0x00; // reserved
a[at++] = 0x00; // frag
@@ -88,19 +88,19 @@ static QByteArray sp_create_udp(const QString &host, Q_UINT16 port, const QByteA
struct SPS_UDP
{
- QString host;
+ TQString host;
Q_UINT16 port;
- QByteArray data;
+ TQByteArray data;
};
-static int sp_read_udp(QByteArray *from, SPS_UDP *s)
+static int sp_read_udp(TQByteArray *from, SPS_UDP *s)
{
int full_len = 4;
if((int)from->size() < full_len)
return 0;
- QString host;
- QHostAddress addr;
+ TQString host;
+ TQHostAddress addr;
unsigned char atype = from->at(3);
if(atype == 0x01) {
@@ -120,9 +120,9 @@ static int sp_read_udp(QByteArray *from, SPS_UDP *s)
full_len += host_len;
if((int)from->size() < full_len)
return 0;
- QCString cs(host_len+1);
+ TQCString cs(host_len+1);
memcpy(cs.data(), from->data() + 5, host_len);
- host = QString::fromLatin1(cs);
+ host = TQString::fromLatin1(cs);
}
else if(atype == 0x04) {
full_len += 16;
@@ -152,24 +152,24 @@ static int sp_read_udp(QByteArray *from, SPS_UDP *s)
class SocksUDP::Private
{
public:
- QSocketDevice *sd;
- QSocketNotifier *sn;
+ TQSocketDevice *sd;
+ TQSocketNotifier *sn;
SocksClient *sc;
- QHostAddress routeAddr;
+ TQHostAddress routeAddr;
int routePort;
- QString host;
+ TQString host;
int port;
};
-SocksUDP::SocksUDP(SocksClient *sc, const QString &host, int port, const QHostAddress &routeAddr, int routePort)
-:QObject(sc)
+SocksUDP::SocksUDP(SocksClient *sc, const TQString &host, int port, const TQHostAddress &routeAddr, int routePort)
+:TQObject(sc)
{
d = new Private;
d->sc = sc;
- d->sd = new QSocketDevice(QSocketDevice::Datagram);
+ d->sd = new TQSocketDevice(TQSocketDevice::Datagram);
d->sd->setBlocking(false);
- d->sn = new QSocketNotifier(d->sd->socket(), QSocketNotifier::Read);
- connect(d->sn, SIGNAL(activated(int)), SLOT(sn_activated(int)));
+ d->sn = new TQSocketNotifier(d->sd->socket(), TQSocketNotifier::Read);
+ connect(d->sn, TQT_SIGNAL(activated(int)), TQT_SLOT(sn_activated(int)));
d->host = host;
d->port = port;
d->routeAddr = routeAddr;
@@ -183,15 +183,15 @@ SocksUDP::~SocksUDP()
delete d;
}
-void SocksUDP::change(const QString &host, int port)
+void SocksUDP::change(const TQString &host, int port)
{
d->host = host;
d->port = port;
}
-void SocksUDP::write(const QByteArray &data)
+void SocksUDP::write(const TQByteArray &data)
{
- QByteArray buf = sp_create_udp(d->host, d->port, data);
+ TQByteArray buf = sp_create_udp(d->host, d->port, data);
d->sd->setBlocking(true);
d->sd->writeBlock(buf.data(), buf.size(), d->routeAddr, d->routePort);
d->sd->setBlocking(false);
@@ -199,7 +199,7 @@ void SocksUDP::write(const QByteArray &data)
void SocksUDP::sn_activated(int)
{
- QByteArray buf(8192);
+ TQByteArray buf(8192);
int actual = d->sd->readBlock(buf.data(), buf.size());
buf.resize(actual);
packetReady(buf);
@@ -222,9 +222,9 @@ void SocksUDP::sn_activated(int)
// SPSS = socks packet server struct
// Version
-static QByteArray spc_set_version()
+static TQByteArray spc_set_version()
{
- QByteArray ver(4);
+ TQByteArray ver(4);
ver[0] = 0x05; // socks version 5
ver[1] = 0x02; // number of methods
ver[2] = 0x00; // no-auth
@@ -232,9 +232,9 @@ static QByteArray spc_set_version()
return ver;
}
-static QByteArray sps_set_version(int method)
+static TQByteArray sps_set_version(int method)
{
- QByteArray ver(2);
+ TQByteArray ver(2);
ver[0] = 0x05;
ver[1] = method;
return ver;
@@ -243,10 +243,10 @@ static QByteArray sps_set_version(int method)
struct SPCS_VERSION
{
unsigned char version;
- QByteArray methodList;
+ TQByteArray methodList;
};
-static int spc_get_version(QByteArray *from, SPCS_VERSION *s)
+static int spc_get_version(TQByteArray *from, SPCS_VERSION *s)
{
if(from->size() < 1)
return 0;
@@ -259,7 +259,7 @@ static int spc_get_version(QByteArray *from, SPCS_VERSION *s)
return -1;
if(from->size() < 2 + num)
return 0;
- QByteArray a = ByteStream::takeArray(from, 2+num);
+ TQByteArray a = ByteStream::takeArray(from, 2+num);
s->version = a[0];
s->methodList.resize(num);
memcpy(s->methodList.data(), a.data() + 2, num);
@@ -272,18 +272,18 @@ struct SPSS_VERSION
unsigned char method;
};
-static int sps_get_version(QByteArray *from, SPSS_VERSION *s)
+static int sps_get_version(TQByteArray *from, SPSS_VERSION *s)
{
if(from->size() < 2)
return 0;
- QByteArray a = ByteStream::takeArray(from, 2);
+ TQByteArray a = ByteStream::takeArray(from, 2);
s->version = a[0];
s->method = a[1];
return 1;
}
// authUsername
-static QByteArray spc_set_authUsername(const QCString &user, const QCString &pass)
+static TQByteArray spc_set_authUsername(const TQCString &user, const TQCString &pass)
{
int len1 = user.length();
int len2 = pass.length();
@@ -291,7 +291,7 @@ static QByteArray spc_set_authUsername(const QCString &user, const QCString &pas
len1 = 255;
if(len2 > 255)
len2 = 255;
- QByteArray a(1+1+len1+1+len2);
+ TQByteArray a(1+1+len1+1+len2);
a[0] = 0x01; // username auth version 1
a[1] = len1;
memcpy(a.data() + 2, user.data(), len1);
@@ -300,9 +300,9 @@ static QByteArray spc_set_authUsername(const QCString &user, const QCString &pas
return a;
}
-static QByteArray sps_set_authUsername(bool success)
+static TQByteArray sps_set_authUsername(bool success)
{
- QByteArray a(2);
+ TQByteArray a(2);
a[0] = 0x01;
a[1] = success ? 0x00 : 0xff;
return a;
@@ -310,10 +310,10 @@ static QByteArray sps_set_authUsername(bool success)
struct SPCS_AUTHUSERNAME
{
- QString user, pass;
+ TQString user, pass;
};
-static int spc_get_authUsername(QByteArray *from, SPCS_AUTHUSERNAME *s)
+static int spc_get_authUsername(TQByteArray *from, SPCS_AUTHUSERNAME *s)
{
if(from->size() < 1)
return 0;
@@ -328,15 +328,15 @@ static int spc_get_authUsername(QByteArray *from, SPCS_AUTHUSERNAME *s)
unsigned char plen = from->at(ulen+2);
if((int)from->size() < ulen + plen + 3)
return 0;
- QByteArray a = ByteStream::takeArray(from, ulen + plen + 3);
+ TQByteArray a = ByteStream::takeArray(from, ulen + plen + 3);
- QCString user, pass;
+ TQCString user, pass;
user.resize(ulen+1);
pass.resize(plen+1);
memcpy(user.data(), a.data()+2, ulen);
memcpy(pass.data(), a.data()+ulen+3, plen);
- s->user = QString::fromUtf8(user);
- s->pass = QString::fromUtf8(pass);
+ s->user = TQString::fromUtf8(user);
+ s->pass = TQString::fromUtf8(pass);
return 1;
}
@@ -346,21 +346,21 @@ struct SPSS_AUTHUSERNAME
bool success;
};
-static int sps_get_authUsername(QByteArray *from, SPSS_AUTHUSERNAME *s)
+static int sps_get_authUsername(TQByteArray *from, SPSS_AUTHUSERNAME *s)
{
if(from->size() < 2)
return 0;
- QByteArray a = ByteStream::takeArray(from, 2);
+ TQByteArray a = ByteStream::takeArray(from, 2);
s->version = a[0];
s->success = a[1] == 0 ? true: false;
return 1;
}
// connectRequest
-static QByteArray sp_set_request(const QHostAddress &addr, unsigned short port, unsigned char cmd1)
+static TQByteArray sp_set_request(const TQHostAddress &addr, unsigned short port, unsigned char cmd1)
{
int at = 0;
- QByteArray a(4);
+ TQByteArray a(4);
a[at++] = 0x05; // socks version 5
a[at++] = cmd1;
a[at++] = 0x00; // reserved
@@ -374,11 +374,11 @@ static QByteArray sp_set_request(const QHostAddress &addr, unsigned short port,
else {
a[at++] = 0x04;
Q_UINT8 a6[16];
- QStringList s6 = QStringList::split(':', addr.toString(), true);
+ TQStringList s6 = TQStringList::split(':', addr.toString(), true);
int at = 0;
Q_UINT16 c;
bool ok;
- for(QStringList::ConstIterator it = s6.begin(); it != s6.end(); ++it) {
+ for(TQStringList::ConstIterator it = s6.begin(); it != s6.end(); ++it) {
c = (*it).toInt(&ok, 16);
a6[at++] = (c >> 8);
a6[at++] = c & 0xff;
@@ -396,20 +396,20 @@ static QByteArray sp_set_request(const QHostAddress &addr, unsigned short port,
return a;
}
-static QByteArray sp_set_request(const QString &host, Q_UINT16 port, unsigned char cmd1)
+static TQByteArray sp_set_request(const TQString &host, Q_UINT16 port, unsigned char cmd1)
{
// detect for IP addresses
- QHostAddress addr;
+ TQHostAddress addr;
if(addr.setAddress(host))
return sp_set_request(addr, port, cmd1);
- QCString h = host.utf8();
+ TQCString h = host.utf8();
h.truncate(255);
- h = QString::fromUtf8(h).utf8(); // delete any partial characters?
+ h = TQString::fromUtf8(h).utf8(); // delete any partial characters?
int hlen = h.length();
int at = 0;
- QByteArray a(4);
+ TQByteArray a(4);
a[at++] = 0x05; // socks version 5
a[at++] = cmd1;
a[at++] = 0x00; // reserved
@@ -434,19 +434,19 @@ struct SPS_CONNREQ
unsigned char version;
unsigned char cmd;
int address_type;
- QString host;
- QHostAddress addr;
+ TQString host;
+ TQHostAddress addr;
Q_UINT16 port;
};
-static int sp_get_request(QByteArray *from, SPS_CONNREQ *s)
+static int sp_get_request(TQByteArray *from, SPS_CONNREQ *s)
{
int full_len = 4;
if((int)from->size() < full_len)
return 0;
- QString host;
- QHostAddress addr;
+ TQString host;
+ TQHostAddress addr;
unsigned char atype = from->at(3);
if(atype == 0x01) {
@@ -465,9 +465,9 @@ static int sp_get_request(QByteArray *from, SPS_CONNREQ *s)
full_len += host_len;
if((int)from->size() < full_len)
return 0;
- QCString cs(host_len+1);
+ TQCString cs(host_len+1);
memcpy(cs.data(), from->data() + 5, host_len);
- host = QString::fromLatin1(cs);
+ host = TQString::fromLatin1(cs);
}
else if(atype == 0x04) {
full_len += 16;
@@ -482,7 +482,7 @@ static int sp_get_request(QByteArray *from, SPS_CONNREQ *s)
if((int)from->size() < full_len)
return 0;
- QByteArray a = ByteStream::takeArray(from, full_len);
+ TQByteArray a = ByteStream::takeArray(from, full_len);
Q_UINT16 p;
memcpy(&p, a.data() + full_len - 2, 2);
@@ -505,29 +505,29 @@ public:
Private() {}
BSocket sock;
- QString host;
+ TQString host;
int port;
- QString user, pass;
- QString real_host;
+ TQString user, pass;
+ TQString real_host;
int real_port;
- QByteArray recvBuf;
+ TQByteArray recvBuf;
bool active;
int step;
int authMethod;
bool incoming, waiting;
- QString rhost;
+ TQString rhost;
int rport;
int pending;
bool udp;
- QString udpAddr;
+ TQString udpAddr;
int udpPort;
};
-SocksClient::SocksClient(QObject *parent)
+SocksClient::SocksClient(TQObject *parent)
:ByteStream(parent)
{
init();
@@ -535,7 +535,7 @@ SocksClient::SocksClient(QObject *parent)
d->incoming = false;
}
-SocksClient::SocksClient(int s, QObject *parent)
+SocksClient::SocksClient(int s, TQObject *parent)
:ByteStream(parent)
{
init();
@@ -548,12 +548,12 @@ SocksClient::SocksClient(int s, QObject *parent)
void SocksClient::init()
{
d = new Private;
- connect(&d->sock, SIGNAL(connected()), SLOT(sock_connected()));
- connect(&d->sock, SIGNAL(connectionClosed()), SLOT(sock_connectionClosed()));
- connect(&d->sock, SIGNAL(delayedCloseFinished()), SLOT(sock_delayedCloseFinished()));
- connect(&d->sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
- connect(&d->sock, SIGNAL(bytesWritten(int)), SLOT(sock_bytesWritten(int)));
- connect(&d->sock, SIGNAL(error(int)), SLOT(sock_error(int)));
+ connect(&d->sock, TQT_SIGNAL(connected()), TQT_SLOT(sock_connected()));
+ connect(&d->sock, TQT_SIGNAL(connectionClosed()), TQT_SLOT(sock_connectionClosed()));
+ connect(&d->sock, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(sock_delayedCloseFinished()));
+ connect(&d->sock, TQT_SIGNAL(readyRead()), TQT_SLOT(sock_readyRead()));
+ connect(&d->sock, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sock_bytesWritten(int)));
+ connect(&d->sock, TQT_SIGNAL(error(int)), TQT_SLOT(sock_error(int)));
reset(true);
}
@@ -582,13 +582,13 @@ bool SocksClient::isIncoming() const
return d->incoming;
}
-void SocksClient::setAuth(const QString &user, const QString &pass)
+void SocksClient::setAuth(const TQString &user, const TQString &pass)
{
d->user = user;
d->pass = pass;
}
-void SocksClient::connectToHost(const QString &proxyHost, int proxyPort, const QString &host, int port, bool udpMode)
+void SocksClient::connectToHost(const TQString &proxyHost, int proxyPort, const TQString &host, int port, bool udpMode)
{
reset(true);
@@ -620,19 +620,19 @@ void SocksClient::close()
reset();
}
-void SocksClient::writeData(const QByteArray &buf)
+void SocksClient::writeData(const TQByteArray &buf)
{
d->pending += buf.size();
d->sock.write(buf);
}
-void SocksClient::write(const QByteArray &buf)
+void SocksClient::write(const TQByteArray &buf)
{
if(d->active && !d->udp)
d->sock.write(buf);
}
-QByteArray SocksClient::read(int bytes)
+TQByteArray SocksClient::read(int bytes)
{
return ByteStream::read(bytes);
}
@@ -681,7 +681,7 @@ void SocksClient::sock_delayedCloseFinished()
void SocksClient::sock_readyRead()
{
- QByteArray block = d->sock.read();
+ TQByteArray block = d->sock.read();
if(!d->active) {
if(d->incoming)
@@ -697,7 +697,7 @@ void SocksClient::sock_readyRead()
}
}
-void SocksClient::processOutgoing(const QByteArray &block)
+void SocksClient::processOutgoing(const TQByteArray &block)
{
#ifdef PROX_DEBUG
// show hex
@@ -726,7 +726,7 @@ void SocksClient::processOutgoing(const QByteArray &block)
return;
}
- QString str;
+ TQString str;
if(s.method == 0x00) {
str = "None";
d->authMethod = AuthNone;
@@ -818,7 +818,7 @@ void SocksClient::processOutgoing(const QByteArray &block)
d->active = true;
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
connected();
if(!self)
return;
@@ -839,11 +839,11 @@ void SocksClient::do_request()
#endif
d->step = StepRequest;
int cmd = d->udp ? REQ_UDPASSOCIATE : REQ_CONNECT;
- QByteArray buf;
+ TQByteArray buf;
if(!d->real_host.isEmpty())
buf = sp_set_request(d->real_host, d->real_port, cmd);
else
- buf = sp_set_request(QHostAddress(), 0, cmd);
+ buf = sp_set_request(TQHostAddress(), 0, cmd);
writeData(buf);
}
@@ -886,7 +886,7 @@ void SocksClient::serve()
continueIncoming();
}
-void SocksClient::processIncoming(const QByteArray &block)
+void SocksClient::processIncoming(const TQByteArray &block)
{
#ifdef PROX_DEBUG
// show hex
@@ -1045,7 +1045,7 @@ void SocksClient::grantConnect()
}
}
-void SocksClient::grantUDPAssociate(const QString &relayHost, int relayPort)
+void SocksClient::grantUDPAssociate(const TQString &relayHost, int relayPort)
{
if(d->step != StepRequest || !d->waiting)
return;
@@ -1063,7 +1063,7 @@ void SocksClient::grantUDPAssociate(const QString &relayHost, int relayPort)
d->recvBuf.resize(0);
}
-QHostAddress SocksClient::peerAddress() const
+TQHostAddress SocksClient::peerAddress() const
{
return d->sock.peerAddress();
}
@@ -1073,7 +1073,7 @@ Q_UINT16 SocksClient::peerPort() const
return d->sock.peerPort();
}
-QString SocksClient::udpAddress() const
+TQString SocksClient::udpAddress() const
{
return d->udpAddr;
}
@@ -1083,7 +1083,7 @@ Q_UINT16 SocksClient::udpPort() const
return d->udpPort;
}
-SocksUDP *SocksClient::createUDP(const QString &host, int port, const QHostAddress &routeAddr, int routePort)
+SocksUDP *SocksClient::createUDP(const TQString &host, int port, const TQHostAddress &routeAddr, int routePort)
{
return new SocksUDP(this, host, port, routeAddr, routePort);
}
@@ -1097,18 +1097,18 @@ public:
Private() {}
ServSock serv;
- QPtrList<SocksClient> incomingConns;
- QSocketDevice *sd;
- QSocketNotifier *sn;
+ TQPtrList<SocksClient> incomingConns;
+ TQSocketDevice *sd;
+ TQSocketNotifier *sn;
};
-SocksServer::SocksServer(QObject *parent)
-:QObject(parent)
+SocksServer::SocksServer(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
d->sd = 0;
d->sn = 0;
- connect(&d->serv, SIGNAL(connectionReady(int)), SLOT(connectionReady(int)));
+ connect(&d->serv, TQT_SIGNAL(connectionReady(int)), TQT_SLOT(connectionReady(int)));
}
SocksServer::~SocksServer()
@@ -1130,16 +1130,16 @@ bool SocksServer::listen(Q_UINT16 port, bool udp)
if(!d->serv.listen(port))
return false;
if(udp) {
- d->sd = new QSocketDevice(QSocketDevice::Datagram);
+ d->sd = new TQSocketDevice(TQSocketDevice::Datagram);
d->sd->setBlocking(false);
- if(!d->sd->bind(QHostAddress(), port)) {
+ if(!d->sd->bind(TQHostAddress(), port)) {
delete d->sd;
d->sd = 0;
d->serv.stop();
return false;
}
- d->sn = new QSocketNotifier(d->sd->socket(), QSocketNotifier::Read);
- connect(d->sn, SIGNAL(activated(int)), SLOT(sn_activated(int)));
+ d->sn = new TQSocketNotifier(d->sd->socket(), TQSocketNotifier::Read);
+ connect(d->sn, TQT_SIGNAL(activated(int)), TQT_SLOT(sn_activated(int)));
}
return true;
}
@@ -1158,7 +1158,7 @@ int SocksServer::port() const
return d->serv.port();
}
-QHostAddress SocksServer::address() const
+TQHostAddress SocksServer::address() const
{
return d->serv.address();
}
@@ -1172,15 +1172,15 @@ SocksClient *SocksServer::takeIncoming()
d->incomingConns.removeRef(c);
// we don't care about errors anymore
- disconnect(c, SIGNAL(error(int)), this, SLOT(connectionError()));
+ disconnect(c, TQT_SIGNAL(error(int)), this, TQT_SLOT(connectionError()));
// don't serve the connection until the event loop, to give the caller a chance to map signals
- QTimer::singleShot(0, c, SLOT(serve()));
+ TQTimer::singleShot(0, c, TQT_SLOT(serve()));
return c;
}
-void SocksServer::writeUDP(const QHostAddress &addr, int port, const QByteArray &data)
+void SocksServer::writeUDP(const TQHostAddress &addr, int port, const TQByteArray &data)
{
if(d->sd) {
d->sd->setBlocking(true);
@@ -1192,7 +1192,7 @@ void SocksServer::writeUDP(const QHostAddress &addr, int port, const QByteArray
void SocksServer::connectionReady(int s)
{
SocksClient *c = new SocksClient(s, this);
- connect(c, SIGNAL(error(int)), this, SLOT(connectionError()));
+ connect(c, TQT_SIGNAL(error(int)), this, TQT_SLOT(connectionError()));
d->incomingConns.append(c);
incomingReady();
}
@@ -1206,10 +1206,10 @@ void SocksServer::connectionError()
void SocksServer::sn_activated(int)
{
- QByteArray buf(8192);
+ TQByteArray buf(8192);
int actual = d->sd->readBlock(buf.data(), buf.size());
buf.resize(actual);
- QHostAddress pa = d->sd->peerAddress();
+ TQHostAddress pa = d->sd->peerAddress();
int pp = d->sd->peerPort();
SPS_UDP s;
int r = sp_read_udp(&buf, &s);
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/socks.h b/kopete/protocols/jabber/libiris/cutestuff/network/socks.h
index b10361dd..507caf5f 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/socks.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/socks.h
@@ -35,11 +35,11 @@ class SocksUDP : public QObject
public:
~SocksUDP();
- void change(const QString &host, int port);
- void write(const QByteArray &data);
+ void change(const TQString &host, int port);
+ void write(const TQByteArray &data);
signals:
- void packetReady(const QByteArray &data);
+ void packetReady(const TQByteArray &data);
private slots:
void sn_activated(int);
@@ -49,7 +49,7 @@ private:
Private *d;
friend class SocksClient;
- SocksUDP(SocksClient *sc, const QString &host, int port, const QHostAddress &routeAddr, int routePort);
+ SocksUDP(SocksClient *sc, const TQString &host, int port, const TQHostAddress &routeAddr, int routePort);
};
class SocksClient : public ByteStream
@@ -59,39 +59,39 @@ public:
enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth };
enum Method { AuthNone=0x0001, AuthUsername=0x0002 };
enum Request { ReqConnect, ReqUDPAssociate };
- SocksClient(QObject *parent=0);
- SocksClient(int, QObject *parent=0);
+ SocksClient(TQObject *parent=0);
+ SocksClient(int, TQObject *parent=0);
~SocksClient();
bool isIncoming() const;
// outgoing
- void setAuth(const QString &user, const QString &pass="");
- void connectToHost(const QString &proxyHost, int proxyPort, const QString &host, int port, bool udpMode=false);
+ void setAuth(const TQString &user, const TQString &pass="");
+ void connectToHost(const TQString &proxyHost, int proxyPort, const TQString &host, int port, bool udpMode=false);
// incoming
void chooseMethod(int);
void authGrant(bool);
void requestDeny();
void grantConnect();
- void grantUDPAssociate(const QString &relayHost, int relayPort);
+ void grantUDPAssociate(const TQString &relayHost, int relayPort);
// from ByteStream
bool isOpen() const;
void close();
- void write(const QByteArray &);
- QByteArray read(int bytes=0);
+ void write(const TQByteArray &);
+ TQByteArray read(int bytes=0);
int bytesAvailable() const;
int bytesToWrite() const;
// remote address
- QHostAddress peerAddress() const;
+ TQHostAddress peerAddress() const;
Q_UINT16 peerPort() const;
// udp
- QString udpAddress() const;
+ TQString udpAddress() const;
Q_UINT16 udpPort() const;
- SocksUDP *createUDP(const QString &host, int port, const QHostAddress &routeAddr, int routePort);
+ SocksUDP *createUDP(const TQString &host, int port, const TQHostAddress &routeAddr, int routePort);
signals:
// outgoing
@@ -99,8 +99,8 @@ signals:
// incoming
void incomingMethods(int);
- void incomingAuth(const QString &user, const QString &pass);
- void incomingConnectRequest(const QString &host, int port);
+ void incomingAuth(const TQString &user, const TQString &pass);
+ void incomingConnectRequest(const TQString &host, int port);
void incomingUDPAssociateRequest();
private slots:
@@ -119,31 +119,31 @@ private:
void init();
void reset(bool clear=false);
void do_request();
- void processOutgoing(const QByteArray &);
- void processIncoming(const QByteArray &);
+ void processOutgoing(const TQByteArray &);
+ void processIncoming(const TQByteArray &);
void continueIncoming();
- void writeData(const QByteArray &a);
+ void writeData(const TQByteArray &a);
};
class SocksServer : public QObject
{
Q_OBJECT
public:
- SocksServer(QObject *parent=0);
+ SocksServer(TQObject *parent=0);
~SocksServer();
bool isActive() const;
bool listen(Q_UINT16 port, bool udp=false);
void stop();
int port() const;
- QHostAddress address() const;
+ TQHostAddress address() const;
SocksClient *takeIncoming();
- void writeUDP(const QHostAddress &addr, int port, const QByteArray &data);
+ void writeUDP(const TQHostAddress &addr, int port, const TQByteArray &data);
signals:
void incomingReady();
- void incomingUDP(const QString &host, int port, const QHostAddress &addr, int sourcePort, const QByteArray &data);
+ void incomingUDP(const TQString &host, int port, const TQHostAddress &addr, int sourcePort, const TQByteArray &data);
private slots:
void connectionReady(int);
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp
index 851873f2..d462a17e 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp
@@ -20,9 +20,9 @@
#include"srvresolver.h"
-#include<qcstring.h>
-#include<qtimer.h>
-#include<qdns.h>
+#include<tqcstring.h>
+#include<tqtimer.h>
+#include<tqdns.h>
#include"safedelete.h"
#ifndef NO_NDNS
@@ -31,14 +31,14 @@
// CS_NAMESPACE_BEGIN
-static void sortSRVList(QValueList<QDns::Server> &list)
+static void sortSRVList(TQValueList<TQDns::Server> &list)
{
- QValueList<QDns::Server> tmp = list;
+ TQValueList<TQDns::Server> tmp = list;
list.clear();
while(!tmp.isEmpty()) {
- QValueList<QDns::Server>::Iterator p = tmp.end();
- for(QValueList<QDns::Server>::Iterator it = tmp.begin(); it != tmp.end(); ++it) {
+ TQValueList<TQDns::Server>::Iterator p = tmp.end();
+ for(TQValueList<TQDns::Server>::Iterator it = tmp.begin(); it != tmp.end(); ++it) {
if(p == tmp.end())
p = it;
else {
@@ -60,34 +60,34 @@ class SrvResolver::Private
public:
Private() {}
- QDns *qdns;
+ TQDns *qdns;
#ifndef NO_NDNS
NDns ndns;
#endif
bool failed;
- QHostAddress resultAddress;
+ TQHostAddress resultAddress;
Q_UINT16 resultPort;
bool srvonly;
- QString srv;
- QValueList<QDns::Server> servers;
+ TQString srv;
+ TQValueList<TQDns::Server> servers;
bool aaaa;
- QTimer t;
+ TQTimer t;
SafeDelete sd;
};
-SrvResolver::SrvResolver(QObject *parent)
-:QObject(parent)
+SrvResolver::SrvResolver(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
d->qdns = 0;
#ifndef NO_NDNS
- connect(&d->ndns, SIGNAL(resultsReady()), SLOT(ndns_done()));
+ connect(&d->ndns, TQT_SIGNAL(resultsReady()), TQT_SLOT(ndns_done()));
#endif
- connect(&d->t, SIGNAL(timeout()), SLOT(t_timeout()));
+ connect(&d->t, TQT_SIGNAL(timeout()), TQT_SLOT(t_timeout()));
stop();
}
@@ -97,31 +97,31 @@ SrvResolver::~SrvResolver()
delete d;
}
-void SrvResolver::resolve(const QString &server, const QString &type, const QString &proto)
+void SrvResolver::resolve(const TQString &server, const TQString &type, const TQString &proto)
{
stop();
d->failed = false;
d->srvonly = false;
- d->srv = QString("_") + type + "._" + proto + '.' + server;
+ d->srv = TQString("_") + type + "._" + proto + '.' + server;
d->t.start(15000, true);
d->qdns = new QDns;
- connect(d->qdns, SIGNAL(resultsReady()), SLOT(qdns_done()));
- d->qdns->setRecordType(QDns::Srv);
+ connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(qdns_done()));
+ d->qdns->setRecordType(TQDns::Srv);
d->qdns->setLabel(d->srv);
}
-void SrvResolver::resolveSrvOnly(const QString &server, const QString &type, const QString &proto)
+void SrvResolver::resolveSrvOnly(const TQString &server, const TQString &type, const TQString &proto)
{
stop();
d->failed = false;
d->srvonly = true;
- d->srv = QString("_") + type + "._" + proto + '.' + server;
+ d->srv = TQString("_") + type + "._" + proto + '.' + server;
d->t.start(15000, true);
d->qdns = new QDns;
- connect(d->qdns, SIGNAL(resultsReady()), SLOT(qdns_done()));
- d->qdns->setRecordType(QDns::Srv);
+ connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(qdns_done()));
+ d->qdns->setRecordType(TQDns::Srv);
d->qdns->setLabel(d->srv);
}
@@ -146,7 +146,7 @@ void SrvResolver::stop()
if(d->ndns.isBusy())
d->ndns.stop();
#endif
- d->resultAddress = QHostAddress();
+ d->resultAddress = TQHostAddress();
d->resultPort = 0;
d->servers.clear();
d->srv = "";
@@ -165,7 +165,7 @@ bool SrvResolver::isBusy() const
return false;
}
-QValueList<QDns::Server> SrvResolver::servers() const
+TQValueList<TQDns::Server> SrvResolver::servers() const
{
return d->servers;
}
@@ -175,7 +175,7 @@ bool SrvResolver::failed() const
return d->failed;
}
-QHostAddress SrvResolver::resultAddress() const
+TQHostAddress SrvResolver::resultAddress() const
{
return d->resultAddress;
}
@@ -191,11 +191,11 @@ void SrvResolver::tryNext()
d->ndns.resolve(d->servers.first().name);
#else
d->qdns = new QDns;
- connect(d->qdns, SIGNAL(resultsReady()), SLOT(ndns_done()));
+ connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(ndns_done()));
if(d->aaaa)
- d->qdns->setRecordType(QDns::Aaaa); // IPv6
+ d->qdns->setRecordType(TQDns::Aaaa); // IPv6
else
- d->qdns->setRecordType(QDns::A); // IPv4
+ d->qdns->setRecordType(TQDns::A); // IPv4
d->qdns->setLabel(d->servers.first().name);
#endif
}
@@ -213,8 +213,8 @@ void SrvResolver::qdns_done()
SafeDeleteLock s(&d->sd);
// grab the server list and destroy the qdns object
- QValueList<QDns::Server> list;
- if(d->qdns->recordType() == QDns::Srv)
+ TQValueList<TQDns::Server> list;
+ if(d->qdns->recordType() == TQDns::Srv)
list = d->qdns->servers();
d->qdns->disconnect(this);
d->sd.deleteLater(d->qdns);
@@ -247,7 +247,7 @@ void SrvResolver::ndns_done()
d->servers.remove(d->servers.begin());
if(r) {
- d->resultAddress = QHostAddress(d->ndns.result());
+ d->resultAddress = TQHostAddress(d->ndns.result());
d->resultPort = port;
resultsReady();
}
@@ -273,8 +273,8 @@ void SrvResolver::ndns_done()
SafeDeleteLock s(&d->sd);
// grab the address list and destroy the qdns object
- QValueList<QHostAddress> list;
- if(d->qdns->recordType() == QDns::A || d->qdns->recordType() == QDns::Aaaa)
+ TQValueList<TQHostAddress> list;
+ if(d->qdns->recordType() == TQDns::A || d->qdns->recordType() == TQDns::Aaaa)
list = d->qdns->addresses();
d->qdns->disconnect(this);
d->sd.deleteLater(d->qdns);
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h
index fb5aa2b1..400639c1 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h
@@ -21,8 +21,8 @@
#ifndef CS_SRVRESOLVER_H
#define CS_SRVRESOLVER_H
-#include<qvaluelist.h>
-#include<qdns.h>
+#include<tqvaluelist.h>
+#include<tqdns.h>
// CS_NAMESPACE_BEGIN
@@ -30,19 +30,19 @@ class SrvResolver : public QObject
{
Q_OBJECT
public:
- SrvResolver(QObject *parent=0);
+ SrvResolver(TQObject *parent=0);
~SrvResolver();
- void resolve(const QString &server, const QString &type, const QString &proto);
- void resolveSrvOnly(const QString &server, const QString &type, const QString &proto);
+ void resolve(const TQString &server, const TQString &type, const TQString &proto);
+ void resolveSrvOnly(const TQString &server, const TQString &type, const TQString &proto);
void next();
void stop();
bool isBusy() const;
- QValueList<QDns::Server> servers() const;
+ TQValueList<TQDns::Server> servers() const;
bool failed() const;
- QHostAddress resultAddress() const;
+ TQHostAddress resultAddress() const;
Q_UINT16 resultPort() const;
signals:
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp
index c1483196..06df3f73 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp
@@ -33,21 +33,21 @@
//! ...
//!
//! // encode a block of data into base64
-//! QByteArray block(1024);
-//! QByteArray enc = Base64::encode(block);
+//! TQByteArray block(1024);
+//! TQByteArray enc = Base64::encode(block);
//!
//! \endcode
//!
//! Encodes array \a s and returns the result.
-QByteArray Base64::encode(const QByteArray &s)
+TQByteArray Base64::encode(const TQByteArray &s)
{
int i;
int len = s.size();
char tbl[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
int a, b, c;
- QByteArray p((len+2)/3*4);
+ TQByteArray p((len+2)/3*4);
int at = 0;
for( i = 0; i < len; i += 3 ) {
a = ((unsigned char)s[i] & 3) << 4;
@@ -74,10 +74,10 @@ QByteArray Base64::encode(const QByteArray &s)
//!
//! Decodes array \a s and returns the result.
-QByteArray Base64::decode(const QByteArray &s)
+TQByteArray Base64::decode(const TQByteArray &s)
{
// return value
- QByteArray p;
+ TQByteArray p;
// -1 specifies invalid
// 64 specifies eof
@@ -140,41 +140,41 @@ QByteArray Base64::decode(const QByteArray &s)
//!
//! Encodes array \a a and returns the result as a string.
-QString Base64::arrayToString(const QByteArray &a)
+TQString Base64::arrayToString(const TQByteArray &a)
{
- QByteArray b = encode(a);
- QCString c;
+ TQByteArray b = encode(a);
+ TQCString c;
c.resize(b.size()+1);
memcpy(c.data(), b.data(), b.size());
- return QString::fromLatin1(c);
+ return TQString::fromLatin1(c);
}
//!
//! Decodes string \a s and returns the result as an array.
-QByteArray Base64::stringToArray(const QString &s)
+TQByteArray Base64::stringToArray(const TQString &s)
{
if(s.isEmpty())
- return QByteArray();
+ return TQByteArray();
// Unfold data
- QString us(s);
+ TQString us(s);
us.remove('\n');
const char *c = us.latin1();
int len = strlen(c);
- QByteArray b(len);
+ TQByteArray b(len);
memcpy(b.data(), c, len);
- QByteArray a = decode(b);
+ TQByteArray a = decode(b);
return a;
}
//!
//! Encodes string \a s and returns the result as a string.
-QString Base64::encodeString(const QString &s)
+TQString Base64::encodeString(const TQString &s)
{
- QCString c = s.utf8();
+ TQCString c = s.utf8();
int len = c.length();
- QByteArray b(len);
+ TQByteArray b(len);
memcpy(b.data(), c.data(), len);
return arrayToString(b);
}
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/base64.h b/kopete/protocols/jabber/libiris/cutestuff/util/base64.h
index 3aae2ba6..eaa2ff5b 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/base64.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/base64.h
@@ -21,18 +21,18 @@
#ifndef CS_BASE64_H
#define CS_BASE64_H
-#include<qstring.h>
+#include<tqstring.h>
// CS_NAMESPACE_BEGIN
class Base64
{
public:
- static QByteArray encode(const QByteArray &);
- static QByteArray decode(const QByteArray &);
- static QString arrayToString(const QByteArray &);
- static QByteArray stringToArray(const QString &);
- static QString encodeString(const QString &);
+ static TQByteArray encode(const TQByteArray &);
+ static TQByteArray decode(const TQByteArray &);
+ static TQString arrayToString(const TQByteArray &);
+ static TQByteArray stringToArray(const TQString &);
+ static TQString encodeString(const TQString &);
};
// CS_NAMESPACE_END
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp
index 068e39a0..e78c2f9a 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp
@@ -35,7 +35,7 @@
//!
//! The signals connectionClosed(), delayedCloseFinished(), readyRead(),
//! bytesWritten(), and error() serve the exact same function as those from
-//! <A HREF="http://doc.trolltech.com/3.1/qsocket.html">QSocket</A>.
+//! <A HREF="http://doc.trolltech.com/3.1/tqsocket.html">TQSocket</A>.
//!
//! The simplest way to create a ByteStream is to reimplement isOpen(), close(),
//! and tryWrite(). Call appendRead() whenever you want to make data available for
@@ -59,13 +59,13 @@ class ByteStream::Private
public:
Private() {}
- QByteArray readBuf, writeBuf;
+ TQByteArray readBuf, writeBuf;
};
//!
//! Constructs a ByteStream object with parent \a parent.
-ByteStream::ByteStream(QObject *parent)
-:QObject(parent)
+ByteStream::ByteStream(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
}
@@ -95,7 +95,7 @@ void ByteStream::close()
//!
//! Writes array \a a to the stream.
-void ByteStream::write(const QByteArray &a)
+void ByteStream::write(const TQByteArray &a)
{
if(!isOpen())
return;
@@ -109,7 +109,7 @@ void ByteStream::write(const QByteArray &a)
//!
//! Reads bytes \a bytes of data from the stream and returns them as an array. If \a bytes is 0, then
//! \a read will return all available data.
-QByteArray ByteStream::read(int bytes)
+TQByteArray ByteStream::read(int bytes)
{
return takeRead(bytes);
}
@@ -130,9 +130,9 @@ int ByteStream::bytesToWrite() const
//!
//! Writes string \a cs to the stream.
-void ByteStream::write(const QCString &cs)
+void ByteStream::write(const TQCString &cs)
{
- QByteArray block(cs.length());
+ TQByteArray block(cs.length());
memcpy(block.data(), cs.data(), block.size());
write(block);
}
@@ -153,14 +153,14 @@ void ByteStream::clearWriteBuffer()
//!
//! Appends \a block to the end of the read buffer.
-void ByteStream::appendRead(const QByteArray &block)
+void ByteStream::appendRead(const TQByteArray &block)
{
appendArray(&d->readBuf, block);
}
//!
//! Appends \a block to the end of the write buffer.
-void ByteStream::appendWrite(const QByteArray &block)
+void ByteStream::appendWrite(const TQByteArray &block)
{
appendArray(&d->writeBuf, block);
}
@@ -169,7 +169,7 @@ void ByteStream::appendWrite(const QByteArray &block)
//! Returns \a size bytes from the start of the read buffer.
//! If \a size is 0, then all available data will be returned.
//! If \a del is TRUE, then the bytes are also removed.
-QByteArray ByteStream::takeRead(int size, bool del)
+TQByteArray ByteStream::takeRead(int size, bool del)
{
return takeArray(&d->readBuf, size, del);
}
@@ -178,21 +178,21 @@ QByteArray ByteStream::takeRead(int size, bool del)
//! Returns \a size bytes from the start of the write buffer.
//! If \a size is 0, then all available data will be returned.
//! If \a del is TRUE, then the bytes are also removed.
-QByteArray ByteStream::takeWrite(int size, bool del)
+TQByteArray ByteStream::takeWrite(int size, bool del)
{
return takeArray(&d->writeBuf, size, del);
}
//!
//! Returns a reference to the read buffer.
-QByteArray & ByteStream::readBuf()
+TQByteArray & ByteStream::readBuf()
{
return d->readBuf;
}
//!
//! Returns a reference to the write buffer.
-QByteArray & ByteStream::writeBuf()
+TQByteArray & ByteStream::writeBuf()
{
return d->writeBuf;
}
@@ -207,7 +207,7 @@ int ByteStream::tryWrite()
//!
//! Append array \a b to the end of the array pointed to by \a a.
-void ByteStream::appendArray(QByteArray *a, const QByteArray &b)
+void ByteStream::appendArray(TQByteArray *a, const TQByteArray &b)
{
int oldsize = a->size();
a->resize(oldsize + b.size());
@@ -218,9 +218,9 @@ void ByteStream::appendArray(QByteArray *a, const QByteArray &b)
//! Returns \a size bytes from the start of the array pointed to by \a from.
//! If \a size is 0, then all available data will be returned.
//! If \a del is TRUE, then the bytes are also removed.
-QByteArray ByteStream::takeArray(QByteArray *from, int size, bool del)
+TQByteArray ByteStream::takeArray(TQByteArray *from, int size, bool del)
{
- QByteArray a;
+ TQByteArray a;
if(size == 0) {
a = from->copy();
if(del)
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.h b/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.h
index b90f109d..f10b46a1 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.h
@@ -21,8 +21,8 @@
#ifndef CS_BYTESTREAM_H
#define CS_BYTESTREAM_H
-#include<qobject.h>
-#include<qcstring.h>
+#include<tqobject.h>
+#include<tqcstring.h>
// CS_NAMESPACE_BEGIN
@@ -32,20 +32,20 @@ class ByteStream : public QObject
Q_OBJECT
public:
enum Error { ErrRead, ErrWrite, ErrCustom = 10 };
- ByteStream(QObject *parent=0);
+ ByteStream(TQObject *parent=0);
virtual ~ByteStream()=0;
virtual bool isOpen() const;
virtual void close();
- virtual void write(const QByteArray &);
- virtual QByteArray read(int bytes=0);
+ virtual void write(const TQByteArray &);
+ virtual TQByteArray read(int bytes=0);
virtual int bytesAvailable() const;
virtual int bytesToWrite() const;
- void write(const QCString &);
+ void write(const TQCString &);
- static void appendArray(QByteArray *a, const QByteArray &b);
- static QByteArray takeArray(QByteArray *from, int size=0, bool del=true);
+ static void appendArray(TQByteArray *a, const TQByteArray &b);
+ static TQByteArray takeArray(TQByteArray *from, int size=0, bool del=true);
signals:
void connectionClosed();
@@ -57,12 +57,12 @@ signals:
protected:
void clearReadBuffer();
void clearWriteBuffer();
- void appendRead(const QByteArray &);
- void appendWrite(const QByteArray &);
- QByteArray takeRead(int size=0, bool del=true);
- QByteArray takeWrite(int size=0, bool del=true);
- QByteArray & readBuf();
- QByteArray & writeBuf();
+ void appendRead(const TQByteArray &);
+ void appendWrite(const TQByteArray &);
+ TQByteArray takeRead(int size=0, bool del=true);
+ TQByteArray takeWrite(int size=0, bool del=true);
+ TQByteArray & readBuf();
+ TQByteArray & writeBuf();
virtual int tryWrite();
private:
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/cipher.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/cipher.cpp
index f1581a6f..8f918dde 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/cipher.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/cipher.cpp
@@ -25,9 +25,9 @@
#include"bytestream.h"
#include"qrandom.h"
-static bool lib_encryptArray(const EVP_CIPHER *type, const QByteArray &buf, const QByteArray &key, const QByteArray &iv, bool pad, QByteArray *out)
+static bool lib_encryptArray(const EVP_CIPHER *type, const TQByteArray &buf, const TQByteArray &key, const TQByteArray &iv, bool pad, TQByteArray *out)
{
- QByteArray result(buf.size()+type->block_size);
+ TQByteArray result(buf.size()+type->block_size);
int len;
EVP_CIPHER_CTX c;
@@ -42,7 +42,7 @@ static bool lib_encryptArray(const EVP_CIPHER *type, const QByteArray &buf, cons
return false;
result.resize(len);
if(pad) {
- QByteArray last(type->block_size);
+ TQByteArray last(type->block_size);
if(!EVP_EncryptFinal_ex(&c, (unsigned char *)last.data(), &len))
return false;
last.resize(len);
@@ -54,9 +54,9 @@ static bool lib_encryptArray(const EVP_CIPHER *type, const QByteArray &buf, cons
return true;
}
-static bool lib_decryptArray(const EVP_CIPHER *type, const QByteArray &buf, const QByteArray &key, const QByteArray &iv, bool pad, QByteArray *out)
+static bool lib_decryptArray(const EVP_CIPHER *type, const TQByteArray &buf, const TQByteArray &key, const TQByteArray &iv, bool pad, TQByteArray *out)
{
- QByteArray result(buf.size()+type->block_size);
+ TQByteArray result(buf.size()+type->block_size);
int len;
EVP_CIPHER_CTX c;
@@ -77,7 +77,7 @@ static bool lib_decryptArray(const EVP_CIPHER *type, const QByteArray &buf, cons
}
result.resize(len);
if(pad) {
- QByteArray last(type->block_size);
+ TQByteArray last(type->block_size);
if(!EVP_DecryptFinal_ex(&c, (unsigned char *)last.data(), &len))
return false;
last.resize(len);
@@ -89,9 +89,9 @@ static bool lib_decryptArray(const EVP_CIPHER *type, const QByteArray &buf, cons
return true;
}
-static bool lib_generateKeyIV(const EVP_CIPHER *type, const QByteArray &data, const QByteArray &salt, QByteArray *key, QByteArray *iv)
+static bool lib_generateKeyIV(const EVP_CIPHER *type, const TQByteArray &data, const TQByteArray &salt, TQByteArray *key, TQByteArray *iv)
{
- QByteArray k, i;
+ TQByteArray k, i;
unsigned char *kp = 0;
unsigned char *ip = 0;
if(key) {
@@ -129,7 +129,7 @@ Cipher::Key Cipher::generateKey(Type t)
const EVP_CIPHER *type = typeToCIPHER(t);
if(!type)
return k;
- QByteArray out;
+ TQByteArray out;
if(!lib_generateKeyIV(type, QRandom::randomArray(128), QRandom::randomArray(2), &out, 0))
return k;
k.setType(t);
@@ -137,14 +137,14 @@ Cipher::Key Cipher::generateKey(Type t)
return k;
}
-QByteArray Cipher::generateIV(Type t)
+TQByteArray Cipher::generateIV(Type t)
{
const EVP_CIPHER *type = typeToCIPHER(t);
if(!type)
- return QByteArray();
- QByteArray out;
- if(!lib_generateKeyIV(type, QCString("Get this man an iv!"), QByteArray(), 0, &out))
- return QByteArray();
+ return TQByteArray();
+ TQByteArray out;
+ if(!lib_generateKeyIV(type, TQCString("Get this man an iv!"), TQByteArray(), 0, &out))
+ return TQByteArray();
return out;
}
@@ -156,32 +156,32 @@ int Cipher::ivSize(Type t)
return type->iv_len;
}
-QByteArray Cipher::encrypt(const QByteArray &buf, const Key &key, const QByteArray &iv, bool pad, bool *ok)
+TQByteArray Cipher::encrypt(const TQByteArray &buf, const Key &key, const TQByteArray &iv, bool pad, bool *ok)
{
if(ok)
*ok = false;
const EVP_CIPHER *type = typeToCIPHER(key.type());
if(!type)
- return QByteArray();
- QByteArray out;
+ return TQByteArray();
+ TQByteArray out;
if(!lib_encryptArray(type, buf, key.data(), iv, pad, &out))
- return QByteArray();
+ return TQByteArray();
if(ok)
*ok = true;
return out;
}
-QByteArray Cipher::decrypt(const QByteArray &buf, const Key &key, const QByteArray &iv, bool pad, bool *ok)
+TQByteArray Cipher::decrypt(const TQByteArray &buf, const Key &key, const TQByteArray &iv, bool pad, bool *ok)
{
if(ok)
*ok = false;
const EVP_CIPHER *type = typeToCIPHER(key.type());
if(!type)
- return QByteArray();
- QByteArray out;
+ return TQByteArray();
+ TQByteArray out;
if(!lib_decryptArray(type, buf, key.data(), iv, pad, &out))
- return QByteArray();
+ return TQByteArray();
if(ok)
*ok = true;
@@ -272,7 +272,7 @@ RSAKey generateRSAKey()
return key;
}
-QByteArray encryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok)
+TQByteArray encryptRSA(const TQByteArray &buf, const RSAKey &key, bool *ok)
{
if(ok)
*ok = false;
@@ -281,12 +281,12 @@ QByteArray encryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok)
int flen = buf.size();
if(flen >= size - 11)
flen = size - 11;
- QByteArray result(size);
+ TQByteArray result(size);
unsigned char *from = (unsigned char *)buf.data();
unsigned char *to = (unsigned char *)result.data();
int r = RSA_public_encrypt(flen, from, to, (RSA *)key.data(), RSA_PKCS1_PADDING);
if(r == -1)
- return QByteArray();
+ return TQByteArray();
result.resize(r);
if(ok)
@@ -294,19 +294,19 @@ QByteArray encryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok)
return result;
}
-QByteArray decryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok)
+TQByteArray decryptRSA(const TQByteArray &buf, const RSAKey &key, bool *ok)
{
if(ok)
*ok = false;
int size = RSA_size((RSA *)key.data());
int flen = buf.size();
- QByteArray result(size);
+ TQByteArray result(size);
unsigned char *from = (unsigned char *)buf.data();
unsigned char *to = (unsigned char *)result.data();
int r = RSA_private_decrypt(flen, from, to, (RSA *)key.data(), RSA_PKCS1_PADDING);
if(r == -1)
- return QByteArray();
+ return TQByteArray();
result.resize(r);
if(ok)
@@ -314,7 +314,7 @@ QByteArray decryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok)
return result;
}
-QByteArray encryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok)
+TQByteArray encryptRSA2(const TQByteArray &buf, const RSAKey &key, bool *ok)
{
if(ok)
*ok = false;
@@ -323,12 +323,12 @@ QByteArray encryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok)
int flen = buf.size();
if(flen >= size - 41)
flen = size - 41;
- QByteArray result(size);
+ TQByteArray result(size);
unsigned char *from = (unsigned char *)buf.data();
unsigned char *to = (unsigned char *)result.data();
int r = RSA_public_encrypt(flen, from, to, (RSA *)key.data(), RSA_PKCS1_OAEP_PADDING);
if(r == -1)
- return QByteArray();
+ return TQByteArray();
result.resize(r);
if(ok)
@@ -336,19 +336,19 @@ QByteArray encryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok)
return result;
}
-QByteArray decryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok)
+TQByteArray decryptRSA2(const TQByteArray &buf, const RSAKey &key, bool *ok)
{
if(ok)
*ok = false;
int size = RSA_size((RSA *)key.data());
int flen = buf.size();
- QByteArray result(size);
+ TQByteArray result(size);
unsigned char *from = (unsigned char *)buf.data();
unsigned char *to = (unsigned char *)result.data();
int r = RSA_private_decrypt(flen, from, to, (RSA *)key.data(), RSA_PKCS1_OAEP_PADDING);
if(r == -1)
- return QByteArray();
+ return TQByteArray();
result.resize(r);
if(ok)
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/cipher.h b/kopete/protocols/jabber/libiris/cutestuff/util/cipher.h
index 148deff8..02c7606c 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/cipher.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/cipher.h
@@ -21,8 +21,8 @@
#ifndef CS_CIPHER_H
#define CS_CIPHER_H
-#include<qstring.h>
-#include<qcstring.h>
+#include<tqstring.h>
+#include<tqcstring.h>
namespace Cipher
{
@@ -36,19 +36,19 @@ namespace Cipher
bool isValid() const { return (v_type == None ? false: true); }
void setType(Type x) { v_type = x; }
Type type() const { return v_type; }
- void setData(const QByteArray &d) { v_data = d; }
- const QByteArray & data() const { return v_data; }
+ void setData(const TQByteArray &d) { v_data = d; }
+ const TQByteArray & data() const { return v_data; }
private:
Type v_type;
- QByteArray v_data;
+ TQByteArray v_data;
};
Key generateKey(Type);
- QByteArray generateIV(Type);
+ TQByteArray generateIV(Type);
int ivSize(Type);
- QByteArray encrypt(const QByteArray &, const Key &, const QByteArray &iv, bool pad, bool *ok=0);
- QByteArray decrypt(const QByteArray &, const Key &, const QByteArray &iv, bool pad, bool *ok=0);
+ TQByteArray encrypt(const TQByteArray &, const Key &, const TQByteArray &iv, bool pad, bool *ok=0);
+ TQByteArray decrypt(const TQByteArray &, const Key &, const TQByteArray &iv, bool pad, bool *ok=0);
}
class RSAKey
@@ -71,9 +71,9 @@ private:
};
RSAKey generateRSAKey();
-QByteArray encryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok=0);
-QByteArray decryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok=0);
-QByteArray encryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok=0);
-QByteArray decryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok=0);
+TQByteArray encryptRSA(const TQByteArray &buf, const RSAKey &key, bool *ok=0);
+TQByteArray decryptRSA(const TQByteArray &buf, const RSAKey &key, bool *ok=0);
+TQByteArray encryptRSA2(const TQByteArray &buf, const RSAKey &key, bool *ok=0);
+TQByteArray decryptRSA2(const TQByteArray &buf, const RSAKey &key, bool *ok=0);
#endif
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp
index 3becd7c5..9805de2f 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp
@@ -9,15 +9,15 @@ uchar QRandom::randomChar()
uint QRandom::randomInt()
{
- QByteArray a = randomArray(sizeof(uint));
+ TQByteArray a = randomArray(sizeof(uint));
uint x;
memcpy(&x, a.data(), a.size());
return x;
}
-QByteArray QRandom::randomArray(uint size)
+TQByteArray QRandom::randomArray(uint size)
{
- QByteArray a(size);
+ TQByteArray a(size);
for(uint n = 0; n < size; ++n)
a[n] = randomChar();
return a;
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h b/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h
index 92339fb0..f04c7e0f 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h
@@ -1,14 +1,14 @@
#ifndef CS_QRANDOM_H
#define CS_QRANDOM_H
-#include<qcstring.h>
+#include<tqcstring.h>
class QRandom
{
public:
static uchar randomChar();
static uint randomInt();
- static QByteArray randomArray(uint size);
+ static TQByteArray randomArray(uint size);
};
#endif
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp
index 6bd012e9..12ed189b 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp
@@ -1,6 +1,6 @@
#include"safedelete.h"
-#include<qtimer.h>
+#include<tqtimer.h>
//----------------------------------------------------------------------------
// SafeDelete
@@ -16,7 +16,7 @@ SafeDelete::~SafeDelete()
lock->dying();
}
-void SafeDelete::deleteLater(QObject *o)
+void SafeDelete::deleteLater(TQObject *o)
{
if(!lock)
deleteSingle(o);
@@ -35,16 +35,16 @@ void SafeDelete::deleteAll()
if(list.isEmpty())
return;
- QObjectListIt it(list);
- for(QObject *o; (o = it.current()); ++it)
+ TQObjectListIt it(list);
+ for(TQObject *o; (o = it.current()); ++it)
deleteSingle(o);
list.clear();
}
-void SafeDelete::deleteSingle(QObject *o)
+void SafeDelete::deleteSingle(TQObject *o)
{
#if QT_VERSION < 0x030000
- // roll our own QObject::deleteLater()
+ // roll our own TQObject::deleteLater()
SafeDeleteLater *sdl = SafeDeleteLater::ensureExists();
sdl->deleteItLater(o);
#else
@@ -97,7 +97,7 @@ SafeDeleteLater::SafeDeleteLater()
{
list.setAutoDelete(true);
self = this;
- QTimer::singleShot(0, this, SLOT(explode()));
+ TQTimer::singleShot(0, this, TQT_SLOT(explode()));
}
SafeDeleteLater::~SafeDeleteLater()
@@ -106,7 +106,7 @@ SafeDeleteLater::~SafeDeleteLater()
self = 0;
}
-void SafeDeleteLater::deleteItLater(QObject *o)
+void SafeDeleteLater::deleteItLater(TQObject *o)
{
list.append(o);
}
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h b/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h
index 078d36cd..add5af6b 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h
@@ -1,8 +1,8 @@
#ifndef SAFEDELETE_H
#define SAFEDELETE_H
-#include<qobject.h>
-#include<qobjectlist.h>
+#include<tqobject.h>
+#include<tqobjectlist.h>
class SafeDelete;
class SafeDeleteLock
@@ -24,13 +24,13 @@ public:
SafeDelete();
~SafeDelete();
- void deleteLater(QObject *o);
+ void deleteLater(TQObject *o);
- // same as QObject::deleteLater()
- static void deleteSingle(QObject *o);
+ // same as TQObject::deleteLater()
+ static void deleteSingle(TQObject *o);
private:
- QObjectList list;
+ TQObjectList list;
void deleteAll();
friend class SafeDeleteLock;
@@ -43,7 +43,7 @@ class SafeDeleteLater : public QObject
Q_OBJECT
public:
static SafeDeleteLater *ensureExists();
- void deleteItLater(QObject *o);
+ void deleteItLater(TQObject *o);
private slots:
void explode();
@@ -52,7 +52,7 @@ private:
SafeDeleteLater();
~SafeDeleteLater();
- QObjectList list;
+ TQObjectList list;
friend class SafeDelete;
static SafeDeleteLater *self;
};
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp
index f4ad554f..a3195d89 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp
@@ -161,10 +161,10 @@ void SHA1::final(unsigned char digest[20], SHA1_CONTEXT* context)
memset(&finalcount, 0, 8);
}
-QByteArray SHA1::hash(const QByteArray &a)
+TQByteArray SHA1::hash(const TQByteArray &a)
{
SHA1_CONTEXT context;
- QByteArray b(20);
+ TQByteArray b(20);
SHA1 s;
s.init(&context);
@@ -173,19 +173,19 @@ QByteArray SHA1::hash(const QByteArray &a)
return b;
}
-QByteArray SHA1::hashString(const QCString &cs)
+TQByteArray SHA1::hashString(const TQCString &cs)
{
- QByteArray a(cs.length());
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return SHA1::hash(a);
}
-QString SHA1::digest(const QString &in)
+TQString SHA1::digest(const TQString &in)
{
- QByteArray a = SHA1::hashString(in.utf8());
- QString out;
+ TQByteArray a = SHA1::hashString(in.utf8());
+ TQString out;
for(int n = 0; n < (int)a.size(); ++n) {
- QString str;
+ TQString str;
str.sprintf("%02x", (uchar)a[n]);
out.append(str);
}
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/sha1.h b/kopete/protocols/jabber/libiris/cutestuff/util/sha1.h
index 797c3753..7f1a3f9e 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/sha1.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/sha1.h
@@ -21,16 +21,16 @@
#ifndef CS_SHA1_H
#define CS_SHA1_H
-#include<qstring.h>
+#include<tqstring.h>
// CS_NAMESPACE_BEGIN
class SHA1
{
public:
- static QByteArray hash(const QByteArray &);
- static QByteArray hashString(const QCString &);
- static QString digest(const QString &);
+ static TQByteArray hash(const TQByteArray &);
+ static TQByteArray hashString(const TQCString &);
+ static TQString digest(const TQString &);
private:
SHA1();
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp
index fa446d58..0c8b46df 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp
@@ -20,38 +20,38 @@
#include"showtextdlg.h"
-#include<qlayout.h>
-#include<qtextedit.h>
-#include<qpushbutton.h>
-#include<qfile.h>
-#include<qtextstream.h>
+#include<tqlayout.h>
+#include<tqtextedit.h>
+#include<tqpushbutton.h>
+#include<tqfile.h>
+#include<tqtextstream.h>
-ShowTextDlg::ShowTextDlg(const QString &fname, bool rich, QWidget *parent, const char *name)
-:QDialog(parent, name, FALSE, WDestructiveClose)
+ShowTextDlg::ShowTextDlg(const TQString &fname, bool rich, TQWidget *parent, const char *name)
+:TQDialog(parent, name, FALSE, WDestructiveClose)
{
- QString text;
+ TQString text;
- QFile f(fname);
+ TQFile f(fname);
if(f.open(IO_ReadOnly)) {
- QTextStream t(&f);
+ TQTextStream t(&f);
while(!t.eof())
text += t.readLine() + '\n';
f.close();
}
- QVBoxLayout *vb1 = new QVBoxLayout(this, 8);
- QTextEdit *te = new QTextEdit(this);
+ TQVBoxLayout *vb1 = new TQVBoxLayout(this, 8);
+ TQTextEdit *te = new TQTextEdit(this);
te->setReadOnly(TRUE);
- te->setTextFormat(rich ? QTextEdit::RichText : QTextEdit::PlainText);
+ te->setTextFormat(rich ? TQTextEdit::RichText : TQTextEdit::PlainText);
te->setText(text);
vb1->addWidget(te);
- QHBoxLayout *hb1 = new QHBoxLayout(vb1);
+ TQHBoxLayout *hb1 = new TQHBoxLayout(vb1);
hb1->addStretch(1);
- QPushButton *pb = new QPushButton(tr("&OK"), this);
- connect(pb, SIGNAL(clicked()), SLOT(accept()));
+ TQPushButton *pb = new TQPushButton(tr("&OK"), this);
+ connect(pb, TQT_SIGNAL(clicked()), TQT_SLOT(accept()));
hb1->addWidget(pb);
hb1->addStretch(1);
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h b/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h
index 08c74c5d..3d92dd74 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h
@@ -21,13 +21,13 @@
#ifndef CS_SHOWTEXTDLG_H
#define CS_SHOWTEXTDLG_H
-#include<qdialog.h>
+#include<tqdialog.h>
class ShowTextDlg : public QDialog
{
Q_OBJECT
public:
- ShowTextDlg(const QString &fname, bool rich=FALSE, QWidget *parent=0, const char *name=0);
+ ShowTextDlg(const TQString &fname, bool rich=FALSE, TQWidget *parent=0, const char *name=0);
};
#endif
diff --git a/kopete/protocols/jabber/libiris/iris/include/im.h b/kopete/protocols/jabber/libiris/iris/include/im.h
index 170338fc..f4905057 100644
--- a/kopete/protocols/jabber/libiris/iris/include/im.h
+++ b/kopete/protocols/jabber/libiris/iris/include/im.h
@@ -21,8 +21,8 @@
#ifndef XMPP_IM_H
#define XMPP_IM_H
-#include<qdatetime.h>
-#include<qvaluelist.h>
+#include<tqdatetime.h>
+#include<tqvaluelist.h>
#include"xmpp.h"
namespace XMPP
@@ -30,24 +30,24 @@ namespace XMPP
class Url
{
public:
- Url(const QString &url="", const QString &desc="");
+ Url(const TQString &url="", const TQString &desc="");
Url(const Url &);
Url & operator=(const Url &);
~Url();
- QString url() const;
- QString desc() const;
+ TQString url() const;
+ TQString desc() const;
- void setUrl(const QString &);
- void setDesc(const QString &);
+ void setUrl(const TQString &);
+ void setDesc(const TQString &);
private:
class Private;
Private *d;
};
- typedef QValueList<Url> UrlList;
- typedef QMap<QString, QString> StringMap;
+ typedef TQValueList<Url> UrlList;
+ typedef TQMap<TQString, TQString> StringMap;
typedef enum { OfflineEvent, DeliveredEvent, DisplayedEvent,
ComposingEvent, CancelEvent, InactiveEvent, GoneEvent } MsgEvent;
@@ -61,29 +61,29 @@ namespace XMPP
Jid to() const;
Jid from() const;
- QString id() const;
- QString type() const;
- QString lang() const;
- QString subject(const QString &lang="") const;
- QString body(const QString &lang="") const;
- QString xHTMLBody(const QString &lang="") const;
- QString thread() const;
+ TQString id() const;
+ TQString type() const;
+ TQString lang() const;
+ TQString subject(const TQString &lang="") const;
+ TQString body(const TQString &lang="") const;
+ TQString xHTMLBody(const TQString &lang="") const;
+ TQString thread() const;
Stanza::Error error() const;
void setTo(const Jid &j);
void setFrom(const Jid &j);
- void setId(const QString &s);
- void setType(const QString &s);
- void setLang(const QString &s);
- void setSubject(const QString &s, const QString &lang="");
- void setBody(const QString &s, const QString &lang="");
- void setXHTMLBody(const QString &s, const QString &lang="", const QString &attr = "");
- void setThread(const QString &s);
+ void setId(const TQString &s);
+ void setType(const TQString &s);
+ void setLang(const TQString &s);
+ void setSubject(const TQString &s, const TQString &lang="");
+ void setBody(const TQString &s, const TQString &lang="");
+ void setXHTMLBody(const TQString &s, const TQString &lang="", const TQString &attr = "");
+ void setThread(const TQString &s);
void setError(const Stanza::Error &err);
// JEP-0091
- QDateTime timeStamp() const;
- void setTimeStamp(const QDateTime &ts);
+ TQDateTime timeStamp() const;
+ void setTimeStamp(const TQDateTime &ts);
// JEP-0066
UrlList urlList() const;
@@ -92,19 +92,19 @@ namespace XMPP
void setUrlList(const UrlList &list);
// JEP-0022
- QString eventId() const;
- void setEventId(const QString& id);
+ TQString eventId() const;
+ void setEventId(const TQString& id);
bool containsEvents() const;
bool containsEvent(MsgEvent e) const;
void addEvent(MsgEvent e);
// JEP-0027
- QString xencrypted() const;
- void setXEncrypted(const QString &s);
+ TQString xencrypted() const;
+ void setXEncrypted(const TQString &s);
// Obsolete invitation
- QString invite() const;
- void setInvite(const QString &s);
+ TQString invite() const;
+ void setInvite(const TQString &s);
// for compatibility. delete me later
bool spooled() const;
@@ -129,8 +129,8 @@ namespace XMPP
int type() const;
- QString toString() const;
- bool fromString(const QString &);
+ TQString toString() const;
+ bool fromString(const TQString &);
private:
SubType value;
@@ -139,56 +139,56 @@ namespace XMPP
class Status
{
public:
- Status(const QString &show="", const QString &status="", int priority=0, bool available=true);
+ Status(const TQString &show="", const TQString &status="", int priority=0, bool available=true);
~Status();
int priority() const;
- const QString & show() const;
- const QString & status() const;
- QDateTime timeStamp() const;
- const QString & keyID() const;
+ const TQString & show() const;
+ const TQString & status() const;
+ TQDateTime timeStamp() const;
+ const TQString & keyID() const;
bool isAvailable() const;
bool isAway() const;
bool isInvisible() const;
bool hasError() const;
int errorCode() const;
- const QString & errorString() const;
+ const TQString & errorString() const;
- const QString & xsigned() const;
- const QString & songTitle() const;
- const QString & capsNode() const;
- const QString & capsVersion() const;
- const QString & capsExt() const;
+ const TQString & xsigned() const;
+ const TQString & songTitle() const;
+ const TQString & capsNode() const;
+ const TQString & capsVersion() const;
+ const TQString & capsExt() const;
void setPriority(int);
- void setShow(const QString &);
- void setStatus(const QString &);
- void setTimeStamp(const QDateTime &);
- void setKeyID(const QString &);
+ void setShow(const TQString &);
+ void setStatus(const TQString &);
+ void setTimeStamp(const TQDateTime &);
+ void setKeyID(const TQString &);
void setIsAvailable(bool);
void setIsInvisible(bool);
- void setError(int, const QString &);
- void setCapsNode(const QString&);
- void setCapsVersion(const QString&);
- void setCapsExt(const QString&);
+ void setError(int, const TQString &);
+ void setCapsNode(const TQString&);
+ void setCapsVersion(const TQString&);
+ void setCapsExt(const TQString&);
- void setXSigned(const QString &);
- void setSongTitle(const QString &);
+ void setXSigned(const TQString &);
+ void setSongTitle(const TQString &);
private:
int v_priority;
- QString v_show, v_status, v_key;
- QDateTime v_timeStamp;
+ TQString v_show, v_status, v_key;
+ TQDateTime v_timeStamp;
bool v_isAvailable;
bool v_isInvisible;
- QString v_xsigned;
+ TQString v_xsigned;
// gabber song extension
- QString v_songTitle;
- QString v_capsNode, v_capsVersion, v_capsExt;
+ TQString v_songTitle;
+ TQString v_capsNode, v_capsVersion, v_capsExt;
int ecode;
- QString estr;
+ TQString estr;
class Private;
Private *d;
@@ -197,33 +197,33 @@ namespace XMPP
class Resource
{
public:
- Resource(const QString &name="", const Status &s=Status());
+ Resource(const TQString &name="", const Status &s=Status());
~Resource();
- const QString & name() const;
+ const TQString & name() const;
int priority() const;
const Status & status() const;
- void setName(const QString &);
+ void setName(const TQString &);
void setStatus(const Status &);
private:
- QString v_name;
+ TQString v_name;
Status v_status;
class ResourcePrivate *d;
};
- class ResourceList : public QValueList<Resource>
+ class ResourceList : public TQValueList<Resource>
{
public:
ResourceList();
~ResourceList();
- ResourceList::Iterator find(const QString &);
+ ResourceList::Iterator find(const TQString &);
ResourceList::Iterator priority();
- ResourceList::ConstIterator find(const QString &) const;
+ ResourceList::ConstIterator find(const TQString &) const;
ResourceList::ConstIterator priority() const;
private:
@@ -237,37 +237,37 @@ namespace XMPP
virtual ~RosterItem();
const Jid & jid() const;
- const QString & name() const;
- const QStringList & groups() const;
+ const TQString & name() const;
+ const TQStringList & groups() const;
const Subscription & subscription() const;
- const QString & ask() const;
+ const TQString & ask() const;
bool isPush() const;
- bool inGroup(const QString &) const;
+ bool inGroup(const TQString &) const;
virtual void setJid(const Jid &);
- void setName(const QString &);
- void setGroups(const QStringList &);
+ void setName(const TQString &);
+ void setGroups(const TQStringList &);
void setSubscription(const Subscription &);
- void setAsk(const QString &);
+ void setAsk(const TQString &);
void setIsPush(bool);
- bool addGroup(const QString &);
- bool removeGroup(const QString &);
+ bool addGroup(const TQString &);
+ bool removeGroup(const TQString &);
- QDomElement toXml(QDomDocument *) const;
- bool fromXml(const QDomElement &);
+ TQDomElement toXml(TQDomDocument *) const;
+ bool fromXml(const TQDomElement &);
private:
Jid v_jid;
- QString v_name;
- QStringList v_groups;
+ TQString v_name;
+ TQStringList v_groups;
Subscription v_subscription;
- QString v_ask;
+ TQString v_ask;
bool v_push;
class RosterItemPrivate *d;
};
- class Roster : public QValueList<RosterItem>
+ class Roster : public TQValueList<RosterItem>
{
public:
Roster();
@@ -284,12 +284,12 @@ namespace XMPP
{
public:
Features();
- Features(const QStringList &);
- Features(const QString &);
+ Features(const TQStringList &);
+ Features(const TQString &);
~Features();
- QStringList list() const; // actual featurelist
- void setList(const QStringList &);
+ TQStringList list() const; // actual featurelist
+ void setList(const TQStringList &);
// features
bool canRegister() const;
@@ -317,19 +317,19 @@ namespace XMPP
};
// useful functions
- bool test(const QStringList &) const;
+ bool test(const TQStringList &) const;
- QString name() const;
- static QString name(long id);
- static QString name(const QString &feature);
+ TQString name() const;
+ static TQString name(long id);
+ static TQString name(const TQString &feature);
long id() const;
- static long id(const QString &feature);
- static QString feature(long id);
+ static long id(const TQString &feature);
+ static TQString feature(long id);
class FeatureName;
private:
- QStringList _list;
+ TQStringList _list;
};
class AgentItem
@@ -338,24 +338,24 @@ namespace XMPP
AgentItem() { }
const Jid & jid() const { return v_jid; }
- const QString & name() const { return v_name; }
- const QString & category() const { return v_category; }
- const QString & type() const { return v_type; }
+ const TQString & name() const { return v_name; }
+ const TQString & category() const { return v_category; }
+ const TQString & type() const { return v_type; }
const Features & features() const { return v_features; }
void setJid(const Jid &j) { v_jid = j; }
- void setName(const QString &n) { v_name = n; }
- void setCategory(const QString &c) { v_category = c; }
- void setType(const QString &t) { v_type = t; }
+ void setName(const TQString &n) { v_name = n; }
+ void setCategory(const TQString &c) { v_category = c; }
+ void setType(const TQString &t) { v_type = t; }
void setFeatures(const Features &f) { v_features = f; }
private:
Jid v_jid;
- QString v_name, v_category, v_type;
+ TQString v_name, v_category, v_type;
Features v_features;
};
- typedef QValueList<AgentItem> AgentList;
+ typedef TQValueList<AgentItem> AgentList;
class DiscoItem
{
@@ -364,12 +364,12 @@ namespace XMPP
~DiscoItem();
const Jid &jid() const;
- const QString &node() const;
- const QString &name() const;
+ const TQString &node() const;
+ const TQString &name() const;
void setJid(const Jid &);
- void setName(const QString &);
- void setNode(const QString &);
+ void setName(const TQString &);
+ void setNode(const TQString &);
enum Action {
None = 0,
@@ -385,19 +385,19 @@ namespace XMPP
struct Identity
{
- QString category;
- QString name;
- QString type;
+ TQString category;
+ TQString name;
+ TQString type;
};
- typedef QValueList<Identity> Identities;
+ typedef TQValueList<Identity> Identities;
const Identities &identities() const;
void setIdentities(const Identities &);
// some useful helper functions
- static Action string2action(QString s);
- static QString action2string(Action a);
+ static Action string2action(TQString s);
+ static TQString action2string(Action a);
DiscoItem & operator= (const DiscoItem &);
DiscoItem(const DiscoItem &);
@@ -411,51 +411,51 @@ namespace XMPP
Private *d;
};
- typedef QValueList<DiscoItem> DiscoList;
+ typedef TQValueList<DiscoItem> DiscoList;
class FormField
{
public:
enum { username, nick, password, name, first, last, email, address, city, state, zip, phone, url, date, misc };
- FormField(const QString &type="", const QString &value="");
+ FormField(const TQString &type="", const TQString &value="");
~FormField();
int type() const;
- QString fieldName() const;
- QString realName() const;
+ TQString fieldName() const;
+ TQString realName() const;
bool isSecret() const;
- const QString & value() const;
+ const TQString & value() const;
void setType(int);
- bool setType(const QString &);
- void setValue(const QString &);
+ bool setType(const TQString &);
+ void setValue(const TQString &);
private:
- int tagNameToType(const QString &) const;
- QString typeToTagName(int) const;
+ int tagNameToType(const TQString &) const;
+ TQString typeToTagName(int) const;
int v_type;
- QString v_value;
+ TQString v_value;
class Private;
Private *d;
};
- class Form : public QValueList<FormField>
+ class Form : public TQValueList<FormField>
{
public:
Form(const Jid &j="");
~Form();
Jid jid() const;
- QString instructions() const;
- QString key() const;
+ TQString instructions() const;
+ TQString key() const;
void setJid(const Jid &);
- void setInstructions(const QString &);
- void setKey(const QString &);
+ void setInstructions(const TQString &);
+ void setKey(const TQString &);
private:
Jid v_jid;
- QString v_instructions, v_key;
+ TQString v_instructions, v_key;
class Private;
Private *d;
@@ -468,20 +468,20 @@ namespace XMPP
~SearchResult();
const Jid & jid() const;
- const QString & nick() const;
- const QString & first() const;
- const QString & last() const;
- const QString & email() const;
+ const TQString & nick() const;
+ const TQString & first() const;
+ const TQString & last() const;
+ const TQString & email() const;
void setJid(const Jid &);
- void setNick(const QString &);
- void setFirst(const QString &);
- void setLast(const QString &);
- void setEmail(const QString &);
+ void setNick(const TQString &);
+ void setFirst(const TQString &);
+ void setLast(const TQString &);
+ void setEmail(const TQString &);
private:
Jid v_jid;
- QString v_nick, v_first, v_last, v_email;
+ TQString v_nick, v_first, v_last, v_email;
};
class Client;
@@ -503,15 +503,15 @@ namespace XMPP
Task *parent() const;
Client *client() const;
- QDomDocument *doc() const;
- QString id() const;
+ TQDomDocument *doc() const;
+ TQString id() const;
bool success() const;
int statusCode() const;
- const QString & statusString() const;
+ const TQString & statusString() const;
void go(bool autoDelete=false);
- virtual bool take(const QDomElement &);
+ virtual bool take(const TQDomElement &);
void safeDelete();
signals:
@@ -520,13 +520,13 @@ namespace XMPP
protected:
virtual void onGo();
virtual void onDisconnect();
- void send(const QDomElement &);
- void setSuccess(int code=0, const QString &str="");
- void setError(const QDomElement &);
- void setError(int code=0, const QString &str="");
+ void send(const TQDomElement &);
+ void setSuccess(int code=0, const TQString &str="");
+ void setError(const TQDomElement &);
+ void setError(int code=0, const TQString &str="");
void debug(const char *, ...);
- void debug(const QString &);
- bool iqVerify(const QDomElement &x, const Jid &to, const QString &id, const QString &xmlns="");
+ void debug(const TQString &);
+ bool iqVerify(const TQDomElement &x, const Jid &to, const TQString &id, const TQString &xmlns="");
private slots:
void clientDisconnected();
@@ -544,60 +544,60 @@ namespace XMPP
Q_OBJECT
public:
- Client(QObject *parent=0);
+ Client(TQObject *parent=0);
~Client();
bool isActive() const;
void connectToServer(ClientStream *s, const Jid &j, bool auth=true);
- void start(const QString &host, const QString &user, const QString &pass, const QString &resource);
+ void start(const TQString &host, const TQString &user, const TQString &pass, const TQString &resource);
void close(bool fast=false);
Stream & stream();
const LiveRoster & roster() const;
const ResourceList & resourceList() const;
- void send(const QDomElement &);
- void send(const QString &);
+ void send(const TQDomElement &);
+ void send(const TQString &);
- QString host() const;
- QString user() const;
- QString pass() const;
- QString resource() const;
+ TQString host() const;
+ TQString user() const;
+ TQString pass() const;
+ TQString resource() const;
Jid jid() const;
void rosterRequest();
void sendMessage(const Message &);
- void sendSubscription(const Jid &, const QString &);
+ void sendSubscription(const Jid &, const TQString &);
void setPresence(const Status &);
- void debug(const QString &);
- QString genUniqueId();
+ void debug(const TQString &);
+ TQString genUniqueId();
Task *rootTask();
- QDomDocument *doc() const;
+ TQDomDocument *doc() const;
- QString OSName() const;
- QString timeZone() const;
+ TQString OSName() const;
+ TQString timeZone() const;
int timeZoneOffset() const;
- QString clientName() const;
- QString clientVersion() const;
- QString capsNode() const;
- QString capsVersion() const;
- QString capsExt() const;
-
- void setOSName(const QString &);
- void setTimeZone(const QString &, int);
- void setClientName(const QString &);
- void setClientVersion(const QString &);
- void setCapsNode(const QString &);
- void setCapsVersion(const QString &);
+ TQString clientName() const;
+ TQString clientVersion() const;
+ TQString capsNode() const;
+ TQString capsVersion() const;
+ TQString capsExt() const;
+
+ void setOSName(const TQString &);
+ void setTimeZone(const TQString &, int);
+ void setClientName(const TQString &);
+ void setClientVersion(const TQString &);
+ void setCapsNode(const TQString &);
+ void setCapsVersion(const TQString &);
void setIdentity(DiscoItem::Identity);
DiscoItem::Identity identity();
- void addExtension(const QString& ext, const Features& f);
- void removeExtension(const QString& ext);
- const Features& extension(const QString& ext) const;
- QStringList extensions() const;
+ void addExtension(const TQString& ext, const Features& f);
+ void removeExtension(const TQString& ext);
+ const Features& extension(const TQString& ext) const;
+ TQStringList extensions() const;
S5BManager *s5bManager() const;
IBBManager *ibbManager() const;
@@ -606,32 +606,32 @@ namespace XMPP
void setFileTransferEnabled(bool b);
FileTransferManager *fileTransferManager() const;
- bool groupChatJoin(const QString &host, const QString &room, const QString &nick);
- bool groupChatJoin(const QString &host, const QString &room, const QString &nick, const QString &password);
- void groupChatSetStatus(const QString &host, const QString &room, const Status &);
- void groupChatChangeNick(const QString &host, const QString &room, const QString &nick, const Status &);
- void groupChatLeave(const QString &host, const QString &room);
+ 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 groupChatLeave(const TQString &host, const TQString &room);
signals:
void activated();
void disconnected();
- //void authFinished(bool, int, const QString &);
- void rosterRequestFinished(bool, int, const QString &);
+ //void authFinished(bool, int, const TQString &);
+ void rosterRequestFinished(bool, int, const TQString &);
void rosterItemAdded(const RosterItem &);
void rosterItemUpdated(const RosterItem &);
void rosterItemRemoved(const RosterItem &);
void resourceAvailable(const Jid &, const Resource &);
void resourceUnavailable(const Jid &, const Resource &);
- void presenceError(const Jid &, int, const QString &);
- void subscription(const Jid &, const QString &);
+ void presenceError(const Jid &, int, const TQString &);
+ void subscription(const Jid &, const TQString &);
void messageReceived(const Message &);
- void debugText(const QString &);
- void xmlIncoming(const QString &);
- void xmlOutgoing(const QString &);
+ void debugText(const TQString &);
+ void xmlIncoming(const TQString &);
+ void xmlOutgoing(const TQString &);
void groupChatJoined(const Jid &);
void groupChatLeft(const Jid &);
void groupChatPresence(const Jid &, const Status &);
- void groupChatError(const Jid &, int, const QString &);
+ void groupChatError(const Jid &, int, const TQString &);
void incomingJidLink();
@@ -643,13 +643,13 @@ namespace XMPP
//void streamCloseFinished();
void streamError(int);
void streamReadyRead();
- void streamIncomingXml(const QString &);
- void streamOutgoingXml(const QString &);
+ void streamIncomingXml(const TQString &);
+ void streamOutgoingXml(const TQString &);
void slotRosterRequestFinished();
// basic daemons
- void ppSubscription(const Jid &, const QString &);
+ void ppSubscription(const Jid &, const TQString &);
void ppPresence(const Jid &, const Status &);
void pmMessage(const Message &);
void prRoster(const Roster &);
@@ -661,7 +661,7 @@ namespace XMPP
class GroupChat;
private:
void cleanup();
- void distribute(const QDomElement &);
+ void distribute(const TQDomElement &);
void importRoster(const Roster &);
void importRosterItem(const RosterItem &);
void updateSelfPresence(const Jid &, const Status &);
@@ -702,7 +702,7 @@ namespace XMPP
LiveRosterItemPrivate *d;
};
- class LiveRoster : public QValueList<LiveRosterItem>
+ class LiveRoster : public TQValueList<LiveRosterItem>
{
public:
LiveRoster();
diff --git a/kopete/protocols/jabber/libiris/iris/include/xmpp.h b/kopete/protocols/jabber/libiris/iris/include/xmpp.h
index dbb1b2cf..12d87d18 100644
--- a/kopete/protocols/jabber/libiris/iris/include/xmpp.h
+++ b/kopete/protocols/jabber/libiris/iris/include/xmpp.h
@@ -21,13 +21,13 @@
#ifndef XMPP_H
#define XMPP_H
-#include<qobject.h>
-#include<qstring.h>
-#include<qhostaddress.h>
-#include<qstring.h>
-#include<qcstring.h>
-#include<qxml.h>
-#include<qdom.h>
+#include<tqobject.h>
+#include<tqstring.h>
+#include<tqhostaddress.h>
+#include<tqstring.h>
+#include<tqcstring.h>
+#include<tqxml.h>
+#include<tqdom.h>
namespace QCA
{
@@ -51,11 +51,11 @@ namespace XMPP
public:
virtual ~Debug();
- virtual void msg(const QString &)=0;
- virtual void outgoingTag(const QString &)=0;
- virtual void incomingTag(const QString &)=0;
- virtual void outgoingXml(const QDomElement &)=0;
- virtual void incomingXml(const QDomElement &)=0;
+ virtual void msg(const TQString &)=0;
+ virtual void outgoingTag(const TQString &)=0;
+ virtual void incomingTag(const TQString &)=0;
+ virtual void outgoingXml(const TQDomElement &)=0;
+ virtual void incomingXml(const TQDomElement &)=0;
};
void setDebug(Debug *);
@@ -64,16 +64,16 @@ namespace XMPP
{
Q_OBJECT
public:
- Connector(QObject *parent=0);
+ Connector(TQObject *parent=0);
virtual ~Connector();
- virtual void connectToServer(const QString &server)=0;
+ virtual void connectToServer(const TQString &server)=0;
virtual ByteStream *stream() const=0;
virtual void done()=0;
bool useSSL() const;
bool havePeerAddress() const;
- QHostAddress peerAddress() const;
+ TQHostAddress peerAddress() const;
Q_UINT16 peerPort() const;
signals:
@@ -83,12 +83,12 @@ namespace XMPP
protected:
void setUseSSL(bool b);
void setPeerAddressNone();
- void setPeerAddress(const QHostAddress &addr, Q_UINT16 port);
+ void setPeerAddress(const TQHostAddress &addr, Q_UINT16 port);
private:
bool ssl;
bool haveaddr;
- QHostAddress addr;
+ TQHostAddress addr;
Q_UINT16 port;
};
@@ -97,7 +97,7 @@ namespace XMPP
Q_OBJECT
public:
enum Error { ErrConnectionRefused, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth, ErrStream };
- AdvancedConnector(QObject *parent=0);
+ AdvancedConnector(TQObject *parent=0);
virtual ~AdvancedConnector();
class Proxy
@@ -108,42 +108,42 @@ namespace XMPP
~Proxy();
int type() const;
- QString host() const;
+ TQString host() const;
Q_UINT16 port() const;
- QString url() const;
- QString user() const;
- QString pass() const;
+ TQString url() const;
+ TQString user() const;
+ TQString pass() const;
int pollInterval() const;
- void setHttpConnect(const QString &host, Q_UINT16 port);
- void setHttpPoll(const QString &host, Q_UINT16 port, const QString &url);
- void setSocks(const QString &host, Q_UINT16 port);
- void setUserPass(const QString &user, const QString &pass);
+ 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 setUserPass(const TQString &user, const TQString &pass);
void setPollInterval(int secs);
private:
int t;
- QString v_host, v_url;
+ TQString v_host, v_url;
Q_UINT16 v_port;
- QString v_user, v_pass;
+ TQString v_user, v_pass;
int v_poll;
};
void setProxy(const Proxy &proxy);
- void setOptHostPort(const QString &host, Q_UINT16 port);
+ void setOptHostPort(const TQString &host, Q_UINT16 port);
void setOptProbe(bool);
void setOptSSL(bool);
void changePollInterval(int secs);
- void connectToServer(const QString &server);
+ void connectToServer(const TQString &server);
ByteStream *stream() const;
void done();
int errorCode() const;
signals:
- void srvLookup(const QString &server);
+ void srvLookup(const TQString &server);
void srvResult(bool success);
void httpSyncStarted();
void httpSyncFinished();
@@ -170,20 +170,20 @@ namespace XMPP
{
Q_OBJECT
public:
- TLSHandler(QObject *parent=0);
+ TLSHandler(TQObject *parent=0);
virtual ~TLSHandler();
virtual void reset()=0;
- virtual void startClient(const QString &host)=0;
- virtual void write(const QByteArray &a)=0;
- virtual void writeIncoming(const QByteArray &a)=0;
+ virtual void startClient(const TQString &host)=0;
+ virtual void write(const TQByteArray &a)=0;
+ virtual void writeIncoming(const TQByteArray &a)=0;
signals:
void success();
void fail();
void closed();
- void readyRead(const QByteArray &a);
- void readyReadOutgoing(const QByteArray &a, int plainBytes);
+ void readyRead(const TQByteArray &a);
+ void readyReadOutgoing(const TQByteArray &a, int plainBytes);
};
class QCATLSHandler : public TLSHandler
@@ -197,9 +197,9 @@ namespace XMPP
int tlsError() const;
void reset();
- void startClient(const QString &host);
- void write(const QByteArray &a);
- void writeIncoming(const QByteArray &a);
+ void startClient(const TQString &host);
+ void write(const TQByteArray &a);
+ void writeIncoming(const TQByteArray &a);
signals:
void tlsHandshaken();
@@ -225,45 +225,45 @@ namespace XMPP
Jid();
~Jid();
- Jid(const QString &s);
+ Jid(const TQString &s);
Jid(const char *s);
- Jid & operator=(const QString &s);
+ Jid & operator=(const TQString &s);
Jid & operator=(const char *s);
- void set(const QString &s);
- void set(const QString &domain, const QString &node, const QString &resource="");
+ void set(const TQString &s);
+ void set(const TQString &domain, const TQString &node, const TQString &resource="");
- void setDomain(const QString &s);
- void setNode(const QString &s);
- void setResource(const QString &s);
+ void setDomain(const TQString &s);
+ void setNode(const TQString &s);
+ void setResource(const TQString &s);
- const QString & domain() const { return d; }
- const QString & node() const { return n; }
- const QString & resource() const { return r; }
- const QString & bare() const { return b; }
- const QString & full() const { return f; }
+ const TQString & domain() const { return d; }
+ const TQString & node() const { return n; }
+ const TQString & resource() const { return r; }
+ const TQString & bare() const { return b; }
+ const TQString & full() const { return f; }
- Jid withNode(const QString &s) const;
- Jid withResource(const QString &s) const;
+ Jid withNode(const TQString &s) const;
+ Jid withResource(const TQString &s) const;
bool isValid() const;
bool isEmpty() const;
bool compare(const Jid &a, bool compareRes=true) const;
- static bool validDomain(const QString &s, QString *norm=0);
- static bool validNode(const QString &s, QString *norm=0);
- static bool validResource(const QString &s, QString *norm=0);
+ static bool validDomain(const TQString &s, TQString *norm=0);
+ static bool validNode(const TQString &s, TQString *norm=0);
+ static bool validResource(const TQString &s, TQString *norm=0);
// TODO: kill these later
- const QString & host() const { return d; }
- const QString & user() const { return n; }
- const QString & userHost() const { return b; }
+ const TQString & host() const { return d; }
+ const TQString & user() const { return n; }
+ const TQString & userHost() const { return b; }
private:
void reset();
void update();
- QString f, b, d, n, r;
+ TQString f, b, d, n, r;
bool valid;
};
@@ -303,42 +303,42 @@ namespace XMPP
class Error
{
public:
- Error(int type=Cancel, int condition=UndefinedCondition, const QString &text="", const QDomElement &appSpec=QDomElement());
+ Error(int type=Cancel, int condition=UndefinedCondition, const TQString &text="", const TQDomElement &appSpec=TQDomElement());
int type;
int condition;
- QString text;
- QDomElement appSpec;
+ TQString text;
+ TQDomElement appSpec;
};
bool isNull() const;
- QDomElement element() const;
- QString toString() const;
+ TQDomElement element() const;
+ TQString toString() const;
- QDomDocument & doc() const;
- QString baseNS() const;
- QString xhtmlImNS() const;
- QString xhtmlNS() const;
- QDomElement createElement(const QString &ns, const QString &tagName);
- QDomElement createTextElement(const QString &ns, const QString &tagName, const QString &text);
- QDomElement createXHTMLElement(const QString &xHTML);
- void appendChild(const QDomElement &e);
+ TQDomDocument & doc() const;
+ TQString baseNS() const;
+ TQString xhtmlImNS() const;
+ TQString xhtmlNS() const;
+ TQDomElement createElement(const TQString &ns, const TQString &tagName);
+ TQDomElement createTextElement(const TQString &ns, const TQString &tagName, const TQString &text);
+ TQDomElement createXHTMLElement(const TQString &xHTML);
+ void appendChild(const TQDomElement &e);
Kind kind() const;
void setKind(Kind k);
Jid to() const;
Jid from() const;
- QString id() const;
- QString type() const;
- QString lang() const;
+ TQString id() const;
+ TQString type() const;
+ TQString lang() const;
void setTo(const Jid &j);
void setFrom(const Jid &j);
- void setId(const QString &id);
- void setType(const QString &type);
- void setLang(const QString &lang);
+ void setId(const TQString &id);
+ void setType(const TQString &type);
+ void setLang(const TQString &lang);
Error error() const;
void setError(const Error &err);
@@ -346,8 +346,8 @@ namespace XMPP
private:
friend class Stream;
- Stanza(Stream *s, Kind k, const Jid &to, const QString &type, const QString &id);
- Stanza(Stream *s, const QDomElement &e);
+ Stanza(Stream *s, Kind k, const Jid &to, const TQString &type, const TQString &id);
+ Stanza(Stream *s, const TQDomElement &e);
class Private;
Private *d;
@@ -370,13 +370,13 @@ namespace XMPP
SystemShutdown
};
- Stream(QObject *parent=0);
+ Stream(TQObject *parent=0);
virtual ~Stream();
- virtual QDomDocument & doc() const=0;
- virtual QString baseNS() const=0;
- virtual QString xhtmlImNS() const=0;
- virtual QString xhtmlNS() const=0;
+ virtual TQDomDocument & doc() const=0;
+ virtual TQString baseNS() const=0;
+ virtual TQString xhtmlImNS() const=0;
+ virtual TQString xhtmlNS() const=0;
virtual bool old() const=0;
virtual void close()=0;
@@ -385,13 +385,13 @@ namespace XMPP
virtual void write(const Stanza &s)=0;
virtual int errorCondition() const=0;
- virtual QString errorText() const=0;
- virtual QDomElement errorAppSpec() const=0;
+ virtual TQString errorText() const=0;
+ virtual TQDomElement errorAppSpec() const=0;
- Stanza createStanza(Stanza::Kind k, const Jid &to="", const QString &type="", const QString &id="");
- Stanza createStanza(const QDomElement &e);
+ Stanza createStanza(Stanza::Kind k, const Jid &to="", const TQString &type="", const TQString &id="");
+ Stanza createStanza(const TQDomElement &e);
- static QString xmlToString(const QDomElement &e, bool clip=false);
+ static TQString xmlToString(const TQDomElement &e, bool clip=false);
signals:
void connectionClosed();
@@ -450,8 +450,8 @@ namespace XMPP
BindConflict // resource in-use
};
- ClientStream(Connector *conn, TLSHandler *tlsHandler=0, QObject *parent=0);
- ClientStream(const QString &host, const QString &defRealm, ByteStream *bs, QCA::TLS *tls=0, QObject *parent=0); // server
+ 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();
Jid jid() const;
@@ -461,13 +461,13 @@ namespace XMPP
bool isAuthenticated() const;
// login params
- void setUsername(const QString &s);
- void setPassword(const QString &s);
- void setRealm(const QString &s);
+ void setUsername(const TQString &s);
+ void setPassword(const TQString &s);
+ void setRealm(const TQString &s);
void continueAfterParams();
// SASL information
- QString saslMechanism() const;
+ TQString saslMechanism() const;
int saslSSF() const;
// binding
@@ -478,14 +478,14 @@ namespace XMPP
void setRequireMutualAuth(bool);
void setSSFRange(int low, int high);
void setOldOnly(bool);
- void setSASLMechanism(const QString &s);
- void setLocalAddr(const QHostAddress &addr, Q_UINT16 port);
+ void setSASLMechanism(const TQString &s);
+ void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port);
// reimplemented
- QDomDocument & doc() const;
- QString baseNS() const;
- QString xhtmlImNS() const;
- QString xhtmlNS() const;
+ TQDomDocument & doc() const;
+ TQString baseNS() const;
+ TQString xhtmlImNS() const;
+ TQString xhtmlNS() const;
bool old() const;
void close();
@@ -494,11 +494,11 @@ namespace XMPP
void write(const Stanza &s);
int errorCondition() const;
- QString errorText() const;
- QDomElement errorAppSpec() const;
+ TQString errorText() const;
+ TQDomElement errorAppSpec() const;
// extra
- void writeDirect(const QString &s);
+ void writeDirect(const TQString &s);
void setNoopTime(int mills);
signals:
@@ -507,8 +507,8 @@ namespace XMPP
void needAuthParams(bool user, bool pass, bool realm);
void authenticated();
void warning(int);
- void incomingXml(const QString &s);
- void outgoingXml(const QString &s);
+ void incomingXml(const TQString &s);
+ void outgoingXml(const TQString &s);
public slots:
void continueAfterWarning();
@@ -527,10 +527,10 @@ namespace XMPP
void ss_tlsClosed();
void ss_error(int);
- void sasl_clientFirstStep(const QString &mech, const QByteArray *clientInit);
- void sasl_nextStep(const QByteArray &stepData);
+ void sasl_clientFirstStep(const TQString &mech, const TQByteArray *clientInit);
+ void sasl_nextStep(const TQByteArray &stepData);
void sasl_needParams(bool user, bool authzid, bool pass, bool realm);
- void sasl_authCheck(const QString &user, const QString &authzid);
+ void sasl_authCheck(const TQString &user, const TQString &authzid);
void sasl_authenticated();
void sasl_error(int);
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp
index dd458ef0..87743e7f 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp
+++ b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp
@@ -20,10 +20,10 @@
#include"filetransfer.h"
-#include<qtimer.h>
-#include<qptrlist.h>
-#include<qguardedptr.h>
-#include<qfileinfo.h>
+#include<tqtimer.h>
+#include<tqptrlist.h>
+#include<tqguardedptr.h>
+#include<tqfileinfo.h>
#include"xmpp_xmlcommon.h"
#include"s5b.h"
@@ -34,13 +34,13 @@ using namespace XMPP;
// firstChildElement
//
// Get an element's first child element
-static QDomElement firstChildElement(const QDomElement &e)
+static TQDomElement firstChildElement(const TQDomElement &e)
{
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
if(n.isElement())
return n.toElement();
}
- return QDomElement();
+ return TQDomElement();
}
//----------------------------------------------------------------------------
@@ -52,23 +52,23 @@ public:
FileTransferManager *m;
JT_FT *ft;
Jid peer;
- QString fname;
+ TQString fname;
Q_LLONG size;
Q_LLONG sent;
- QString desc;
+ TQString desc;
bool rangeSupported;
Q_LLONG rangeOffset, rangeLength, length;
- QString streamType;
+ TQString streamType;
bool needStream;
- QString id, iq_id;
+ TQString id, iq_id;
S5BConnection *c;
Jid proxy;
int state;
bool sender;
};
-FileTransfer::FileTransfer(FileTransferManager *m, QObject *parent)
-:QObject(parent)
+FileTransfer::FileTransfer(FileTransferManager *m, TQObject *parent)
+:TQObject(parent)
{
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 QString &fname, Q_LLONG size, const QString &desc)
+void FileTransfer::sendFile(const Jid &to, const TQString &fname, Q_LLONG size, const TQString &desc)
{
d->state = Requesting;
d->peer = to;
@@ -115,8 +115,8 @@ void FileTransfer::sendFile(const Jid &to, const QString &fname, Q_LLONG size, c
d->id = d->m->link(this);
d->ft = new JT_FT(d->m->client()->rootTask());
- connect(d->ft, SIGNAL(finished()), SLOT(ft_finished()));
- QStringList list;
+ connect(d->ft, TQT_SIGNAL(finished()), TQT_SLOT(ft_finished()));
+ TQStringList list;
list += "http://jabber.org/protocol/bytestreams";
d->ft->request(to, d->id, fname, size, desc, list);
d->ft->go(true);
@@ -134,14 +134,14 @@ int FileTransfer::dataSizeNeeded() const
return size;
}
-void FileTransfer::writeFileData(const QByteArray &a)
+void FileTransfer::writeFileData(const TQByteArray &a)
{
int pending = d->c->bytesToWrite();
Q_LLONG left = d->length - (d->sent + pending);
if(left == 0)
return;
- QByteArray block;
+ TQByteArray block;
if((Q_LLONG)a.size() > left) {
block = a.copy();
block.resize((uint)left);
@@ -156,7 +156,7 @@ Jid FileTransfer::peer() const
return d->peer;
}
-QString FileTransfer::fileName() const
+TQString FileTransfer::fileName() const
{
return d->fname;
}
@@ -166,7 +166,7 @@ Q_LLONG FileTransfer::fileSize() const
return d->size;
}
-QString FileTransfer::description() const
+TQString FileTransfer::description() const
{
return d->desc;
}
@@ -228,10 +228,10 @@ void FileTransfer::ft_finished()
d->length = d->size - d->rangeOffset;
d->streamType = ft->streamType();
d->c = d->m->client()->s5bManager()->createConnection();
- connect(d->c, SIGNAL(connected()), SLOT(s5b_connected()));
- connect(d->c, SIGNAL(connectionClosed()), SLOT(s5b_connectionClosed()));
- connect(d->c, SIGNAL(bytesWritten(int)), SLOT(s5b_bytesWritten(int)));
- connect(d->c, SIGNAL(error(int)), SLOT(s5b_error(int)));
+ connect(d->c, TQT_SIGNAL(connected()), TQT_SLOT(s5b_connected()));
+ connect(d->c, TQT_SIGNAL(connectionClosed()), TQT_SLOT(s5b_connectionClosed()));
+ connect(d->c, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(s5b_bytesWritten(int)));
+ connect(d->c, TQT_SIGNAL(error(int)), TQT_SLOT(s5b_error(int)));
if(d->proxy.isValid())
d->c->setProxy(d->proxy);
@@ -250,14 +250,14 @@ void FileTransfer::ft_finished()
void FileTransfer::takeConnection(S5BConnection *c)
{
d->c = c;
- connect(d->c, SIGNAL(connected()), SLOT(s5b_connected()));
- connect(d->c, SIGNAL(connectionClosed()), SLOT(s5b_connectionClosed()));
- connect(d->c, SIGNAL(readyRead()), SLOT(s5b_readyRead()));
- connect(d->c, SIGNAL(error(int)), SLOT(s5b_error(int)));
+ connect(d->c, TQT_SIGNAL(connected()), TQT_SLOT(s5b_connected()));
+ connect(d->c, TQT_SIGNAL(connectionClosed()), TQT_SLOT(s5b_connectionClosed()));
+ connect(d->c, TQT_SIGNAL(readyRead()), TQT_SLOT(s5b_readyRead()));
+ connect(d->c, TQT_SIGNAL(error(int)), TQT_SLOT(s5b_error(int)));
if(d->proxy.isValid())
d->c->setProxy(d->proxy);
accepted();
- QTimer::singleShot(0, this, SLOT(doAccept()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doAccept()));
}
void FileTransfer::s5b_connected()
@@ -274,7 +274,7 @@ void FileTransfer::s5b_connectionClosed()
void FileTransfer::s5b_readyRead()
{
- QByteArray a = d->c->read();
+ TQByteArray a = d->c->read();
Q_LLONG need = d->length - d->sent;
if((Q_LLONG)a.size() > need)
a.resize((uint)need);
@@ -327,18 +327,18 @@ class FileTransferManager::Private
{
public:
Client *client;
- QPtrList<FileTransfer> list, incoming;
+ TQPtrList<FileTransfer> list, incoming;
JT_PushFT *pft;
};
FileTransferManager::FileTransferManager(Client *client)
-:QObject(client)
+:TQObject(client)
{
d = new Private;
d->client = client;
d->pft = new JT_PushFT(d->client->rootTask());
- connect(d->pft, SIGNAL(incoming(const FTRequest &)), SLOT(pft_incoming(const FTRequest &)));
+ connect(d->pft, TQT_SIGNAL(incoming(const FTRequest &)), TQT_SLOT(pft_incoming(const FTRequest &)));
}
FileTransferManager::~FileTransferManager()
@@ -376,7 +376,7 @@ FileTransfer *FileTransferManager::takeIncoming()
void FileTransferManager::pft_incoming(const FTRequest &req)
{
bool found = false;
- for(QStringList::ConstIterator it = req.streamTypes.begin(); it != req.streamTypes.end(); ++it) {
+ for(TQStringList::ConstIterator it = req.streamTypes.begin(); it != req.streamTypes.end(); ++it) {
if((*it) == "http://jabber.org/protocol/bytestreams") {
found = true;
break;
@@ -399,7 +399,7 @@ void FileTransferManager::pft_incoming(const FTRequest &req)
void FileTransferManager::s5b_incomingReady(S5BConnection *c)
{
- QPtrListIterator<FileTransfer> it(d->list);
+ TQPtrListIterator<FileTransfer> it(d->list);
FileTransfer *ft = 0;
for(FileTransfer *i; (i = it.current()); ++it) {
if(i->d->needStream && i->d->peer.compare(c->peer()) && i->d->id == c->sid()) {
@@ -415,7 +415,7 @@ void FileTransferManager::s5b_incomingReady(S5BConnection *c)
ft->takeConnection(c);
}
-QString FileTransferManager::link(FileTransfer *ft)
+TQString FileTransferManager::link(FileTransfer *ft)
{
d->list.append(ft);
return d->client->s5bManager()->genUniqueSID(ft->d->peer);
@@ -443,11 +443,11 @@ void FileTransferManager::unlink(FileTransfer *ft)
class JT_FT::Private
{
public:
- QDomElement iq;
+ TQDomElement iq;
Jid to;
Q_LLONG size, rangeOffset, rangeLength;
- QString streamType;
- QStringList streamTypes;
+ TQString streamType;
+ TQStringList streamTypes;
};
JT_FT::JT_FT(Task *parent)
@@ -461,41 +461,41 @@ JT_FT::~JT_FT()
delete d;
}
-void JT_FT::request(const Jid &to, const QString &_id, const QString &fname, Q_LLONG size, const QString &desc, const QStringList &streamTypes)
+void JT_FT::request(const Jid &to, const TQString &_id, const TQString &fname, Q_LLONG size, const TQString &desc, const TQStringList &streamTypes)
{
- QDomElement iq;
+ TQDomElement iq;
d->to = to;
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement si = doc()->createElement("si");
+ TQDomElement si = doc()->createElement("si");
si.setAttribute("xmlns", "http://jabber.org/protocol/si");
si.setAttribute("id", _id);
si.setAttribute("profile", "http://jabber.org/protocol/si/profile/file-transfer");
- QDomElement file = doc()->createElement("file");
+ TQDomElement file = doc()->createElement("file");
file.setAttribute("xmlns", "http://jabber.org/protocol/si/profile/file-transfer");
file.setAttribute("name", fname);
- file.setAttribute("size", QString::number(size));
+ file.setAttribute("size", TQString::number(size));
if(!desc.isEmpty()) {
- QDomElement de = doc()->createElement("desc");
+ TQDomElement de = doc()->createElement("desc");
de.appendChild(doc()->createTextNode(desc));
file.appendChild(de);
}
- QDomElement range = doc()->createElement("range");
+ TQDomElement range = doc()->createElement("range");
file.appendChild(range);
si.appendChild(file);
- QDomElement feature = doc()->createElement("feature");
+ TQDomElement feature = doc()->createElement("feature");
feature.setAttribute("xmlns", "http://jabber.org/protocol/feature-neg");
- QDomElement x = doc()->createElement("x");
+ TQDomElement x = doc()->createElement("x");
x.setAttribute("xmlns", "jabber:x:data");
x.setAttribute("type", "form");
- QDomElement field = doc()->createElement("field");
+ TQDomElement field = doc()->createElement("field");
field.setAttribute("var", "stream-method");
field.setAttribute("type", "list-single");
- for(QStringList::ConstIterator it = streamTypes.begin(); it != streamTypes.end(); ++it) {
- QDomElement option = doc()->createElement("option");
- QDomElement value = doc()->createElement("value");
+ for(TQStringList::ConstIterator it = streamTypes.begin(); it != streamTypes.end(); ++it) {
+ TQDomElement option = doc()->createElement("option");
+ TQDomElement value = doc()->createElement("value");
value.appendChild(doc()->createTextNode(*it));
option.appendChild(value);
field.appendChild(option);
@@ -522,7 +522,7 @@ Q_LLONG JT_FT::rangeLength() const
return d->rangeLength;
}
-QString JT_FT::streamType() const
+TQString JT_FT::streamType() const
{
return d->streamType;
}
@@ -532,26 +532,26 @@ void JT_FT::onGo()
send(d->iq);
}
-bool JT_FT::take(const QDomElement &x)
+bool JT_FT::take(const TQDomElement &x)
{
if(!iqVerify(x, d->to, id()))
return false;
if(x.attribute("type") == "result") {
- QDomElement si = firstChildElement(x);
+ TQDomElement si = firstChildElement(x);
if(si.attribute("xmlns") != "http://jabber.org/protocol/si" || si.tagName() != "si") {
setError(900, "");
return true;
}
- QString id = si.attribute("id");
+ TQString id = si.attribute("id");
Q_LLONG range_offset = 0;
Q_LLONG range_length = 0;
- QDomElement file = si.elementsByTagName("file").item(0).toElement();
+ TQDomElement file = si.elementsByTagName("file").item(0).toElement();
if(!file.isNull()) {
- QDomElement range = file.elementsByTagName("range").item(0).toElement();
+ TQDomElement range = file.elementsByTagName("range").item(0).toElement();
if(!range.isNull()) {
int x;
bool ok;
@@ -587,14 +587,14 @@ bool JT_FT::take(const QDomElement &x)
return true;
}
- QString streamtype;
- QDomElement feature = si.elementsByTagName("feature").item(0).toElement();
+ TQString streamtype;
+ TQDomElement feature = si.elementsByTagName("feature").item(0).toElement();
if(!feature.isNull() && feature.attribute("xmlns") == "http://jabber.org/protocol/feature-neg") {
- QDomElement x = feature.elementsByTagName("x").item(0).toElement();
+ TQDomElement x = feature.elementsByTagName("x").item(0).toElement();
if(!x.isNull() && x.attribute("type") == "submit") {
- QDomElement field = x.elementsByTagName("field").item(0).toElement();
+ TQDomElement field = x.elementsByTagName("field").item(0).toElement();
if(!field.isNull() && field.attribute("var") == "stream-method") {
- QDomElement value = field.elementsByTagName("value").item(0).toElement();
+ TQDomElement value = field.elementsByTagName("value").item(0).toElement();
if(!value.isNull())
streamtype = value.text();
}
@@ -603,7 +603,7 @@ bool JT_FT::take(const QDomElement &x)
// must be one of the offered streamtypes
bool found = false;
- for(QStringList::ConstIterator it = d->streamTypes.begin(); it != d->streamTypes.end(); ++it) {
+ for(TQStringList::ConstIterator it = d->streamTypes.begin(); it != d->streamTypes.end(); ++it) {
if((*it) == streamtype) {
found = true;
break;
@@ -636,33 +636,33 @@ JT_PushFT::~JT_PushFT()
{
}
-void JT_PushFT::respondSuccess(const Jid &to, const QString &id, Q_LLONG rangeOffset, Q_LLONG rangeLength, const QString &streamType)
+void JT_PushFT::respondSuccess(const Jid &to, const TQString &id, Q_LLONG rangeOffset, Q_LLONG rangeLength, const TQString &streamType)
{
- QDomElement iq = createIQ(doc(), "result", to.full(), id);
- QDomElement si = doc()->createElement("si");
+ TQDomElement iq = createIQ(doc(), "result", to.full(), id);
+ TQDomElement si = doc()->createElement("si");
si.setAttribute("xmlns", "http://jabber.org/protocol/si");
if(rangeOffset != 0 || rangeLength != 0) {
- QDomElement file = doc()->createElement("file");
+ TQDomElement file = doc()->createElement("file");
file.setAttribute("xmlns", "http://jabber.org/protocol/si/profile/file-transfer");
- QDomElement range = doc()->createElement("range");
+ TQDomElement range = doc()->createElement("range");
if(rangeOffset > 0)
- range.setAttribute("offset", QString::number(rangeOffset));
+ range.setAttribute("offset", TQString::number(rangeOffset));
if(rangeLength > 0)
- range.setAttribute("length", QString::number(rangeLength));
+ range.setAttribute("length", TQString::number(rangeLength));
file.appendChild(range);
si.appendChild(file);
}
- QDomElement feature = doc()->createElement("feature");
+ TQDomElement feature = doc()->createElement("feature");
feature.setAttribute("xmlns", "http://jabber.org/protocol/feature-neg");
- QDomElement x = doc()->createElement("x");
+ TQDomElement x = doc()->createElement("x");
x.setAttribute("xmlns", "jabber:x:data");
x.setAttribute("type", "submit");
- QDomElement field = doc()->createElement("field");
+ TQDomElement field = doc()->createElement("field");
field.setAttribute("var", "stream-method");
- QDomElement value = doc()->createElement("value");
+ TQDomElement value = doc()->createElement("value");
value.appendChild(doc()->createTextNode(streamType));
field.appendChild(value);
@@ -674,16 +674,16 @@ void JT_PushFT::respondSuccess(const Jid &to, const QString &id, Q_LLONG rangeOf
send(iq);
}
-void JT_PushFT::respondError(const Jid &to, const QString &id, int code, const QString &str)
+void JT_PushFT::respondError(const Jid &to, const TQString &id, int code, const TQString &str)
{
- QDomElement iq = createIQ(doc(), "error", to.full(), id);
- QDomElement err = textTag(doc(), "error", str);
- err.setAttribute("code", QString::number(code));
+ TQDomElement iq = createIQ(doc(), "error", to.full(), id);
+ TQDomElement err = textTag(doc(), "error", str);
+ err.setAttribute("code", TQString::number(code));
iq.appendChild(err);
send(iq);
}
-bool JT_PushFT::take(const QDomElement &e)
+bool JT_PushFT::take(const TQDomElement &e)
{
// must be an iq-set tag
if(e.tagName() != "iq")
@@ -691,20 +691,20 @@ bool JT_PushFT::take(const QDomElement &e)
if(e.attribute("type") != "set")
return false;
- QDomElement si = firstChildElement(e);
+ TQDomElement si = firstChildElement(e);
if(si.attribute("xmlns") != "http://jabber.org/protocol/si" || si.tagName() != "si")
return false;
if(si.attribute("profile") != "http://jabber.org/protocol/si/profile/file-transfer")
return false;
Jid from(e.attribute("from"));
- QString id = si.attribute("id");
+ TQString id = si.attribute("id");
- QDomElement file = si.elementsByTagName("file").item(0).toElement();
+ TQDomElement file = si.elementsByTagName("file").item(0).toElement();
if(file.isNull())
return true;
- QString fname = file.attribute("name");
+ TQString fname = file.attribute("name");
if(fname.isEmpty()) {
respondError(from, id, 400, "Bad file name");
return true;
@@ -712,7 +712,7 @@ bool JT_PushFT::take(const QDomElement &e)
// ensure kosher
{
- QFileInfo fi(fname);
+ TQFileInfo fi(fname);
fname = fi.fileName();
}
@@ -727,27 +727,27 @@ bool JT_PushFT::take(const QDomElement &e)
return true;
}
- QString desc;
- QDomElement de = file.elementsByTagName("desc").item(0).toElement();
+ TQString desc;
+ TQDomElement de = file.elementsByTagName("desc").item(0).toElement();
if(!de.isNull())
desc = de.text();
bool rangeSupported = false;
- QDomElement range = file.elementsByTagName("range").item(0).toElement();
+ TQDomElement range = file.elementsByTagName("range").item(0).toElement();
if(!range.isNull())
rangeSupported = true;
- QStringList streamTypes;
- QDomElement feature = si.elementsByTagName("feature").item(0).toElement();
+ TQStringList streamTypes;
+ TQDomElement feature = si.elementsByTagName("feature").item(0).toElement();
if(!feature.isNull() && feature.attribute("xmlns") == "http://jabber.org/protocol/feature-neg") {
- QDomElement x = feature.elementsByTagName("x").item(0).toElement();
+ TQDomElement x = feature.elementsByTagName("x").item(0).toElement();
if(!x.isNull() /*&& x.attribute("type") == "form"*/) {
- QDomElement field = x.elementsByTagName("field").item(0).toElement();
+ TQDomElement field = x.elementsByTagName("field").item(0).toElement();
if(!field.isNull() && field.attribute("var") == "stream-method" && field.attribute("type") == "list-single") {
- QDomNodeList nl = field.elementsByTagName("option");
+ TQDomNodeList nl = field.elementsByTagName("option");
for(uint n = 0; n < nl.count(); ++n) {
- QDomElement e = nl.item(n).toElement();
- QDomElement value = e.elementsByTagName("value").item(0).toElement();
+ TQDomElement e = nl.item(n).toElement();
+ TQDomElement value = e.elementsByTagName("value").item(0).toElement();
if(!value.isNull())
streamTypes += value.text();
}
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h
index f31a4d10..9026b478 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h
+++ b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h
@@ -43,17 +43,17 @@ namespace XMPP
void setProxy(const Jid &proxy);
// send
- void sendFile(const Jid &to, const QString &fname, Q_LLONG size, const QString &desc);
+ void sendFile(const Jid &to, const TQString &fname, Q_LLONG size, const TQString &desc);
Q_LLONG offset() const;
Q_LLONG length() const;
int dataSizeNeeded() const;
- void writeFileData(const QByteArray &a);
+ void writeFileData(const TQByteArray &a);
// receive
Jid peer() const;
- QString fileName() const;
+ TQString fileName() const;
Q_LLONG fileSize() const;
- QString description() const;
+ TQString description() const;
bool rangeSupported() const;
void accept(Q_LLONG offset=0, Q_LLONG length=0);
@@ -64,7 +64,7 @@ namespace XMPP
signals:
void accepted(); // indicates S5BConnection has started
void connected();
- void readyRead(const QByteArray &a);
+ void readyRead(const TQByteArray &a);
void bytesWritten(int);
void error(int);
@@ -84,7 +84,7 @@ namespace XMPP
void reset();
friend class FileTransferManager;
- FileTransfer(FileTransferManager *, QObject *parent=0);
+ FileTransfer(FileTransferManager *, TQObject *parent=0);
void man_waitForAccept(const FTRequest &req);
void takeConnection(S5BConnection *c);
};
@@ -114,7 +114,7 @@ namespace XMPP
void s5b_incomingReady(S5BConnection *);
friend class FileTransfer;
- QString link(FileTransfer *);
+ TQString link(FileTransfer *);
void con_accept(FileTransfer *);
void con_reject(FileTransfer *);
void unlink(FileTransfer *);
@@ -127,13 +127,13 @@ namespace XMPP
JT_FT(Task *parent);
~JT_FT();
- void request(const Jid &to, const QString &id, const QString &fname, Q_LLONG size, const QString &desc, const QStringList &streamTypes);
+ 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;
- QString streamType() const;
+ TQString streamType() const;
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
class Private;
@@ -143,12 +143,12 @@ namespace XMPP
struct FTRequest
{
Jid from;
- QString iq_id, id;
- QString fname;
+ TQString iq_id, id;
+ TQString fname;
Q_LLONG size;
- QString desc;
+ TQString desc;
bool rangeSupported;
- QStringList streamTypes;
+ TQStringList streamTypes;
};
class JT_PushFT : public Task
{
@@ -157,10 +157,10 @@ namespace XMPP
JT_PushFT(Task *parent);
~JT_PushFT();
- void respondSuccess(const Jid &to, const QString &id, Q_LLONG rangeOffset, Q_LLONG rangeLength, const QString &streamType);
- void respondError(const Jid &to, const QString &id, int code, const QString &str);
+ void respondSuccess(const Jid &to, const TQString &id, Q_LLONG rangeOffset, Q_LLONG rangeLength, const TQString &streamType);
+ void respondError(const Jid &to, const TQString &id, int code, const TQString &str);
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
signals:
void incoming(const FTRequest &req);
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp b/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp
index f48da694..df753925 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp
+++ b/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp
@@ -22,8 +22,8 @@
#include"s5b.h"
-#include<qtimer.h>
-#include<qguardedptr.h>
+#include<tqtimer.h>
+#include<tqguardedptr.h>
#include<stdlib.h>
#include<qca.h>
#include"xmpp_xmlcommon.h"
@@ -46,9 +46,9 @@
namespace XMPP {
-static QString makeKey(const QString &sid, const Jid &initiator, const Jid &target)
+static TQString makeKey(const TQString &sid, const Jid &initiator, const Jid &target)
{
- QString str = sid + initiator.full() + target.full();
+ TQString str = sid + initiator.full() + target.full();
return QCA::SHA1::hashToString(str.utf8());
}
@@ -70,7 +70,7 @@ public:
enum { Unknown, Fast, NotFast };
S5BManager *m;
int state;
- QString sid, key, out_key, out_id, in_id;
+ TQString sid, key, out_key, out_id, in_id;
Jid self, peer;
StreamHostList in_hosts;
JT_S5B *task, *proxy_task;
@@ -94,9 +94,9 @@ public:
~Item();
void reset();
- void startInitiator(const QString &_sid, const Jid &_self, const Jid &_peer, bool fast, bool udp);
- void startTarget(const QString &_sid, const Jid &_self, const Jid &_peer, const StreamHostList &hosts, const QString &iq_id, bool fast, bool udp);
- void handleFast(const StreamHostList &hosts, const QString &iq_id);
+ void startInitiator(const TQString &_sid, const Jid &_self, const Jid &_peer, bool fast, bool udp);
+ void startTarget(const TQString &_sid, const Jid &_self, const Jid &_peer, const StreamHostList &hosts, const TQString &iq_id, bool fast, bool udp);
+ void handleFast(const StreamHostList &hosts, const TQString &iq_id);
void doOutgoing();
void doIncoming();
@@ -137,7 +137,7 @@ S5BDatagram::S5BDatagram()
_dest = 0;
}
-S5BDatagram::S5BDatagram(int source, int dest, const QByteArray &data)
+S5BDatagram::S5BDatagram(int source, int dest, const TQByteArray &data)
{
_source = source;
_dest = dest;
@@ -154,7 +154,7 @@ int S5BDatagram::destPort() const
return _dest;
}
-QByteArray S5BDatagram::data() const
+TQByteArray S5BDatagram::data() const
{
return _buf;
}
@@ -170,7 +170,7 @@ public:
SocksUDP *su;
int state;
Jid peer;
- QString sid;
+ TQString sid;
bool remote;
bool switched;
bool notifyRead, notifyClose;
@@ -178,13 +178,13 @@ public:
S5BRequest req;
Jid proxy;
Mode mode;
- QPtrList<S5BDatagram> dglist;
+ TQPtrList<S5BDatagram> dglist;
};
static int id_conn = 0;
static int num_conn = 0;
-S5BConnection::S5BConnection(S5BManager *m, QObject *parent)
+S5BConnection::S5BConnection(S5BManager *m, TQObject *parent)
:ByteStream(parent)
{
d = new Private;
@@ -229,7 +229,7 @@ void S5BConnection::reset(bool clear)
}
d->state = Idle;
d->peer = Jid();
- d->sid = QString();
+ d->sid = TQString();
d->remote = false;
d->switched = false;
d->notifyRead = false;
@@ -246,7 +246,7 @@ void S5BConnection::setProxy(const Jid &proxy)
d->proxy = proxy;
}
-void S5BConnection::connectToJid(const Jid &peer, const QString &sid, Mode m)
+void S5BConnection::connectToJid(const Jid &peer, const TQString &sid, Mode m)
{
reset(true);
if(!d->m->isAcceptableSID(peer, sid))
@@ -294,7 +294,7 @@ Jid S5BConnection::peer() const
return d->peer;
}
-QString S5BConnection::sid() const
+TQString S5BConnection::sid() const
{
return d->sid;
}
@@ -322,18 +322,18 @@ bool S5BConnection::isOpen() const
return false;
}
-void S5BConnection::write(const QByteArray &buf)
+void S5BConnection::write(const TQByteArray &buf)
{
if(d->state == Active && d->mode == Stream)
d->sc->write(buf);
}
-QByteArray S5BConnection::read(int bytes)
+TQByteArray S5BConnection::read(int bytes)
{
if(d->sc)
return d->sc->read(bytes);
else
- return QByteArray();
+ return TQByteArray();
}
int S5BConnection::bytesAvailable() const
@@ -354,10 +354,10 @@ int S5BConnection::bytesToWrite() const
void S5BConnection::writeDatagram(const S5BDatagram &i)
{
- QByteArray buf(i.data().size() + 4);
+ TQByteArray buf(i.data().size() + 4);
ushort ssp = htons(i.sourcePort());
ushort sdp = htons(i.destPort());
- QByteArray data = i.data();
+ TQByteArray data = i.data();
memcpy(buf.data(), &ssp, 2);
memcpy(buf.data() + 2, &sdp, 2);
memcpy(buf.data() + 4, data.data(), data.size());
@@ -393,15 +393,15 @@ void S5BConnection::man_waitForAccept(const S5BRequest &r)
void S5BConnection::man_clientReady(SocksClient *sc, SocksUDP *sc_udp)
{
d->sc = sc;
- connect(d->sc, SIGNAL(connectionClosed()), SLOT(sc_connectionClosed()));
- connect(d->sc, SIGNAL(delayedCloseFinished()), SLOT(sc_delayedCloseFinished()));
- connect(d->sc, SIGNAL(readyRead()), SLOT(sc_readyRead()));
- connect(d->sc, SIGNAL(bytesWritten(int)), SLOT(sc_bytesWritten(int)));
- connect(d->sc, SIGNAL(error(int)), SLOT(sc_error(int)));
+ connect(d->sc, TQT_SIGNAL(connectionClosed()), TQT_SLOT(sc_connectionClosed()));
+ connect(d->sc, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(sc_delayedCloseFinished()));
+ connect(d->sc, TQT_SIGNAL(readyRead()), TQT_SLOT(sc_readyRead()));
+ connect(d->sc, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sc_bytesWritten(int)));
+ connect(d->sc, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int)));
if(sc_udp) {
d->su = sc_udp;
- connect(d->su, SIGNAL(packetReady(const QByteArray &)), SLOT(su_packetReady(const QByteArray &)));
+ connect(d->su, TQT_SIGNAL(packetReady(const TQByteArray &)), TQT_SLOT(su_packetReady(const TQByteArray &)));
}
d->state = Active;
@@ -424,7 +424,7 @@ void S5BConnection::man_clientReady(SocksClient *sc, SocksUDP *sc_udp)
d->notifyClose = true;
}
if(d->notifyRead || d->notifyClose)
- QTimer::singleShot(0, this, SLOT(doPending()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doPending()));
connected();
}
@@ -432,14 +432,14 @@ void S5BConnection::doPending()
{
if(d->notifyRead) {
if(d->notifyClose)
- QTimer::singleShot(0, this, SLOT(doPending()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doPending()));
sc_readyRead();
}
else if(d->notifyClose)
sc_connectionClosed();
}
-void S5BConnection::man_udpReady(const QByteArray &buf)
+void S5BConnection::man_udpReady(const TQByteArray &buf)
{
handleUDP(buf);
}
@@ -503,12 +503,12 @@ void S5BConnection::sc_error(int)
error(ErrSocket);
}
-void S5BConnection::su_packetReady(const QByteArray &buf)
+void S5BConnection::su_packetReady(const TQByteArray &buf)
{
handleUDP(buf);
}
-void S5BConnection::handleUDP(const QByteArray &buf)
+void S5BConnection::handleUDP(const TQByteArray &buf)
{
// must be at least 4 bytes, to accomodate virtual ports
if(buf.size() < 4)
@@ -519,14 +519,14 @@ void S5BConnection::handleUDP(const QByteArray &buf)
memcpy(&sdp, buf.data() + 2, 2);
int source = ntohs(ssp);
int dest = ntohs(sdp);
- QByteArray data(buf.size() - 4);
+ TQByteArray data(buf.size() - 4);
memcpy(data.data(), buf.data() + 4, data.size());
d->dglist.append(new S5BDatagram(source, dest, data));
datagramReady();
}
-void S5BConnection::sendUDP(const QByteArray &buf)
+void S5BConnection::sendUDP(const TQByteArray &buf)
{
if(d->su)
d->su->write(buf);
@@ -554,13 +554,13 @@ public:
S5BConnection *c;
Item *i;
- QString sid;
+ TQString sid;
JT_S5B *query;
StreamHost proxyInfo;
- QGuardedPtr<S5BServer> relatedServer;
+ TQGuardedPtr<S5BServer> relatedServer;
bool udp_init;
- QHostAddress udp_addr;
+ TQHostAddress udp_addr;
int udp_port;
};
@@ -569,13 +569,13 @@ class S5BManager::Private
public:
Client *client;
S5BServer *serv;
- QPtrList<Entry> activeList;
+ TQPtrList<Entry> activeList;
S5BConnectionList incomingConns;
JT_PushS5B *ps;
};
S5BManager::S5BManager(Client *parent)
-:QObject(parent)
+:TQObject(parent)
{
// S5B needs SHA1
if(!QCA::isSupported(QCA::CAP_SHA1))
@@ -587,9 +587,9 @@ S5BManager::S5BManager(Client *parent)
d->activeList.setAutoDelete(true);
d->ps = new JT_PushS5B(d->client->rootTask());
- connect(d->ps, SIGNAL(incoming(const S5BRequest &)), SLOT(ps_incoming(const S5BRequest &)));
- connect(d->ps, SIGNAL(incomingUDPSuccess(const Jid &, const QString &)), SLOT(ps_incomingUDPSuccess(const Jid &, const QString &)));
- connect(d->ps, SIGNAL(incomingActivate(const Jid &, const QString &, const Jid &)), SLOT(ps_incomingActivate(const Jid &, const QString &, const Jid &)));
+ connect(d->ps, TQT_SIGNAL(incoming(const S5BRequest &)), TQT_SLOT(ps_incoming(const S5BRequest &)));
+ connect(d->ps, TQT_SIGNAL(incomingUDPSuccess(const Jid &, const TQString &)), TQT_SLOT(ps_incomingUDPSuccess(const Jid &, const TQString &)));
+ connect(d->ps, TQT_SIGNAL(incomingActivate(const Jid &, const TQString &, const Jid &)), TQT_SLOT(ps_incomingActivate(const Jid &, const TQString &, const Jid &)));
}
S5BManager::~S5BManager()
@@ -697,7 +697,7 @@ void S5BManager::ps_incoming(const S5BRequest &req)
incomingReady();
}
-void S5BManager::ps_incomingUDPSuccess(const Jid &from, const QString &key)
+void S5BManager::ps_incomingUDPSuccess(const Jid &from, const TQString &key)
{
Entry *e = findEntryByHash(key);
if(e && e->i) {
@@ -708,38 +708,38 @@ void S5BManager::ps_incomingUDPSuccess(const Jid &from, const QString &key)
}
}
-void S5BManager::ps_incomingActivate(const Jid &from, const QString &sid, const Jid &streamHost)
+void S5BManager::ps_incomingActivate(const Jid &from, const TQString &sid, const Jid &streamHost)
{
Entry *e = findEntryBySID(from, sid);
if(e && e->i)
e->i->incomingActivate(streamHost);
}
-void S5BManager::doSuccess(const Jid &peer, const QString &id, const Jid &streamHost)
+void S5BManager::doSuccess(const Jid &peer, const TQString &id, const Jid &streamHost)
{
d->ps->respondSuccess(peer, id, streamHost);
}
-void S5BManager::doError(const Jid &peer, const QString &id, int code, const QString &str)
+void S5BManager::doError(const Jid &peer, const TQString &id, int code, const TQString &str)
{
d->ps->respondError(peer, id, code, str);
}
-void S5BManager::doActivate(const Jid &peer, const QString &sid, const Jid &streamHost)
+void S5BManager::doActivate(const Jid &peer, const TQString &sid, const Jid &streamHost)
{
d->ps->sendActivate(peer, sid, streamHost);
}
-QString S5BManager::genUniqueSID(const Jid &peer) const
+TQString S5BManager::genUniqueSID(const Jid &peer) const
{
// get unused key
- QString sid;
+ TQString sid;
do {
sid = "s5b_";
for(int i = 0; i < 4; ++i) {
int word = rand() & 0xffff;
for(int n = 0; n < 4; ++n) {
- QString s;
+ TQString s;
s.sprintf("%x", (word >> (n * 4)) & 0xf);
sid.append(s);
}
@@ -748,10 +748,10 @@ QString S5BManager::genUniqueSID(const Jid &peer) const
return sid;
}
-bool S5BManager::isAcceptableSID(const Jid &peer, const QString &sid) const
+bool S5BManager::isAcceptableSID(const Jid &peer, const TQString &sid) const
{
- QString key = makeKey(sid, d->client->jid(), peer);
- QString key_out = makeKey(sid, peer, d->client->jid());
+ TQString key = makeKey(sid, d->client->jid(), peer);
+ TQString key_out = makeKey(sid, peer, d->client->jid());
// if we have a server, then check through it
if(d->serv) {
@@ -765,9 +765,9 @@ bool S5BManager::isAcceptableSID(const Jid &peer, const QString &sid) const
return true;
}
-S5BConnection *S5BManager::findIncoming(const Jid &from, const QString &sid) const
+S5BConnection *S5BManager::findIncoming(const Jid &from, const TQString &sid) const
{
- QPtrListIterator<S5BConnection> it(d->incomingConns);
+ TQPtrListIterator<S5BConnection> it(d->incomingConns);
for(S5BConnection *c; (c = it.current()); ++it) {
if(c->d->peer.compare(from) && c->d->sid == sid)
return c;
@@ -777,7 +777,7 @@ S5BConnection *S5BManager::findIncoming(const Jid &from, const QString &sid) con
S5BManager::Entry *S5BManager::findEntry(S5BConnection *c) const
{
- QPtrListIterator<Entry> it(d->activeList);
+ TQPtrListIterator<Entry> it(d->activeList);
for(Entry *e; (e = it.current()); ++it) {
if(e->c == c)
return e;
@@ -787,7 +787,7 @@ S5BManager::Entry *S5BManager::findEntry(S5BConnection *c) const
S5BManager::Entry *S5BManager::findEntry(Item *i) const
{
- QPtrListIterator<Entry> it(d->activeList);
+ TQPtrListIterator<Entry> it(d->activeList);
for(Entry *e; (e = it.current()); ++it) {
if(e->i == i)
return e;
@@ -795,9 +795,9 @@ S5BManager::Entry *S5BManager::findEntry(Item *i) const
return 0;
}
-S5BManager::Entry *S5BManager::findEntryByHash(const QString &key) const
+S5BManager::Entry *S5BManager::findEntryByHash(const TQString &key) const
{
- QPtrListIterator<Entry> it(d->activeList);
+ TQPtrListIterator<Entry> it(d->activeList);
for(Entry *e; (e = it.current()); ++it) {
if(e->i && e->i->key == key)
return e;
@@ -805,9 +805,9 @@ S5BManager::Entry *S5BManager::findEntryByHash(const QString &key) const
return 0;
}
-S5BManager::Entry *S5BManager::findEntryBySID(const Jid &peer, const QString &sid) const
+S5BManager::Entry *S5BManager::findEntryBySID(const Jid &peer, const TQString &sid) const
{
- QPtrListIterator<Entry> it(d->activeList);
+ TQPtrListIterator<Entry> it(d->activeList);
for(Entry *e; (e = it.current()); ++it) {
if(e->i && e->i->peer.compare(peer) && e->sid == sid)
return e;
@@ -815,10 +815,10 @@ S5BManager::Entry *S5BManager::findEntryBySID(const Jid &peer, const QString &si
return 0;
}
-S5BManager::Entry *S5BManager::findServerEntryByHash(const QString &key) const
+S5BManager::Entry *S5BManager::findServerEntryByHash(const TQString &key) const
{
- const QPtrList<S5BManager> &manList = d->serv->managerList();
- QPtrListIterator<S5BManager> it(manList);
+ const TQPtrList<S5BManager> &manList = d->serv->managerList();
+ TQPtrListIterator<S5BManager> it(manList);
for(S5BManager *m; (m = it.current()); ++it) {
Entry *e = m->findEntryByHash(key);
if(e)
@@ -827,14 +827,14 @@ S5BManager::Entry *S5BManager::findServerEntryByHash(const QString &key) const
return 0;
}
-bool S5BManager::srv_ownsHash(const QString &key) const
+bool S5BManager::srv_ownsHash(const TQString &key) const
{
if(findEntryByHash(key))
return true;
return false;
}
-void S5BManager::srv_incomingReady(SocksClient *sc, const QString &key)
+void S5BManager::srv_incomingReady(SocksClient *sc, const TQString &key)
{
Entry *e = findEntryByHash(key);
if(!e->i->allowIncoming) {
@@ -850,7 +850,7 @@ void S5BManager::srv_incomingReady(SocksClient *sc, const QString &key)
e->i->setIncomingClient(sc);
}
-void S5BManager::srv_incomingUDP(bool init, const QHostAddress &addr, int port, const QString &key, const QByteArray &data)
+void S5BManager::srv_incomingUDP(bool init, const TQHostAddress &addr, int port, const TQString &key, const TQByteArray &data)
{
Entry *e = findEntryByHash(key);
if(!e->c->d->mode != S5BConnection::Datagram)
@@ -935,7 +935,7 @@ void S5BManager::con_unlink(S5BConnection *c)
d->activeList.removeRef(e);
}
-void S5BManager::con_sendUDP(S5BConnection *c, const QByteArray &buf)
+void S5BManager::con_sendUDP(S5BConnection *c, const TQByteArray &buf)
{
Entry *e = findEntry(c);
if(!e)
@@ -1007,12 +1007,12 @@ void S5BManager::entryContinue(Entry *e)
e->i = new Item(this);
e->i->proxy = e->proxyInfo;
- connect(e->i, SIGNAL(accepted()), SLOT(item_accepted()));
- connect(e->i, SIGNAL(tryingHosts(const StreamHostList &)), SLOT(item_tryingHosts(const StreamHostList &)));
- connect(e->i, SIGNAL(proxyConnect()), SLOT(item_proxyConnect()));
- connect(e->i, SIGNAL(waitingForActivation()), SLOT(item_waitingForActivation()));
- connect(e->i, SIGNAL(connected()), SLOT(item_connected()));
- connect(e->i, SIGNAL(error(int)), SLOT(item_error(int)));
+ connect(e->i, TQT_SIGNAL(accepted()), TQT_SLOT(item_accepted()));
+ connect(e->i, TQT_SIGNAL(tryingHosts(const StreamHostList &)), TQT_SLOT(item_tryingHosts(const StreamHostList &)));
+ connect(e->i, TQT_SIGNAL(proxyConnect()), TQT_SLOT(item_proxyConnect()));
+ connect(e->i, TQT_SIGNAL(waitingForActivation()), TQT_SLOT(item_waitingForActivation()));
+ connect(e->i, TQT_SIGNAL(connected()), TQT_SLOT(item_connected()));
+ connect(e->i, TQT_SIGNAL(error(int)), TQT_SLOT(item_error(int)));
if(e->c->isRemote()) {
const S5BRequest &req = e->c->d->req;
@@ -1026,7 +1026,7 @@ void S5BManager::entryContinue(Entry *e)
void S5BManager::queryProxy(Entry *e)
{
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
e->c->proxyQuery(); // signal
if(!self)
return;
@@ -1035,7 +1035,7 @@ void S5BManager::queryProxy(Entry *e)
printf("querying proxy: [%s]\n", e->c->d->proxy.full().latin1());
#endif
e->query = new JT_S5B(d->client->rootTask());
- connect(e->query, SIGNAL(finished()), SLOT(query_finished()));
+ connect(e->query, TQT_SIGNAL(finished()), TQT_SLOT(query_finished()));
e->query->requestProxyInfo(e->c->d->proxy);
e->query->go(true);
}
@@ -1045,7 +1045,7 @@ void S5BManager::query_finished()
JT_S5B *query = (JT_S5B *)sender();
Entry *e;
bool found = false;
- QPtrListIterator<Entry> it(d->activeList);
+ TQPtrListIterator<Entry> it(d->activeList);
for(; (e = it.current()); ++it) {
if(e->query == query) {
found = true;
@@ -1071,7 +1071,7 @@ void S5BManager::query_finished()
#endif
}
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
e->c->proxyResult(query->success()); // signal
if(!self)
return;
@@ -1101,7 +1101,7 @@ bool S5BManager::targetShouldOfferProxy(Entry *e)
//----------------------------------------------------------------------------
// S5BManager::Item
//----------------------------------------------------------------------------
-S5BManager::Item::Item(S5BManager *manager) : QObject(0)
+S5BManager::Item::Item(S5BManager *manager) : TQObject(0)
{
m = manager;
task = 0;
@@ -1159,7 +1159,7 @@ void S5BManager::Item::reset()
udp = false;
}
-void S5BManager::Item::startInitiator(const QString &_sid, const Jid &_self, const Jid &_peer, bool fast, bool _udp)
+void S5BManager::Item::startInitiator(const TQString &_sid, const Jid &_self, const Jid &_peer, bool fast, bool _udp)
{
sid = _sid;
self = _self;
@@ -1176,7 +1176,7 @@ void S5BManager::Item::startInitiator(const QString &_sid, const Jid &_self, con
doOutgoing();
}
-void S5BManager::Item::startTarget(const QString &_sid, const Jid &_self, const Jid &_peer, const StreamHostList &hosts, const QString &iq_id, bool _fast, bool _udp)
+void S5BManager::Item::startTarget(const TQString &_sid, const Jid &_self, const Jid &_peer, const StreamHostList &hosts, const TQString &iq_id, bool _fast, bool _udp)
{
sid = _sid;
peer = _peer;
@@ -1197,11 +1197,11 @@ void S5BManager::Item::startTarget(const QString &_sid, const Jid &_self, const
doIncoming();
}
-void S5BManager::Item::handleFast(const StreamHostList &hosts, const QString &iq_id)
+void S5BManager::Item::handleFast(const StreamHostList &hosts, const TQString &iq_id)
{
targetMode = Fast;
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
accepted();
if(!self)
return;
@@ -1222,8 +1222,8 @@ void S5BManager::Item::doOutgoing()
StreamHostList hosts;
S5BServer *serv = m->server();
if(serv && serv->isActive() && !haveHost(in_hosts, m->client()->jid())) {
- QStringList hostList = serv->hostList();
- for(QStringList::ConstIterator it = hostList.begin(); it != hostList.end(); ++it) {
+ TQStringList hostList = serv->hostList();
+ for(TQStringList::ConstIterator it = hostList.begin(); it != hostList.end(); ++it) {
StreamHost h;
h.setJid(m->client()->jid());
h.setHost(*it);
@@ -1245,7 +1245,7 @@ void S5BManager::Item::doOutgoing()
allowIncoming = true;
task = new JT_S5B(m->client()->rootTask());
- connect(task, SIGNAL(finished()), SLOT(jt_finished()));
+ connect(task, TQT_SIGNAL(finished()), TQT_SLOT(jt_finished()));
task->request(peer, sid, hosts, state == Initiator ? wantFast : false, udp);
out_id = task->id();
task->go(true);
@@ -1291,9 +1291,9 @@ void S5BManager::Item::doIncoming()
}
conn = new S5BConnector;
- connect(conn, SIGNAL(result(bool)), SLOT(conn_result(bool)));
+ connect(conn, TQT_SIGNAL(result(bool)), TQT_SLOT(conn_result(bool)));
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
tryingHosts(list);
if(!self)
return;
@@ -1307,9 +1307,9 @@ void S5BManager::Item::setIncomingClient(SocksClient *sc)
printf("S5BManager::Item: %s [%s] successful incoming connection\n", peer.full().latin1(), sid.latin1());
#endif
- connect(sc, SIGNAL(readyRead()), SLOT(sc_readyRead()));
- connect(sc, SIGNAL(bytesWritten(int)), SLOT(sc_bytesWritten(int)));
- connect(sc, SIGNAL(error(int)), SLOT(sc_error(int)));
+ connect(sc, TQT_SIGNAL(readyRead()), TQT_SLOT(sc_readyRead()));
+ connect(sc, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sc_bytesWritten(int)));
+ connect(sc, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int)));
client = sc;
allowIncoming = false;
@@ -1335,7 +1335,7 @@ void S5BManager::Item::jt_finished()
if(state == Initiator) {
if(targetMode == Unknown) {
targetMode = NotFast;
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
accepted();
if(!self)
return;
@@ -1387,11 +1387,11 @@ void S5BManager::Item::jt_finished()
#endif
// connect to the proxy
proxy_conn = new S5BConnector;
- connect(proxy_conn, SIGNAL(result(bool)), SLOT(proxy_result(bool)));
+ connect(proxy_conn, TQT_SIGNAL(result(bool)), TQT_SLOT(proxy_result(bool)));
StreamHostList list;
list += proxy;
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
proxyConnect();
if(!self)
return;
@@ -1441,9 +1441,9 @@ void S5BManager::Item::conn_result(bool b)
printf("S5BManager::Item: %s [%s] successful outgoing connection\n", peer.full().latin1(), sid.latin1());
#endif
- connect(sc, SIGNAL(readyRead()), SLOT(sc_readyRead()));
- connect(sc, SIGNAL(bytesWritten(int)), SLOT(sc_bytesWritten(int)));
- connect(sc, SIGNAL(error(int)), SLOT(sc_error(int)));
+ connect(sc, TQT_SIGNAL(readyRead()), TQT_SLOT(sc_readyRead()));
+ connect(sc, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sc_bytesWritten(int)));
+ connect(sc, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int)));
m->doSuccess(peer, in_id, h.jid());
@@ -1492,9 +1492,9 @@ void S5BManager::Item::proxy_result(bool b)
delete proxy_conn;
proxy_conn = 0;
- connect(sc, SIGNAL(readyRead()), SLOT(sc_readyRead()));
- connect(sc, SIGNAL(bytesWritten(int)), SLOT(sc_bytesWritten(int)));
- connect(sc, SIGNAL(error(int)), SLOT(sc_error(int)));
+ connect(sc, TQT_SIGNAL(readyRead()), TQT_SLOT(sc_readyRead()));
+ connect(sc, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sc_bytesWritten(int)));
+ connect(sc, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int)));
client = sc;
client_udp = sc_udp;
@@ -1504,7 +1504,7 @@ void S5BManager::Item::proxy_result(bool b)
printf("activating proxy stream\n");
#endif
proxy_task = new JT_S5B(m->client()->rootTask());
- connect(proxy_task, SIGNAL(finished()), SLOT(proxy_finished()));
+ connect(proxy_task, TQT_SIGNAL(finished()), TQT_SLOT(proxy_finished()));
proxy_task->requestActivation(proxy.jid(), sid, peer);
proxy_task->go(true);
}
@@ -1608,7 +1608,7 @@ void S5BManager::Item::tryActivation()
printf("sending extra CR\n");
#endif
// must send [CR] to activate target streamhost
- QByteArray a(1);
+ TQByteArray a(1);
a[0] = '\r';
client->write(a);
}
@@ -1617,12 +1617,12 @@ void S5BManager::Item::tryActivation()
void S5BManager::Item::checkForActivation()
{
- QPtrList<SocksClient> clientList;
+ TQPtrList<SocksClient> clientList;
if(client)
clientList.append(client);
if(client_out)
clientList.append(client_out);
- QPtrListIterator<SocksClient> it(clientList);
+ TQPtrListIterator<SocksClient> it(clientList);
for(SocksClient *sc; (sc = it.current()); ++it) {
#ifdef S5B_DEBUG
printf("checking for activation\n");
@@ -1641,7 +1641,7 @@ void S5BManager::Item::checkForActivation()
#endif
if(sc->bytesAvailable() >= 1) {
clientList.removeRef(sc);
- QByteArray a = sc->read(1);
+ TQByteArray a = sc->read(1);
if(a[0] != '\r') {
delete sc;
return;
@@ -1752,13 +1752,13 @@ public:
SocksClient *client;
SocksUDP *client_udp;
StreamHost host;
- QString key;
+ TQString key;
bool udp;
int udp_tries;
- QTimer t;
+ TQTimer t;
Jid jid;
- Item(const Jid &self, const StreamHost &_host, const QString &_key, bool _udp) : QObject(0)
+ Item(const Jid &self, const StreamHost &_host, const TQString &_key, bool _udp) : TQObject(0)
{
jid = self;
host = _host;
@@ -1766,9 +1766,9 @@ public:
udp = _udp;
client = new SocksClient;
client_udp = 0;
- connect(client, SIGNAL(connected()), SLOT(sc_connected()));
- connect(client, SIGNAL(error(int)), SLOT(sc_error(int)));
- connect(&t, SIGNAL(timeout()), SLOT(trySendUDP()));
+ connect(client, TQT_SIGNAL(connected()), TQT_SLOT(sc_connected()));
+ connect(client, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int)));
+ connect(&t, TQT_SIGNAL(timeout()), TQT_SLOT(trySendUDP()));
}
~Item()
@@ -1826,8 +1826,8 @@ private slots:
}
// send initialization with our JID
- QCString cs = jid.full().utf8();
- QByteArray a(cs.length());
+ TQCString cs = jid.full().utf8();
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
client_udp->write(a);
++udp_tries;
@@ -1857,20 +1857,20 @@ class S5BConnector::Private
public:
SocksClient *active;
SocksUDP *active_udp;
- QPtrList<Item> itemList;
- QString key;
+ TQPtrList<Item> itemList;
+ TQString key;
StreamHost activeHost;
- QTimer t;
+ TQTimer t;
};
-S5BConnector::S5BConnector(QObject *parent)
-:QObject(parent)
+S5BConnector::S5BConnector(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
d->active = 0;
d->active_udp = 0;
d->itemList.setAutoDelete(true);
- connect(&d->t, SIGNAL(timeout()), SLOT(t_timeout()));
+ connect(&d->t, TQT_SIGNAL(timeout()), TQT_SLOT(t_timeout()));
}
S5BConnector::~S5BConnector()
@@ -1889,7 +1889,7 @@ void S5BConnector::reset()
d->itemList.clear();
}
-void S5BConnector::start(const Jid &self, const StreamHostList &hosts, const QString &key, bool udp, int timeout)
+void S5BConnector::start(const Jid &self, const StreamHostList &hosts, const TQString &key, bool udp, int timeout)
{
reset();
@@ -1898,7 +1898,7 @@ void S5BConnector::start(const Jid &self, const StreamHostList &hosts, const QSt
#endif
for(StreamHostList::ConstIterator it = hosts.begin(); it != hosts.end(); ++it) {
Item *i = new Item(self, *it, key, udp);
- connect(i, SIGNAL(result(bool)), SLOT(item_result(bool)));
+ connect(i, TQT_SIGNAL(result(bool)), TQT_SLOT(item_result(bool)));
d->itemList.append(i);
i->start();
}
@@ -1964,7 +1964,7 @@ void S5BConnector::t_timeout()
void S5BConnector::man_udpSuccess(const Jid &streamHost)
{
// was anyone sending to this streamhost?
- QPtrListIterator<Item> it(d->itemList);
+ TQPtrListIterator<Item> it(d->itemList);
for(Item *i; (i = it.current()); ++it) {
if(i->host.jid().compare(streamHost) && i->client_udp) {
i->udpSuccess();
@@ -1981,17 +1981,17 @@ class S5BServer::Item : public QObject
Q_OBJECT
public:
SocksClient *client;
- QString host;
- QTimer expire;
+ TQString host;
+ TQTimer expire;
- Item(SocksClient *c) : QObject(0)
+ Item(SocksClient *c) : TQObject(0)
{
client = c;
- connect(client, SIGNAL(incomingMethods(int)), SLOT(sc_incomingMethods(int)));
- connect(client, SIGNAL(incomingConnectRequest(const QString &, int)), SLOT(sc_incomingConnectRequest(const QString &, int)));
- connect(client, SIGNAL(error(int)), SLOT(sc_error(int)));
+ connect(client, TQT_SIGNAL(incomingMethods(int)), TQT_SLOT(sc_incomingMethods(int)));
+ connect(client, TQT_SIGNAL(incomingConnectRequest(const TQString &, int)), TQT_SLOT(sc_incomingConnectRequest(const TQString &, int)));
+ connect(client, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int)));
- connect(&expire, SIGNAL(timeout()), SLOT(doError()));
+ connect(&expire, TQT_SIGNAL(timeout()), TQT_SLOT(doError()));
resetExpiration();
}
@@ -2025,7 +2025,7 @@ private slots:
doError();
}
- void sc_incomingConnectRequest(const QString &_host, int port)
+ void sc_incomingConnectRequest(const TQString &_host, int port)
{
if(port == 0) {
host = _host;
@@ -2046,18 +2046,18 @@ class S5BServer::Private
{
public:
SocksServer serv;
- QStringList hostList;
- QPtrList<S5BManager> manList;
- QPtrList<Item> itemList;
+ TQStringList hostList;
+ TQPtrList<S5BManager> manList;
+ TQPtrList<Item> itemList;
};
-S5BServer::S5BServer(QObject *parent)
-:QObject(parent)
+S5BServer::S5BServer(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
d->itemList.setAutoDelete(true);
- connect(&d->serv, SIGNAL(incomingReady()), SLOT(ss_incomingReady()));
- connect(&d->serv, SIGNAL(incomingUDP(const QString &, int, const QHostAddress &, int, const QByteArray &)), SLOT(ss_incomingUDP(const QString &, int, const QHostAddress &, int, const QByteArray &)));
+ connect(&d->serv, TQT_SIGNAL(incomingReady()), TQT_SLOT(ss_incomingReady()));
+ connect(&d->serv, TQT_SIGNAL(incomingUDP(const TQString &, int, const TQHostAddress &, int, const TQByteArray &)), TQT_SLOT(ss_incomingUDP(const TQString &, int, const TQHostAddress &, int, const TQByteArray &)));
}
S5BServer::~S5BServer()
@@ -2082,12 +2082,12 @@ void S5BServer::stop()
d->serv.stop();
}
-void S5BServer::setHostList(const QStringList &list)
+void S5BServer::setHostList(const TQStringList &list)
{
d->hostList = list;
}
-QStringList S5BServer::hostList() const
+TQStringList S5BServer::hostList() const
{
return d->hostList;
}
@@ -2103,16 +2103,16 @@ void S5BServer::ss_incomingReady()
#ifdef S5B_DEBUG
printf("S5BServer: incoming connection from %s:%d\n", i->client->peerAddress().toString().latin1(), i->client->peerPort());
#endif
- connect(i, SIGNAL(result(bool)), SLOT(item_result(bool)));
+ connect(i, TQT_SIGNAL(result(bool)), TQT_SLOT(item_result(bool)));
d->itemList.append(i);
}
-void S5BServer::ss_incomingUDP(const QString &host, int port, const QHostAddress &addr, int sourcePort, const QByteArray &data)
+void S5BServer::ss_incomingUDP(const TQString &host, int port, const TQHostAddress &addr, int sourcePort, const TQByteArray &data)
{
if(port != 0 || port != 1)
return;
- QPtrListIterator<S5BManager> it(d->manList);
+ TQPtrListIterator<S5BManager> it(d->manList);
for(S5BManager *m; (m = it.current()); ++it) {
if(m->srv_ownsHash(host)) {
m->srv_incomingUDP(port == 1 ? true : false, addr, sourcePort, host, data);
@@ -2134,11 +2134,11 @@ void S5BServer::item_result(bool b)
SocksClient *c = i->client;
i->client = 0;
- QString key = i->host;
+ TQString key = i->host;
d->itemList.removeRef(i);
// find the appropriate manager for this incoming connection
- QPtrListIterator<S5BManager> it(d->manList);
+ TQPtrListIterator<S5BManager> it(d->manList);
for(S5BManager *m; (m = it.current()); ++it) {
if(m->srv_ownsHash(key)) {
m->srv_incomingReady(c, key);
@@ -2162,18 +2162,18 @@ void S5BServer::unlink(S5BManager *m)
void S5BServer::unlinkAll()
{
- QPtrListIterator<S5BManager> it(d->manList);
+ TQPtrListIterator<S5BManager> it(d->manList);
for(S5BManager *m; (m = it.current()); ++it)
m->srv_unlink();
d->manList.clear();
}
-const QPtrList<S5BManager> & S5BServer::managerList() const
+const TQPtrList<S5BManager> & S5BServer::managerList() const
{
return d->manList;
}
-void S5BServer::writeUDP(const QHostAddress &addr, int port, const QByteArray &data)
+void S5BServer::writeUDP(const TQHostAddress &addr, int port, const TQByteArray &data)
{
d->serv.writeUDP(addr, port, data);
}
@@ -2184,12 +2184,12 @@ void S5BServer::writeUDP(const QHostAddress &addr, int port, const QByteArray &d
class JT_S5B::Private
{
public:
- QDomElement iq;
+ TQDomElement iq;
Jid to;
Jid streamHost;
StreamHost proxyInfo;
int mode;
- QTimer t;
+ TQTimer t;
};
JT_S5B::JT_S5B(Task *parent)
@@ -2197,7 +2197,7 @@ JT_S5B::JT_S5B(Task *parent)
{
d = new Private;
d->mode = -1;
- connect(&d->t, SIGNAL(timeout()), SLOT(t_timeout()));
+ connect(&d->t, TQT_SIGNAL(timeout()), TQT_SLOT(t_timeout()));
}
JT_S5B::~JT_S5B()
@@ -2205,32 +2205,32 @@ JT_S5B::~JT_S5B()
delete d;
}
-void JT_S5B::request(const Jid &to, const QString &sid, const StreamHostList &hosts, bool fast, bool udp)
+void JT_S5B::request(const Jid &to, const TQString &sid, const StreamHostList &hosts, bool fast, bool udp)
{
d->mode = 0;
- QDomElement iq;
+ TQDomElement iq;
d->to = to;
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams");
query.setAttribute("sid", sid);
query.setAttribute("mode", udp ? "udp" : "tcp" );
iq.appendChild(query);
for(StreamHostList::ConstIterator it = hosts.begin(); it != hosts.end(); ++it) {
- QDomElement shost = doc()->createElement("streamhost");
+ TQDomElement shost = doc()->createElement("streamhost");
shost.setAttribute("jid", (*it).jid().full());
shost.setAttribute("host", (*it).host());
- shost.setAttribute("port", QString::number((*it).port()));
+ shost.setAttribute("port", TQString::number((*it).port()));
if((*it).isProxy()) {
- QDomElement p = doc()->createElement("proxy");
+ TQDomElement p = doc()->createElement("proxy");
p.setAttribute("xmlns", "http://affinix.com/jabber/stream");
shost.appendChild(p);
}
query.appendChild(shost);
}
if(fast) {
- QDomElement e = doc()->createElement("fast");
+ TQDomElement e = doc()->createElement("fast");
e.setAttribute("xmlns", "http://affinix.com/jabber/stream");
query.appendChild(e);
}
@@ -2241,27 +2241,27 @@ void JT_S5B::requestProxyInfo(const Jid &to)
{
d->mode = 1;
- QDomElement iq;
+ TQDomElement iq;
d->to = to;
iq = createIQ(doc(), "get", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams");
iq.appendChild(query);
d->iq = iq;
}
-void JT_S5B::requestActivation(const Jid &to, const QString &sid, const Jid &target)
+void JT_S5B::requestActivation(const Jid &to, const TQString &sid, const Jid &target)
{
d->mode = 2;
- QDomElement iq;
+ TQDomElement iq;
d->to = to;
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams");
query.setAttribute("sid", sid);
iq.appendChild(query);
- QDomElement act = doc()->createElement("activate");
+ TQDomElement act = doc()->createElement("activate");
act.appendChild(doc()->createTextNode(target.full()));
query.appendChild(act);
d->iq = iq;
@@ -2279,7 +2279,7 @@ void JT_S5B::onDisconnect()
d->t.stop();
}
-bool JT_S5B::take(const QDomElement &x)
+bool JT_S5B::take(const TQDomElement &x)
{
if(d->mode == -1)
return false;
@@ -2290,11 +2290,11 @@ bool JT_S5B::take(const QDomElement &x)
d->t.stop();
if(x.attribute("type") == "result") {
- QDomElement q = queryTag(x);
+ TQDomElement q = queryTag(x);
if(d->mode == 0) {
d->streamHost = "";
if(!q.isNull()) {
- QDomElement shost = q.elementsByTagName("streamhost-used").item(0).toElement();
+ TQDomElement shost = q.elementsByTagName("streamhost-used").item(0).toElement();
if(!shost.isNull())
d->streamHost = shost.attribute("jid");
}
@@ -2303,11 +2303,11 @@ bool JT_S5B::take(const QDomElement &x)
}
else if(d->mode == 1) {
if(!q.isNull()) {
- QDomElement shost = q.elementsByTagName("streamhost").item(0).toElement();
+ TQDomElement shost = q.elementsByTagName("streamhost").item(0).toElement();
if(!shost.isNull()) {
Jid j = shost.attribute("jid");
if(j.isValid()) {
- QString host = shost.attribute("host");
+ TQString host = shost.attribute("host");
if(!host.isEmpty()) {
int port = shost.attribute("port").toInt();
StreamHost h;
@@ -2367,11 +2367,11 @@ int JT_PushS5B::priority() const
return 1;
}
-bool JT_PushS5B::take(const QDomElement &e)
+bool JT_PushS5B::take(const TQDomElement &e)
{
// look for udpsuccess
if(e.tagName() == "message") {
- QDomElement x = e.elementsByTagName("udpsuccess").item(0).toElement();
+ TQDomElement x = e.elementsByTagName("udpsuccess").item(0).toElement();
if(!x.isNull() && x.attribute("xmlns") == "http://jabber.org/protocol/bytestreams") {
incomingUDPSuccess(Jid(x.attribute("from")), x.attribute("dstaddr"));
return true;
@@ -2393,22 +2393,22 @@ bool JT_PushS5B::take(const QDomElement &e)
return false;
Jid from(e.attribute("from"));
- QDomElement q = queryTag(e);
- QString sid = q.attribute("sid");
+ TQDomElement q = queryTag(e);
+ TQString sid = q.attribute("sid");
StreamHostList hosts;
- QDomNodeList nl = q.elementsByTagName("streamhost");
+ TQDomNodeList nl = q.elementsByTagName("streamhost");
for(uint n = 0; n < nl.count(); ++n) {
- QDomElement shost = nl.item(n).toElement();
+ TQDomElement shost = nl.item(n).toElement();
if(hosts.count() < MAXSTREAMHOSTS) {
Jid j = shost.attribute("jid");
if(!j.isValid())
continue;
- QString host = shost.attribute("host");
+ TQString host = shost.attribute("host");
if(host.isEmpty())
continue;
int port = shost.attribute("port").toInt();
- QDomElement p = shost.elementsByTagName("proxy").item(0).toElement();
+ TQDomElement p = shost.elementsByTagName("proxy").item(0).toElement();
bool isProxy = false;
if(!p.isNull() && p.attribute("xmlns") == "http://affinix.com/jabber/stream")
isProxy = true;
@@ -2423,7 +2423,7 @@ bool JT_PushS5B::take(const QDomElement &e)
}
bool fast = false;
- QDomElement t;
+ TQDomElement t;
t = q.elementsByTagName("fast").item(0).toElement();
if(!t.isNull() && t.attribute("xmlns") == "http://affinix.com/jabber/stream")
fast = true;
@@ -2440,43 +2440,43 @@ bool JT_PushS5B::take(const QDomElement &e)
return true;
}
-void JT_PushS5B::respondSuccess(const Jid &to, const QString &id, const Jid &streamHost)
+void JT_PushS5B::respondSuccess(const Jid &to, const TQString &id, const Jid &streamHost)
{
- QDomElement iq = createIQ(doc(), "result", to.full(), id);
- QDomElement query = doc()->createElement("query");
+ TQDomElement iq = createIQ(doc(), "result", to.full(), id);
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams");
iq.appendChild(query);
- QDomElement shost = doc()->createElement("streamhost-used");
+ TQDomElement shost = doc()->createElement("streamhost-used");
shost.setAttribute("jid", streamHost.full());
query.appendChild(shost);
send(iq);
}
-void JT_PushS5B::respondError(const Jid &to, const QString &id, int code, const QString &str)
+void JT_PushS5B::respondError(const Jid &to, const TQString &id, int code, const TQString &str)
{
- QDomElement iq = createIQ(doc(), "error", to.full(), id);
- QDomElement err = textTag(doc(), "error", str);
- err.setAttribute("code", QString::number(code));
+ TQDomElement iq = createIQ(doc(), "error", to.full(), id);
+ TQDomElement err = textTag(doc(), "error", str);
+ err.setAttribute("code", TQString::number(code));
iq.appendChild(err);
send(iq);
}
-void JT_PushS5B::sendUDPSuccess(const Jid &to, const QString &dstaddr)
+void JT_PushS5B::sendUDPSuccess(const Jid &to, const TQString &dstaddr)
{
- QDomElement m = doc()->createElement("message");
+ TQDomElement m = doc()->createElement("message");
m.setAttribute("to", to.full());
- QDomElement u = doc()->createElement("udpsuccess");
+ TQDomElement u = doc()->createElement("udpsuccess");
u.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams");
u.setAttribute("dstaddr", dstaddr);
m.appendChild(u);
send(m);
}
-void JT_PushS5B::sendActivate(const Jid &to, const QString &sid, const Jid &streamHost)
+void JT_PushS5B::sendActivate(const Jid &to, const TQString &sid, const Jid &streamHost)
{
- QDomElement m = doc()->createElement("message");
+ TQDomElement m = doc()->createElement("message");
m.setAttribute("to", to.full());
- QDomElement act = doc()->createElement("activate");
+ TQDomElement act = doc()->createElement("activate");
act.setAttribute("xmlns", "http://affinix.com/jabber/stream");
act.setAttribute("sid", sid);
act.setAttribute("jid", streamHost.full());
@@ -2498,7 +2498,7 @@ const Jid & StreamHost::jid() const
return j;
}
-const QString & StreamHost::host() const
+const TQString & StreamHost::host() const
{
return v_host;
}
@@ -2518,7 +2518,7 @@ void StreamHost::setJid(const Jid &_j)
j = _j;
}
-void StreamHost::setHost(const QString &host)
+void StreamHost::setHost(const TQString &host)
{
v_host = host;
}
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/s5b.h b/kopete/protocols/jabber/libiris/iris/jabber/s5b.h
index 353b5f75..d8c301c1 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/s5b.h
+++ b/kopete/protocols/jabber/libiris/iris/jabber/s5b.h
@@ -21,10 +21,10 @@
#ifndef XMPP_S5B_H
#define XMPP_S5B_H
-#include<qobject.h>
-#include<qcstring.h>
-#include<qptrlist.h>
-#include<qvaluelist.h>
+#include<tqobject.h>
+#include<tqcstring.h>
+#include<tqptrlist.h>
+#include<tqvaluelist.h>
#include"im.h"
#include"bytestream.h"
@@ -38,23 +38,23 @@ namespace XMPP
class S5BManager;
class S5BServer;
struct S5BRequest;
- typedef QValueList<StreamHost> StreamHostList;
- typedef QPtrList<S5BConnection> S5BConnectionList;
- typedef QPtrListIterator<S5BConnection> S5BConnectionListIt;
+ typedef TQValueList<StreamHost> StreamHostList;
+ typedef TQPtrList<S5BConnection> S5BConnectionList;
+ typedef TQPtrListIterator<S5BConnection> S5BConnectionListIt;
class S5BDatagram
{
public:
S5BDatagram();
- S5BDatagram(int source, int dest, const QByteArray &data);
+ S5BDatagram(int source, int dest, const TQByteArray &data);
int sourcePort() const;
int destPort() const;
- QByteArray data() const;
+ TQByteArray data() const;
private:
int _source, _dest;
- QByteArray _buf;
+ TQByteArray _buf;
};
class S5BConnection : public ByteStream
@@ -69,19 +69,19 @@ namespace XMPP
Jid proxy() const;
void setProxy(const Jid &proxy);
- void connectToJid(const Jid &peer, const QString &sid, Mode m = Stream);
+ void connectToJid(const Jid &peer, const TQString &sid, Mode m = Stream);
void accept();
void close();
Jid peer() const;
- QString sid() const;
+ TQString sid() const;
bool isRemote() const;
Mode mode() const;
int state() const;
bool isOpen() const;
- void write(const QByteArray &);
- QByteArray read(int bytes=0);
+ void write(const TQByteArray &);
+ TQByteArray read(int bytes=0);
int bytesAvailable() const;
int bytesToWrite() const;
@@ -109,22 +109,22 @@ namespace XMPP
void sc_bytesWritten(int);
void sc_error(int);
- void su_packetReady(const QByteArray &buf);
+ void su_packetReady(const TQByteArray &buf);
private:
class Private;
Private *d;
void reset(bool clear=false);
- void handleUDP(const QByteArray &buf);
- void sendUDP(const QByteArray &buf);
+ void handleUDP(const TQByteArray &buf);
+ void sendUDP(const TQByteArray &buf);
friend class S5BManager;
void man_waitForAccept(const S5BRequest &r);
void man_clientReady(SocksClient *, SocksUDP *);
- void man_udpReady(const QByteArray &buf);
+ void man_udpReady(const TQByteArray &buf);
void man_failed(int);
- S5BConnection(S5BManager *, QObject *parent=0);
+ S5BConnection(S5BManager *, TQObject *parent=0);
};
class S5BManager : public QObject
@@ -138,8 +138,8 @@ namespace XMPP
S5BServer *server() const;
void setServer(S5BServer *s);
- bool isAcceptableSID(const Jid &peer, const QString &sid) const;
- QString genUniqueSID(const Jid &peer) const;
+ bool isAcceptableSID(const Jid &peer, const TQString &sid) const;
+ TQString genUniqueSID(const Jid &peer) const;
S5BConnection *createConnection();
S5BConnection *takeIncoming();
@@ -152,8 +152,8 @@ namespace XMPP
private slots:
void ps_incoming(const S5BRequest &req);
- void ps_incomingUDPSuccess(const Jid &from, const QString &dstaddr);
- void ps_incomingActivate(const Jid &from, const QString &sid, const Jid &streamHost);
+ void ps_incomingUDPSuccess(const Jid &from, const TQString &dstaddr);
+ void ps_incomingActivate(const Jid &from, const TQString &sid, const Jid &streamHost);
void item_accepted();
void item_tryingHosts(const StreamHostList &list);
void item_proxyConnect();
@@ -166,12 +166,12 @@ namespace XMPP
class Private;
Private *d;
- S5BConnection *findIncoming(const Jid &from, const QString &sid) const;
+ S5BConnection *findIncoming(const Jid &from, const TQString &sid) const;
Entry *findEntry(S5BConnection *) const;
Entry *findEntry(Item *) const;
- Entry *findEntryByHash(const QString &key) const;
- Entry *findEntryBySID(const Jid &peer, const QString &sid) const;
- Entry *findServerEntryByHash(const QString &key) const;
+ Entry *findEntryByHash(const TQString &key) const;
+ Entry *findEntryBySID(const Jid &peer, const TQString &sid) const;
+ Entry *findServerEntryByHash(const TQString &key) const;
void entryContinue(Entry *e);
void queryProxy(Entry *e);
@@ -182,29 +182,29 @@ namespace XMPP
void con_accept(S5BConnection *);
void con_reject(S5BConnection *);
void con_unlink(S5BConnection *);
- void con_sendUDP(S5BConnection *, const QByteArray &buf);
+ void con_sendUDP(S5BConnection *, const TQByteArray &buf);
friend class S5BServer;
- bool srv_ownsHash(const QString &key) const;
- void srv_incomingReady(SocksClient *sc, const QString &key);
- void srv_incomingUDP(bool init, const QHostAddress &addr, int port, const QString &key, const QByteArray &data);
+ bool srv_ownsHash(const TQString &key) const;
+ void srv_incomingReady(SocksClient *sc, const TQString &key);
+ void srv_incomingUDP(bool init, const TQHostAddress &addr, int port, const TQString &key, const TQByteArray &data);
void srv_unlink();
friend class Item;
- void doSuccess(const Jid &peer, const QString &id, const Jid &streamHost);
- void doError(const Jid &peer, const QString &id, int, const QString &);
- void doActivate(const Jid &peer, const QString &sid, const Jid &streamHost);
+ void doSuccess(const Jid &peer, const TQString &id, const Jid &streamHost);
+ void doError(const Jid &peer, const TQString &id, int, const TQString &);
+ void doActivate(const Jid &peer, const TQString &sid, const Jid &streamHost);
};
class S5BConnector : public QObject
{
Q_OBJECT
public:
- S5BConnector(QObject *parent=0);
+ S5BConnector(TQObject *parent=0);
~S5BConnector();
void reset();
- void start(const Jid &self, const StreamHostList &hosts, const QString &key, bool udp, int timeout);
+ void start(const Jid &self, const StreamHostList &hosts, const TQString &key, bool udp, int timeout);
SocksClient *takeClient();
SocksUDP *takeUDP();
StreamHost streamHostUsed() const;
@@ -231,21 +231,21 @@ namespace XMPP
{
Q_OBJECT
public:
- S5BServer(QObject *par=0);
+ S5BServer(TQObject *par=0);
~S5BServer();
bool isActive() const;
bool start(int port);
void stop();
int port() const;
- void setHostList(const QStringList &);
- QStringList hostList() const;
+ void setHostList(const TQStringList &);
+ TQStringList hostList() const;
class Item;
private slots:
void ss_incomingReady();
- void ss_incomingUDP(const QString &host, int port, const QHostAddress &addr, int sourcePort, const QByteArray &data);
+ void ss_incomingUDP(const TQString &host, int port, const TQHostAddress &addr, int sourcePort, const TQByteArray &data);
void item_result(bool);
private:
@@ -256,8 +256,8 @@ namespace XMPP
void link(S5BManager *);
void unlink(S5BManager *);
void unlinkAll();
- const QPtrList<S5BManager> & managerList() const;
- void writeUDP(const QHostAddress &addr, int port, const QByteArray &data);
+ const TQPtrList<S5BManager> & managerList() const;
+ void writeUDP(const TQHostAddress &addr, int port, const TQByteArray &data);
};
class JT_S5B : public Task
@@ -267,13 +267,13 @@ namespace XMPP
JT_S5B(Task *);
~JT_S5B();
- void request(const Jid &to, const QString &sid, const StreamHostList &hosts, bool fast, bool udp=false);
+ void request(const Jid &to, const TQString &sid, const StreamHostList &hosts, bool fast, bool udp=false);
void requestProxyInfo(const Jid &to);
- void requestActivation(const Jid &to, const QString &sid, const Jid &target);
+ void requestActivation(const Jid &to, const TQString &sid, const Jid &target);
void onGo();
void onDisconnect();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
Jid streamHostUsed() const;
StreamHost proxyInfo() const;
@@ -289,7 +289,7 @@ namespace XMPP
struct S5BRequest
{
Jid from;
- QString id, sid;
+ TQString id, sid;
StreamHostList hosts;
bool fast;
bool udp;
@@ -303,17 +303,17 @@ namespace XMPP
int priority() const;
- void respondSuccess(const Jid &to, const QString &id, const Jid &streamHost);
- void respondError(const Jid &to, const QString &id, int code, const QString &str);
- void sendUDPSuccess(const Jid &to, const QString &dstaddr);
- void sendActivate(const Jid &to, const QString &sid, const Jid &streamHost);
+ void respondSuccess(const Jid &to, const TQString &id, const Jid &streamHost);
+ void respondError(const Jid &to, const TQString &id, int code, const TQString &str);
+ void sendUDPSuccess(const Jid &to, const TQString &dstaddr);
+ void sendActivate(const Jid &to, const TQString &sid, const Jid &streamHost);
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
signals:
void incoming(const S5BRequest &req);
- void incomingUDPSuccess(const Jid &from, const QString &dstaddr);
- void incomingActivate(const Jid &from, const QString &sid, const Jid &streamHost);
+ void incomingUDPSuccess(const Jid &from, const TQString &dstaddr);
+ void incomingActivate(const Jid &from, const TQString &sid, const Jid &streamHost);
};
class StreamHost
@@ -322,17 +322,17 @@ namespace XMPP
StreamHost();
const Jid & jid() const;
- const QString & host() const;
+ const TQString & host() const;
int port() const;
bool isProxy() const;
void setJid(const Jid &);
- void setHost(const QString &);
+ void setHost(const TQString &);
void setPort(int);
void setIsProxy(bool);
private:
Jid j;
- QString v_host;
+ TQString v_host;
int v_port;
bool proxy;
};
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp
index ee6857e3..2ca012c1 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp
+++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp
@@ -20,7 +20,7 @@
#include"xmpp_ibb.h"
-#include<qtimer.h>
+#include<tqtimer.h>
#include"xmpp_xmlcommon.h"
#include"base64.h"
@@ -44,14 +44,14 @@ public:
int state;
Jid peer;
- QString sid;
+ TQString sid;
IBBManager *m;
JT_IBB *j;
- QDomElement comment;
- QString iq_id;
+ TQDomElement comment;
+ TQString iq_id;
int blockSize;
- QByteArray recvbuf, sendbuf;
+ TQByteArray recvbuf, sendbuf;
bool closePending, closing;
int id;
@@ -67,7 +67,7 @@ IBBConnection::IBBConnection(IBBManager *m)
++num_conn;
d->id = id_conn++;
- QString dstr; dstr.sprintf("IBBConnection[%d]: constructing, count=%d\n", d->id, num_conn);
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: constructing, count=%d\n", d->id, num_conn);
d->m->client()->debug(dstr);
}
@@ -91,13 +91,13 @@ IBBConnection::~IBBConnection()
reset(true);
--num_conn;
- QString dstr; dstr.sprintf("IBBConnection[%d]: destructing, count=%d\n", d->id, num_conn);
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: destructing, count=%d\n", d->id, num_conn);
d->m->client()->debug(dstr);
delete d;
}
-void IBBConnection::connectToJid(const Jid &peer, const QDomElement &comment)
+void IBBConnection::connectToJid(const Jid &peer, const TQDomElement &comment)
{
close();
reset(true);
@@ -106,11 +106,11 @@ void IBBConnection::connectToJid(const Jid &peer, const QDomElement &comment)
d->peer = peer;
d->comment = comment;
- QString dstr; dstr.sprintf("IBBConnection[%d]: initiating request to %s\n", d->id, peer.full().latin1());
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: initiating request to %s\n", d->id, peer.full().latin1());
d->m->client()->debug(dstr);
d->j = new JT_IBB(d->m->client()->rootTask());
- connect(d->j, SIGNAL(finished()), SLOT(ibb_finished()));
+ connect(d->j, TQT_SIGNAL(finished()), TQT_SLOT(ibb_finished()));
d->j->request(d->peer, comment);
d->j->go(true);
}
@@ -120,7 +120,7 @@ void IBBConnection::accept()
if(d->state != WaitingForAccept)
return;
- QString dstr; dstr.sprintf("IBBConnection[%d]: accepting %s [%s]\n", d->id, d->peer.full().latin1(), d->sid.latin1());
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: accepting %s [%s]\n", d->id, d->peer.full().latin1(), d->sid.latin1());
d->m->client()->debug(dstr);
d->m->doAccept(this, d->iq_id);
@@ -139,7 +139,7 @@ void IBBConnection::close()
return;
}
- QString dstr; dstr.sprintf("IBBConnection[%d]: closing\n", d->id);
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: closing\n", d->id);
d->m->client()->debug(dstr);
if(d->state == Active) {
@@ -152,7 +152,7 @@ void IBBConnection::close()
// send a close packet
JT_IBB *j = new JT_IBB(d->m->client()->rootTask());
- j->sendData(d->peer, d->sid, QByteArray(), true);
+ j->sendData(d->peer, d->sid, TQByteArray(), true);
j->go(true);
}
@@ -169,12 +169,12 @@ Jid IBBConnection::peer() const
return d->peer;
}
-QString IBBConnection::streamid() const
+TQString IBBConnection::streamid() const
{
return d->sid;
}
-QDomElement IBBConnection::comment() const
+TQDomElement IBBConnection::comment() const
{
return d->comment;
}
@@ -187,7 +187,7 @@ bool IBBConnection::isOpen() const
return false;
}
-void IBBConnection::write(const QByteArray &a)
+void IBBConnection::write(const TQByteArray &a)
{
if(d->state != Active || d->closePending || d->closing)
return;
@@ -200,10 +200,10 @@ void IBBConnection::write(const QByteArray &a)
trySend();
}
-QByteArray IBBConnection::read(int)
+TQByteArray IBBConnection::read(int)
{
// TODO: obey argument
- QByteArray a = d->recvbuf.copy();
+ TQByteArray a = d->recvbuf.copy();
d->recvbuf.resize(0);
return a;
}
@@ -218,7 +218,7 @@ int IBBConnection::bytesToWrite() const
return d->sendbuf.size();
}
-void IBBConnection::waitForAccept(const Jid &peer, const QString &sid, const QDomElement &comment, const QString &iq_id)
+void IBBConnection::waitForAccept(const Jid &peer, const TQString &sid, const TQDomElement &comment, const TQString &iq_id)
{
close();
reset(true);
@@ -230,7 +230,7 @@ void IBBConnection::waitForAccept(const Jid &peer, const QString &sid, const QDo
d->iq_id = iq_id;
}
-void IBBConnection::takeIncomingData(const QByteArray &a, bool close)
+void IBBConnection::takeIncomingData(const TQByteArray &a, bool close)
{
// append to the end of our recv buffer
int oldsize = d->recvbuf.size();
@@ -254,7 +254,7 @@ void IBBConnection::ibb_finished()
if(j->mode() == JT_IBB::ModeRequest) {
d->sid = j->streamid();
- QString dstr; dstr.sprintf("IBBConnection[%d]: %s [%s] accepted.\n", d->id, d->peer.full().latin1(), d->sid.latin1());
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: %s [%s] accepted.\n", d->id, d->peer.full().latin1(), d->sid.latin1());
d->m->client()->debug(dstr);
d->state = Active;
@@ -270,12 +270,12 @@ void IBBConnection::ibb_finished()
}
if(!d->sendbuf.isEmpty() || d->closePending)
- QTimer::singleShot(IBB_PACKET_DELAY, this, SLOT(trySend()));
+ TQTimer::singleShot(IBB_PACKET_DELAY, this, TQT_SLOT(trySend()));
}
}
else {
if(j->mode() == JT_IBB::ModeRequest) {
- QString dstr; dstr.sprintf("IBBConnection[%d]: %s refused.\n", d->id, d->peer.full().latin1());
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: %s refused.\n", d->id, d->peer.full().latin1());
d->m->client()->debug(dstr);
reset(true);
@@ -294,7 +294,7 @@ void IBBConnection::trySend()
if(d->j)
return;
- QByteArray a;
+ TQByteArray a;
if(!d->sendbuf.isEmpty()) {
// take a chunk
if(d->sendbuf.size() < IBB_PACKET_SIZE)
@@ -326,7 +326,7 @@ void IBBConnection::trySend()
d->blockSize = a.size();
d->j = new JT_IBB(d->m->client()->rootTask());
- connect(d->j, SIGNAL(finished()), SLOT(ibb_finished()));
+ connect(d->j, TQT_SIGNAL(finished()), TQT_SLOT(ibb_finished()));
d->j->sendData(d->peer, d->sid, a, doClose);
d->j->go(true);
}
@@ -347,14 +347,14 @@ public:
};
IBBManager::IBBManager(Client *parent)
-:QObject(parent)
+:TQObject(parent)
{
d = new Private;
d->client = parent;
d->ibb = new JT_IBB(d->client->rootTask(), true);
- connect(d->ibb, SIGNAL(incomingRequest(const Jid &, const QString &, const QDomElement &)), SLOT(ibb_incomingRequest(const Jid &, const QString &, const QDomElement &)));
- connect(d->ibb, SIGNAL(incomingData(const Jid &, const QString &, const QString &, const QByteArray &, bool)), SLOT(ibb_incomingData(const Jid &, const QString &, const QString &, const QByteArray &, bool)));
+ connect(d->ibb, TQT_SIGNAL(incomingRequest(const Jid &, const TQString &, const TQDomElement &)), TQT_SLOT(ibb_incomingRequest(const Jid &, const TQString &, const TQDomElement &)));
+ connect(d->ibb, TQT_SIGNAL(incomingData(const Jid &, const TQString &, const TQString &, const TQByteArray &, bool)), TQT_SLOT(ibb_incomingData(const Jid &, const TQString &, const TQString &, const TQByteArray &, bool)));
}
IBBManager::~IBBManager()
@@ -380,9 +380,9 @@ IBBConnection *IBBManager::takeIncoming()
return c;
}
-void IBBManager::ibb_incomingRequest(const Jid &from, const QString &id, const QDomElement &comment)
+void IBBManager::ibb_incomingRequest(const Jid &from, const TQString &id, const TQDomElement &comment)
{
- QString sid = genUniqueKey();
+ TQString sid = genUniqueKey();
// create a "waiting" connection
IBBConnection *c = new IBBConnection(this);
@@ -391,7 +391,7 @@ void IBBManager::ibb_incomingRequest(const Jid &from, const QString &id, const Q
incomingReady();
}
-void IBBManager::ibb_incomingData(const Jid &from, const QString &streamid, const QString &id, const QByteArray &data, bool close)
+void IBBManager::ibb_incomingData(const Jid &from, const TQString &streamid, const TQString &id, const TQByteArray &data, bool close)
{
IBBConnection *c = findConnection(streamid, from);
if(!c) {
@@ -403,14 +403,14 @@ void IBBManager::ibb_incomingData(const Jid &from, const QString &streamid, cons
}
}
-QString IBBManager::genKey() const
+TQString IBBManager::genKey() const
{
- QString key = "ibb_";
+ TQString key = "ibb_";
for(int i = 0; i < 4; ++i) {
int word = rand() & 0xffff;
for(int n = 0; n < 4; ++n) {
- QString s;
+ TQString s;
s.sprintf("%x", (word >> (n * 4)) & 0xf);
key.append(s);
}
@@ -419,10 +419,10 @@ QString IBBManager::genKey() const
return key;
}
-QString IBBManager::genUniqueKey() const
+TQString IBBManager::genUniqueKey() const
{
// get unused key
- QString key;
+ TQString key;
while(1) {
key = genKey();
@@ -443,7 +443,7 @@ void IBBManager::unlink(IBBConnection *c)
d->activeConns.removeRef(c);
}
-IBBConnection *IBBManager::findConnection(const QString &sid, const Jid &peer) const
+IBBConnection *IBBManager::findConnection(const TQString &sid, const Jid &peer) const
{
IBBConnectionListIt it(d->activeConns);
for(IBBConnection *c; (c = it.current()); ++it) {
@@ -453,12 +453,12 @@ IBBConnection *IBBManager::findConnection(const QString &sid, const Jid &peer) c
return 0;
}
-void IBBManager::doAccept(IBBConnection *c, const QString &id)
+void IBBManager::doAccept(IBBConnection *c, const TQString &id)
{
d->ibb->respondSuccess(c->peer(), id, c->streamid());
}
-void IBBManager::doReject(IBBConnection *c, const QString &id, int code, const QString &str)
+void IBBManager::doReject(IBBConnection *c, const TQString &id, int code, const TQString &str)
{
d->ibb->respondError(c->peer(), id, code, str);
}
@@ -472,11 +472,11 @@ class JT_IBB::Private
public:
Private() {}
- QDomElement iq;
+ TQDomElement iq;
int mode;
bool serve;
Jid to;
- QString streamid;
+ TQString streamid;
};
JT_IBB::JT_IBB(Task *parent, bool serve)
@@ -491,60 +491,60 @@ JT_IBB::~JT_IBB()
delete d;
}
-void JT_IBB::request(const Jid &to, const QDomElement &comment)
+void JT_IBB::request(const Jid &to, const TQDomElement &comment)
{
d->mode = ModeRequest;
- QDomElement iq;
+ TQDomElement iq;
d->to = to;
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/ibb");
iq.appendChild(query);
query.appendChild(comment);
d->iq = iq;
}
-void JT_IBB::sendData(const Jid &to, const QString &streamid, const QByteArray &a, bool close)
+void JT_IBB::sendData(const Jid &to, const TQString &streamid, const TQByteArray &a, bool close)
{
d->mode = ModeSendData;
- QDomElement iq;
+ TQDomElement iq;
d->to = to;
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/ibb");
iq.appendChild(query);
query.appendChild(textTag(doc(), "streamid", streamid));
if(!a.isEmpty())
query.appendChild(textTag(doc(), "data", Base64::arrayToString(a)));
if(close) {
- QDomElement c = doc()->createElement("close");
+ TQDomElement c = doc()->createElement("close");
query.appendChild(c);
}
d->iq = iq;
}
-void JT_IBB::respondSuccess(const Jid &to, const QString &id, const QString &streamid)
+void JT_IBB::respondSuccess(const Jid &to, const TQString &id, const TQString &streamid)
{
- QDomElement iq = createIQ(doc(), "result", to.full(), id);
- QDomElement query = doc()->createElement("query");
+ TQDomElement iq = createIQ(doc(), "result", to.full(), id);
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/ibb");
iq.appendChild(query);
query.appendChild(textTag(doc(), "streamid", streamid));
send(iq);
}
-void JT_IBB::respondError(const Jid &to, const QString &id, int code, const QString &str)
+void JT_IBB::respondError(const Jid &to, const TQString &id, int code, const TQString &str)
{
- QDomElement iq = createIQ(doc(), "error", to.full(), id);
- QDomElement err = textTag(doc(), "error", str);
- err.setAttribute("code", QString::number(code));
+ TQDomElement iq = createIQ(doc(), "error", to.full(), id);
+ TQDomElement err = textTag(doc(), "error", str);
+ err.setAttribute("code", TQString::number(code));
iq.appendChild(err);
send(iq);
}
-void JT_IBB::respondAck(const Jid &to, const QString &id)
+void JT_IBB::respondAck(const Jid &to, const TQString &id)
{
- QDomElement iq = createIQ(doc(), "result", to.full(), id);
+ TQDomElement iq = createIQ(doc(), "result", to.full(), id);
send(iq);
}
@@ -553,7 +553,7 @@ void JT_IBB::onGo()
send(d->iq);
}
-bool JT_IBB::take(const QDomElement &e)
+bool JT_IBB::take(const TQDomElement &e)
{
if(d->serve) {
// must be an iq-set tag
@@ -564,18 +564,18 @@ bool JT_IBB::take(const QDomElement &e)
return false;
Jid from(e.attribute("from"));
- QString id = e.attribute("id");
- QDomElement q = queryTag(e);
+ TQString id = e.attribute("id");
+ TQDomElement q = queryTag(e);
bool found;
- QDomElement s = findSubTag(q, "streamid", &found);
+ TQDomElement s = findSubTag(q, "streamid", &found);
if(!found) {
- QDomElement comment = findSubTag(q, "comment", &found);
+ TQDomElement comment = findSubTag(q, "comment", &found);
incomingRequest(from, id, comment);
}
else {
- QString sid = tagContent(s);
- QByteArray a;
+ TQString sid = tagContent(s);
+ TQByteArray a;
bool close = false;
s = findSubTag(q, "data", &found);
if(found)
@@ -595,12 +595,12 @@ bool JT_IBB::take(const QDomElement &e)
return false;
if(e.attribute("type") == "result") {
- QDomElement q = queryTag(e);
+ TQDomElement q = queryTag(e);
// request
if(d->mode == ModeRequest) {
bool found;
- QDomElement s = findSubTag(q, "streamid", &found);
+ TQDomElement s = findSubTag(q, "streamid", &found);
if(found)
d->streamid = tagContent(s);
else
@@ -621,7 +621,7 @@ bool JT_IBB::take(const QDomElement &e)
}
}
-QString JT_IBB::streamid() const
+TQString JT_IBB::streamid() const
{
return d->streamid;
}
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h
index 682c5a06..e5a0ed93 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h
+++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h
@@ -21,10 +21,10 @@
#ifndef JABBER_IBB_H
#define JABBER_IBB_H
-#include<qobject.h>
-#include<qdom.h>
-#include<qstring.h>
-#include<qptrlist.h>
+#include<tqobject.h>
+#include<tqdom.h>
+#include<tqstring.h>
+#include<tqptrlist.h>
#include"bytestream.h"
#include"im.h"
@@ -43,18 +43,18 @@ namespace XMPP
IBBConnection(IBBManager *);
~IBBConnection();
- void connectToJid(const Jid &peer, const QDomElement &comment);
+ void connectToJid(const Jid &peer, const TQDomElement &comment);
void accept();
void close();
int state() const;
Jid peer() const;
- QString streamid() const;
- QDomElement comment() const;
+ TQString streamid() const;
+ TQDomElement comment() const;
bool isOpen() const;
- void write(const QByteArray &);
- QByteArray read(int bytes=0);
+ void write(const TQByteArray &);
+ TQByteArray read(int bytes=0);
int bytesAvailable() const;
int bytesToWrite() const;
@@ -72,12 +72,12 @@ namespace XMPP
void reset(bool clear=false);
friend class IBBManager;
- void waitForAccept(const Jid &peer, const QString &sid, const QDomElement &comment, const QString &iq_id);
- void takeIncomingData(const QByteArray &, bool close);
+ void waitForAccept(const Jid &peer, const TQString &sid, const TQDomElement &comment, const TQString &iq_id);
+ void takeIncomingData(const TQByteArray &, bool close);
};
- typedef QPtrList<IBBConnection> IBBConnectionList;
- typedef QPtrListIterator<IBBConnection> IBBConnectionListIt;
+ typedef TQPtrList<IBBConnection> IBBConnectionList;
+ typedef TQPtrListIterator<IBBConnection> IBBConnectionListIt;
class IBBManager : public QObject
{
Q_OBJECT
@@ -93,22 +93,22 @@ namespace XMPP
void incomingReady();
private slots:
- void ibb_incomingRequest(const Jid &from, const QString &id, const QDomElement &);
- void ibb_incomingData(const Jid &from, const QString &streamid, const QString &id, const QByteArray &data, bool close);
+ void ibb_incomingRequest(const Jid &from, const TQString &id, const TQDomElement &);
+ void ibb_incomingData(const Jid &from, const TQString &streamid, const TQString &id, const TQByteArray &data, bool close);
private:
class Private;
Private *d;
- QString genKey() const;
+ TQString genKey() const;
friend class IBBConnection;
- IBBConnection *findConnection(const QString &sid, const Jid &peer="") const;
- QString genUniqueKey() const;
+ IBBConnection *findConnection(const TQString &sid, const Jid &peer="") const;
+ TQString genUniqueKey() const;
void link(IBBConnection *);
void unlink(IBBConnection *);
- void doAccept(IBBConnection *c, const QString &id);
- void doReject(IBBConnection *c, const QString &id, int, const QString &);
+ void doAccept(IBBConnection *c, const TQString &id);
+ void doReject(IBBConnection *c, const TQString &id, int, const TQString &);
};
class JT_IBB : public Task
@@ -119,22 +119,22 @@ namespace XMPP
JT_IBB(Task *, bool serve=false);
~JT_IBB();
- void request(const Jid &, const QDomElement &comment);
- void sendData(const Jid &, const QString &streamid, const QByteArray &data, bool close);
- void respondSuccess(const Jid &, const QString &id, const QString &streamid);
- void respondError(const Jid &, const QString &id, int code, const QString &str);
- void respondAck(const Jid &to, const QString &id);
+ void request(const Jid &, const TQDomElement &comment);
+ void sendData(const Jid &, const TQString &streamid, const TQByteArray &data, bool close);
+ void respondSuccess(const Jid &, const TQString &id, const TQString &streamid);
+ void respondError(const Jid &, const TQString &id, int code, const TQString &str);
+ void respondAck(const Jid &to, const TQString &id);
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
- QString streamid() const;
+ TQString streamid() const;
Jid jid() const;
int mode() const;
signals:
- void incomingRequest(const Jid &from, const QString &id, const QDomElement &);
- void incomingData(const Jid &from, const QString &streamid, const QString &id, const QByteArray &data, bool close);
+ void incomingRequest(const Jid &from, const TQString &id, const TQDomElement &);
+ void incomingData(const Jid &from, const TQString &streamid, const TQString &id, const TQByteArray &data, bool close);
private:
class Private;
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp
index 987ac0c7..a39d92b9 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp
+++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp
@@ -20,8 +20,8 @@
#include"xmpp_jidlink.h"
-#include<qdom.h>
-#include<qtimer.h>
+#include<tqdom.h>
+#include<tqtimer.h>
#include"im.h"
#include"s5b.h"
#include"xmpp_ibb.h"
@@ -42,7 +42,7 @@ public:
};
JidLink::JidLink(Client *client)
-:QObject(client->jidLinkManager())
+:TQObject(client->jidLinkManager())
{
d = new Private;
d->client = client;
@@ -73,7 +73,7 @@ void JidLink::reset(bool clear)
}
}
-void JidLink::connectToJid(const Jid &jid, int type, const QDomElement &comment)
+void JidLink::connectToJid(const Jid &jid, int type, const TQDomElement &comment)
{
reset(true);
if(type == DTCP)
@@ -105,18 +105,18 @@ void JidLink::link()
{
if(d->type == DTCP) {
S5BConnection *c = (S5BConnection *)d->bs;
- connect(c, SIGNAL(connected()), SLOT(dtcp_connected()));
- connect(c, SIGNAL(accepted()), SLOT(dtcp_accepted()));
+ connect(c, TQT_SIGNAL(connected()), TQT_SLOT(dtcp_connected()));
+ connect(c, TQT_SIGNAL(accepted()), TQT_SLOT(dtcp_accepted()));
}
else {
IBBConnection *c = (IBBConnection *)d->bs;
- connect(c, SIGNAL(connected()), SLOT(ibb_connected()));
+ connect(c, TQT_SIGNAL(connected()), TQT_SLOT(ibb_connected()));
}
- connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed()));
- connect(d->bs, SIGNAL(error(int)), SLOT(bs_error(int)));
- connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int)));
- connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead()));
+ connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed()));
+ connect(d->bs, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int)));
+ connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int)));
+ connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead()));
}
void JidLink::unlink()
@@ -129,7 +129,7 @@ void JidLink::accept()
if(d->state != WaitingForAccept)
return;
- QTimer::singleShot(0, this, SLOT(doRealAccept()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doRealAccept()));
}
void JidLink::doRealAccept()
@@ -202,18 +202,18 @@ void JidLink::close()
reset();
}
-void JidLink::write(const QByteArray &a)
+void JidLink::write(const TQByteArray &a)
{
if(d->state == Active)
d->bs->write(a);
}
-QByteArray JidLink::read(int bytes)
+TQByteArray JidLink::read(int bytes)
{
if(d->bs)
return d->bs->read(bytes);
else
- return QByteArray();
+ return TQByteArray();
}
int JidLink::bytesAvailable() const
@@ -283,11 +283,11 @@ public:
Private() {}
Client *client;
- QPtrList<JidLink> incomingList;
+ TQPtrList<JidLink> incomingList;
};
JidLinkManager::JidLinkManager(Client *par)
-:QObject(par)
+:TQObject(par)
{
d = new Private;
d->client = par;
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h
index ac852349..40d3d4eb 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h
+++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h
@@ -25,8 +25,8 @@
#ifndef JABBER_JIDLINK_H
#define JABBER_JIDLINK_H
-#include<qobject.h>
-#include<qstring.h>
+#include<tqobject.h>
+#include<tqstring.h>
#include"xmpp.h"
class ByteStream;
@@ -46,7 +46,7 @@ namespace XMPP
JidLink(Client *client);
~JidLink();
- void connectToJid(const Jid &jid, int type, const QDomElement &comment);
+ void connectToJid(const Jid &jid, int type, const TQDomElement &comment);
void accept();
int type() const;
@@ -55,8 +55,8 @@ namespace XMPP
bool isOpen() const;
void close();
- void write(const QByteArray &);
- QByteArray read(int bytes=0);
+ void write(const TQByteArray &);
+ TQByteArray read(int bytes=0);
int bytesAvailable() const;
int bytesToWrite() const;
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp
index 55b43c06..3ba5cb16 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp
@@ -31,12 +31,12 @@
#include"xmpp.h"
-#include<qguardedptr.h>
+#include<tqguardedptr.h>
#include<qca.h>
#include"safedelete.h"
#ifdef NO_NDNS
-#include<qdns.h>
+#include<tqdns.h>
#else
#include"ndns.h"
#endif
@@ -55,8 +55,8 @@ using namespace XMPP;
//----------------------------------------------------------------------------
// Connector
//----------------------------------------------------------------------------
-Connector::Connector(QObject *parent)
-:QObject(parent)
+Connector::Connector(TQObject *parent)
+:TQObject(parent)
{
setUseSSL(false);
setPeerAddressNone();
@@ -76,7 +76,7 @@ bool Connector::havePeerAddress() const
return haveaddr;
}
-QHostAddress Connector::peerAddress() const
+TQHostAddress Connector::peerAddress() const
{
return addr;
}
@@ -94,11 +94,11 @@ void Connector::setUseSSL(bool b)
void Connector::setPeerAddressNone()
{
haveaddr = false;
- addr = QHostAddress();
+ addr = TQHostAddress();
port = 0;
}
-void Connector::setPeerAddress(const QHostAddress &_addr, Q_UINT16 _port)
+void Connector::setPeerAddress(const TQHostAddress &_addr, Q_UINT16 _port)
{
haveaddr = true;
addr = _addr;
@@ -124,7 +124,7 @@ int AdvancedConnector::Proxy::type() const
return t;
}
-QString AdvancedConnector::Proxy::host() const
+TQString AdvancedConnector::Proxy::host() const
{
return v_host;
}
@@ -134,17 +134,17 @@ Q_UINT16 AdvancedConnector::Proxy::port() const
return v_port;
}
-QString AdvancedConnector::Proxy::url() const
+TQString AdvancedConnector::Proxy::url() const
{
return v_url;
}
-QString AdvancedConnector::Proxy::user() const
+TQString AdvancedConnector::Proxy::user() const
{
return v_user;
}
-QString AdvancedConnector::Proxy::pass() const
+TQString AdvancedConnector::Proxy::pass() const
{
return v_pass;
}
@@ -154,14 +154,14 @@ int AdvancedConnector::Proxy::pollInterval() const
return v_poll;
}
-void AdvancedConnector::Proxy::setHttpConnect(const QString &host, Q_UINT16 port)
+void AdvancedConnector::Proxy::setHttpConnect(const TQString &host, Q_UINT16 port)
{
t = HttpConnect;
v_host = host;
v_port = port;
}
-void AdvancedConnector::Proxy::setHttpPoll(const QString &host, Q_UINT16 port, const QString &url)
+void AdvancedConnector::Proxy::setHttpPoll(const TQString &host, Q_UINT16 port, const TQString &url)
{
t = HttpPoll;
v_host = host;
@@ -169,14 +169,14 @@ void AdvancedConnector::Proxy::setHttpPoll(const QString &host, Q_UINT16 port, c
v_url = url;
}
-void AdvancedConnector::Proxy::setSocks(const QString &host, Q_UINT16 port)
+void AdvancedConnector::Proxy::setSocks(const TQString &host, Q_UINT16 port)
{
t = Socks;
v_host = host;
v_port = port;
}
-void AdvancedConnector::Proxy::setUserPass(const QString &user, const QString &pass)
+void AdvancedConnector::Proxy::setUserPass(const TQString &user, const TQString &pass)
{
v_user = user;
v_pass = pass;
@@ -198,21 +198,21 @@ public:
int mode;
ByteStream *bs;
#ifdef NO_NDNS
- QDns *qdns;
+ TQDns *qdns;
#else
NDns dns;
#endif
SrvResolver srv;
- QString server;
- QString opt_host;
+ TQString server;
+ TQString opt_host;
int opt_port;
bool opt_probe, opt_ssl;
Proxy proxy;
- QString host;
+ TQString host;
int port;
- QValueList<QDns::Server> servers;
+ TQValueList<TQDns::Server> servers;
int errorCode;
bool multi, using_srv;
@@ -223,7 +223,7 @@ public:
SafeDelete sd;
};
-AdvancedConnector::AdvancedConnector(QObject *parent)
+AdvancedConnector::AdvancedConnector(TQObject *parent)
:Connector(parent)
{
d = new Private;
@@ -231,9 +231,9 @@ AdvancedConnector::AdvancedConnector(QObject *parent)
#ifdef NO_NDNS
d->qdns = 0;
#else
- connect(&d->dns, SIGNAL(resultsReady()), SLOT(dns_done()));
+ connect(&d->dns, TQT_SIGNAL(resultsReady()), TQT_SLOT(dns_done()));
#endif
- connect(&d->srv, SIGNAL(resultsReady()), SLOT(srv_done()));
+ connect(&d->srv, TQT_SIGNAL(resultsReady()), TQT_SLOT(srv_done()));
d->opt_probe = false;
d->opt_ssl = false;
cleanup();
@@ -285,7 +285,7 @@ void AdvancedConnector::setProxy(const Proxy &proxy)
d->proxy = proxy;
}
-void AdvancedConnector::setOptHostPort(const QString &host, Q_UINT16 _port)
+void AdvancedConnector::setOptHostPort(const TQString &host, Q_UINT16 _port)
{
if(d->mode != Idle)
return;
@@ -307,7 +307,7 @@ void AdvancedConnector::setOptSSL(bool b)
d->opt_ssl = b;
}
-void AdvancedConnector::connectToServer(const QString &server)
+void AdvancedConnector::connectToServer(const TQString &server)
{
if(d->mode != Idle)
return;
@@ -326,10 +326,10 @@ void AdvancedConnector::connectToServer(const QString &server)
HttpPoll *s = new HttpPoll;
d->bs = s;
- connect(s, SIGNAL(connected()), SLOT(bs_connected()));
- connect(s, SIGNAL(syncStarted()), SLOT(http_syncStarted()));
- connect(s, SIGNAL(syncFinished()), SLOT(http_syncFinished()));
- connect(s, SIGNAL(error(int)), SLOT(bs_error(int)));
+ connect(s, TQT_SIGNAL(connected()), TQT_SLOT(bs_connected()));
+ connect(s, TQT_SIGNAL(syncStarted()), TQT_SLOT(http_syncStarted()));
+ connect(s, TQT_SIGNAL(syncFinished()), TQT_SLOT(http_syncFinished()));
+ connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int)));
if(!d->proxy.user().isEmpty())
s->setAuth(d->proxy.user(), d->proxy.pass());
s->setPollInterval(d->proxy.pollInterval());
@@ -348,7 +348,7 @@ void AdvancedConnector::connectToServer(const QString &server)
else {
d->multi = true;
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
srvLookup(d->server);
if(!self)
return;
@@ -389,11 +389,11 @@ void AdvancedConnector::do_resolve()
#ifdef NO_NDNS
printf("resolving (aaaa=%d)\n", d->aaaa);
d->qdns = new QDns;
- connect(d->qdns, SIGNAL(resultsReady()), SLOT(dns_done()));
+ connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(dns_done()));
if(d->aaaa)
- d->qdns->setRecordType(QDns::Aaaa); // IPv6
+ d->qdns->setRecordType(TQDns::Aaaa); // IPv6
else
- d->qdns->setRecordType(QDns::A); // IPv4
+ d->qdns->setRecordType(TQDns::A); // IPv4
d->qdns->setLabel(d->host);
#else
d->dns.resolve(d->host);
@@ -403,7 +403,7 @@ void AdvancedConnector::do_resolve()
void AdvancedConnector::dns_done()
{
bool failed = false;
- QHostAddress addr;
+ TQHostAddress addr;
#ifdef NO_NDNS
//if(!d->qdns)
@@ -416,7 +416,7 @@ void AdvancedConnector::dns_done()
//SafeDeleteLock s(&d->sd);
// grab the address list and destroy the qdns object
- QValueList<QHostAddress> list = d->qdns->addresses();
+ TQValueList<TQHostAddress> list = d->qdns->addresses();
d->qdns->disconnect(this);
d->qdns->deleteLater();
//d->sd.deleteLater(d->qdns);
@@ -438,7 +438,7 @@ void AdvancedConnector::dns_done()
if(d->dns.result() == 0)
failed = true;
else
- addr = QHostAddress(d->dns.result());
+ addr = TQHostAddress(d->dns.result());
#endif
if(failed) {
@@ -502,8 +502,8 @@ void AdvancedConnector::do_connect()
#endif
BSocket *s = new BSocket;
d->bs = s;
- connect(s, SIGNAL(connected()), SLOT(bs_connected()));
- connect(s, SIGNAL(error(int)), SLOT(bs_error(int)));
+ connect(s, TQT_SIGNAL(connected()), TQT_SLOT(bs_connected()));
+ connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int)));
s->connectToHost(d->host, d->port);
}
else if(t == Proxy::HttpConnect) {
@@ -512,8 +512,8 @@ void AdvancedConnector::do_connect()
#endif
HttpConnect *s = new HttpConnect;
d->bs = s;
- connect(s, SIGNAL(connected()), SLOT(bs_connected()));
- connect(s, SIGNAL(error(int)), SLOT(bs_error(int)));
+ connect(s, TQT_SIGNAL(connected()), TQT_SLOT(bs_connected()));
+ connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int)));
if(!d->proxy.user().isEmpty())
s->setAuth(d->proxy.user(), d->proxy.pass());
s->connectToHost(d->proxy.host(), d->proxy.port(), d->host, d->port);
@@ -524,8 +524,8 @@ void AdvancedConnector::do_connect()
#endif
SocksClient *s = new SocksClient;
d->bs = s;
- connect(s, SIGNAL(connected()), SLOT(bs_connected()));
- connect(s, SIGNAL(error(int)), SLOT(bs_error(int)));
+ connect(s, TQT_SIGNAL(connected()), TQT_SLOT(bs_connected()));
+ connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int)));
if(!d->proxy.user().isEmpty())
s->setAuth(d->proxy.user(), d->proxy.pass());
s->connectToHost(d->proxy.host(), d->proxy.port(), d->host, d->port);
@@ -545,7 +545,7 @@ void AdvancedConnector::tryNextSrv()
void AdvancedConnector::srv_done()
{
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
#ifdef XMPP_DEBUG
printf("srv_done1\n");
#endif
@@ -591,7 +591,7 @@ void AdvancedConnector::srv_done()
void AdvancedConnector::bs_connected()
{
if(d->proxy.type() == Proxy::None) {
- QHostAddress h = (static_cast<BSocket*>(d->bs))->peerAddress();
+ TQHostAddress h = (static_cast<BSocket*>(d->bs))->peerAddress();
int p = (static_cast<BSocket*>(d->bs))->peerPort();
setPeerAddress(h, p);
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp
index 3c0389b5..4c8307cb 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp
@@ -473,9 +473,9 @@ public:
sha1_update(&_context, (unsigned char *)in, (unsigned int)len);
}
- void final(QByteArray *out)
+ void final(TQByteArray *out)
{
- QByteArray b(20);
+ TQByteArray b(20);
sha1_final((unsigned char *)b.data(), &_context);
*out = b;
}
@@ -621,9 +621,9 @@ public:
md5_append(&md5, (const md5_byte_t *)in, len);
}
- void final(QByteArray *out)
+ void final(TQByteArray *out)
{
- QByteArray b(16);
+ TQByteArray b(16);
md5_finish(&md5, (md5_byte_t *)b.data());
*out = b;
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp
index 2a40f050..090cc9df 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp
@@ -20,7 +20,7 @@
#include"xmpp.h"
-#include<qdict.h>
+#include<tqdict.h>
#include<stringprep.h>
using namespace XMPP;
@@ -31,12 +31,12 @@ using namespace XMPP;
class StringPrepCache
{
public:
- static bool nameprep(const QString &in, int maxbytes, QString *out)
+ static bool nameprep(const TQString &in, int maxbytes, TQString *out)
{
if(in.isEmpty())
{
if(out)
- *out = QString();
+ *out = TQString();
return true;
}
@@ -52,7 +52,7 @@ public:
return true;
}
- QCString cs = in.utf8();
+ TQCString cs = in.utf8();
cs.resize(maxbytes);
if(stringprep(cs.data(), maxbytes, (Stringprep_profile_flags)0, stringprep_nameprep) != 0)
{
@@ -60,19 +60,19 @@ public:
return false;
}
- QString norm = QString::fromUtf8(cs);
+ TQString norm = TQString::fromUtf8(cs);
that->nameprep_table.insert(in, new Result(norm));
if(out)
*out = norm;
return true;
}
- static bool nodeprep(const QString &in, int maxbytes, QString *out)
+ static bool nodeprep(const TQString &in, int maxbytes, TQString *out)
{
if(in.isEmpty())
{
if(out)
- *out = QString();
+ *out = TQString();
return true;
}
@@ -88,7 +88,7 @@ public:
return true;
}
- QCString cs = in.utf8();
+ TQCString cs = in.utf8();
cs.resize(maxbytes);
if(stringprep(cs.data(), maxbytes, (Stringprep_profile_flags)0, stringprep_xmpp_nodeprep) != 0)
{
@@ -96,19 +96,19 @@ public:
return false;
}
- QString norm = QString::fromUtf8(cs);
+ TQString norm = TQString::fromUtf8(cs);
that->nodeprep_table.insert(in, new Result(norm));
if(out)
*out = norm;
return true;
}
- static bool resourceprep(const QString &in, int maxbytes, QString *out)
+ static bool resourceprep(const TQString &in, int maxbytes, TQString *out)
{
if(in.isEmpty())
{
if(out)
- *out = QString();
+ *out = TQString();
return true;
}
@@ -124,7 +124,7 @@ public:
return true;
}
- QCString cs = in.utf8();
+ TQCString cs = in.utf8();
cs.resize(maxbytes);
if(stringprep(cs.data(), maxbytes, (Stringprep_profile_flags)0, stringprep_xmpp_resourceprep) != 0)
{
@@ -132,7 +132,7 @@ public:
return false;
}
- QString norm = QString::fromUtf8(cs);
+ TQString norm = TQString::fromUtf8(cs);
that->resourceprep_table.insert(in, new Result(norm));
if(out)
*out = norm;
@@ -143,13 +143,13 @@ private:
class Result
{
public:
- QString *norm;
+ TQString *norm;
Result() : norm(0)
{
}
- Result(const QString &s) : norm(new QString(s))
+ Result(const TQString &s) : norm(new TQString(s))
{
}
@@ -159,9 +159,9 @@ private:
}
};
- QDict<Result> nameprep_table;
- QDict<Result> nodeprep_table;
- QDict<Result> resourceprep_table;
+ TQDict<Result> nameprep_table;
+ TQDict<Result> nodeprep_table;
+ TQDict<Result> resourceprep_table;
static StringPrepCache *instance;
@@ -194,17 +194,17 @@ Jid::~Jid()
{
}
-Jid::Jid(const QString &s)
+Jid::Jid(const TQString &s)
{
set(s);
}
Jid::Jid(const char *s)
{
- set(QString(s));
+ set(TQString(s));
}
-Jid & Jid::operator=(const QString &s)
+Jid & Jid::operator=(const TQString &s)
{
set(s);
return *this;
@@ -212,17 +212,17 @@ Jid & Jid::operator=(const QString &s)
Jid & Jid::operator=(const char *s)
{
- set(QString(s));
+ set(TQString(s));
return *this;
}
void Jid::reset()
{
- f = QString();
- b = QString();
- d = QString();
- n = QString();
- r = QString();
+ f = TQString();
+ b = TQString();
+ d = TQString();
+ n = TQString();
+ r = TQString();
valid = false;
}
@@ -244,10 +244,10 @@ void Jid::update()
valid = false;
}
-void Jid::set(const QString &s)
+void Jid::set(const TQString &s)
{
- QString rest, domain, node, resource;
- QString norm_domain, norm_node, norm_resource;
+ TQString rest, domain, node, resource;
+ TQString norm_domain, norm_node, norm_resource;
int x = s.find('/');
if(x != -1) {
rest = s.mid(0, x);
@@ -255,7 +255,7 @@ void Jid::set(const QString &s)
}
else {
rest = s;
- resource = QString();
+ resource = TQString();
}
if(!validResource(resource, &norm_resource)) {
reset();
@@ -268,7 +268,7 @@ void Jid::set(const QString &s)
domain = rest.mid(x+1);
}
else {
- node = QString();
+ node = TQString();
domain = rest;
}
if(!validDomain(domain, &norm_domain) || !validNode(node, &norm_node)) {
@@ -283,9 +283,9 @@ void Jid::set(const QString &s)
update();
}
-void Jid::set(const QString &domain, const QString &node, const QString &resource)
+void Jid::set(const TQString &domain, const TQString &node, const TQString &resource)
{
- QString norm_domain, norm_node, norm_resource;
+ TQString norm_domain, norm_node, norm_resource;
if(!validDomain(domain, &norm_domain) || !validNode(node, &norm_node) || !validResource(resource, &norm_resource)) {
reset();
return;
@@ -297,11 +297,11 @@ void Jid::set(const QString &domain, const QString &node, const QString &resourc
update();
}
-void Jid::setDomain(const QString &s)
+void Jid::setDomain(const TQString &s)
{
if(!valid)
return;
- QString norm;
+ TQString norm;
if(!validDomain(s, &norm)) {
reset();
return;
@@ -310,11 +310,11 @@ void Jid::setDomain(const QString &s)
update();
}
-void Jid::setNode(const QString &s)
+void Jid::setNode(const TQString &s)
{
if(!valid)
return;
- QString norm;
+ TQString norm;
if(!validNode(s, &norm)) {
reset();
return;
@@ -323,11 +323,11 @@ void Jid::setNode(const QString &s)
update();
}
-void Jid::setResource(const QString &s)
+void Jid::setResource(const TQString &s)
{
if(!valid)
return;
- QString norm;
+ TQString norm;
if(!validResource(s, &norm)) {
reset();
return;
@@ -336,14 +336,14 @@ void Jid::setResource(const QString &s)
update();
}
-Jid Jid::withNode(const QString &s) const
+Jid Jid::withNode(const TQString &s) const
{
Jid j = *this;
j.setNode(s);
return j;
}
-Jid Jid::withResource(const QString &s) const
+Jid Jid::withResource(const TQString &s) const
{
Jid j = *this;
j.setResource(s);
@@ -372,38 +372,38 @@ bool Jid::compare(const Jid &a, bool compareRes) const
return true;
}
-bool Jid::validDomain(const QString &s, QString *norm)
+bool Jid::validDomain(const TQString &s, TQString *norm)
{
- /*QCString cs = s.utf8();
+ /*TQCString cs = s.utf8();
cs.resize(1024);
if(stringprep(cs.data(), 1024, (Stringprep_profile_flags)0, stringprep_nameprep) != 0)
return false;
if(norm)
- *norm = QString::fromUtf8(cs);
+ *norm = TQString::fromUtf8(cs);
return true;*/
return StringPrepCache::nameprep(s, 1024, norm);
}
-bool Jid::validNode(const QString &s, QString *norm)
+bool Jid::validNode(const TQString &s, TQString *norm)
{
- /*QCString cs = s.utf8();
+ /*TQCString cs = s.utf8();
cs.resize(1024);
if(stringprep(cs.data(), 1024, (Stringprep_profile_flags)0, stringprep_xmpp_nodeprep) != 0)
return false;
if(norm)
- *norm = QString::fromUtf8(cs);
+ *norm = TQString::fromUtf8(cs);
return true;*/
return StringPrepCache::nodeprep(s, 1024, norm);
}
-bool Jid::validResource(const QString &s, QString *norm)
+bool Jid::validResource(const TQString &s, TQString *norm)
{
- /*QCString cs = s.utf8();
+ /*TQCString cs = s.utf8();
cs.resize(1024);
if(stringprep(cs.data(), 1024, (Stringprep_profile_flags)0, stringprep_xmpp_resourceprep) != 0)
return false;
if(norm)
- *norm = QString::fromUtf8(cs);
+ *norm = TQString::fromUtf8(cs);
return true;*/
return StringPrepCache::resourceprep(s, 1024, norm);
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp
index 558a5fcd..2348c88e 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp
@@ -24,12 +24,12 @@
For XMPP::Parser to be "perfect", some things must be solved/changed in the
Qt library:
- - Fix weird QDomElement::haveAttributeNS() bug (patch submitted to
+ - Fix weird TQDomElement::haveAttributeNS() bug (patch submitted to
Trolltech on Aug 31st, 2003).
- - Fix weird behavior in QXmlSimpleReader of reporting endElement() when
+ - Fix weird behavior in TQXmlSimpleReader of reporting endElement() when
the '/' character of a self-closing tag is reached, instead of when
the final '>' is reached.
- - Fix incremental parsing bugs in QXmlSimpleReader. At the moment, the
+ - 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).
@@ -38,10 +38,10 @@
- Deal with the <?xml?> processing instruction as an event type, so that we
can feed it back to the application properly. Right now it is completely
untrackable and is simply tacked into the first event's actualString. We
- can't easily do this because QXmlSimpleReader eats an extra byte beyond
+ can't easily do this because TQXmlSimpleReader eats an extra byte beyond
the processing instruction before reporting it.
- - Make QXmlInputSource capable of accepting data incrementally, to ensure
+ - 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.
@@ -49,8 +49,8 @@
#include"parser.h"
-#include<qtextcodec.h>
-#include<qptrlist.h>
+#include<tqtextcodec.h>
+#include<tqptrlist.h>
#include<string.h>
using namespace XMPP;
@@ -85,7 +85,7 @@ public:
paused = false;
mightChangeEncoding = true;
checkBad = true;
- last = QChar();
+ last = TQChar();
v_encoding = "";
resetLastData();
}
@@ -95,12 +95,12 @@ public:
last_string = "";
}
- QString lastString() const
+ TQString lastString() const
{
return last_string;
}
- void appendData(const QByteArray &a)
+ void appendData(const TQByteArray &a)
{
int oldsize = in.size();
in.resize(oldsize + a.size());
@@ -108,12 +108,12 @@ public:
processBuf();
}
- QChar lastRead()
+ TQChar lastRead()
{
return last;
}
- QChar next()
+ TQChar next()
{
if(paused)
return EndOfData;
@@ -123,14 +123,14 @@ public:
// NOTE: setting 'peek' to true allows the same char to be read again,
// however this still advances the internal byte processing.
- QChar readNext(bool peek=false)
+ TQChar readNext(bool peek=false)
{
- QChar c;
+ TQChar c;
if(mightChangeEncoding)
c = EndOfData;
else {
if(out.isEmpty()) {
- QString s;
+ TQString s;
if(!tryExtractPart(&s))
c = EndOfData;
else {
@@ -158,9 +158,9 @@ public:
return c;
}
- QByteArray unprocessed() const
+ TQByteArray unprocessed() const
{
- QByteArray a(in.size() - at);
+ TQByteArray a(in.size() - at);
memcpy(a.data(), in.data() + at, a.size());
return a;
}
@@ -175,21 +175,21 @@ public:
return paused;
}
- QString encoding() const
+ TQString encoding() const
{
return v_encoding;
}
private:
- QTextDecoder *dec;
- QByteArray in;
- QString out;
+ TQTextDecoder *dec;
+ TQByteArray in;
+ TQString out;
int at;
bool paused;
bool mightChangeEncoding;
- QChar last;
- QString v_encoding;
- QString last_string;
+ TQChar last;
+ TQString v_encoding;
+ TQString last_string;
bool checkBad;
void processBuf()
@@ -198,7 +198,7 @@ private:
printf("processing. size=%d, at=%d\n", in.size(), at);
#endif
if(!dec) {
- QTextCodec *codec = 0;
+ TQTextCodec *codec = 0;
uchar *p = (uchar *)in.data() + at;
int size = in.size() - at;
@@ -216,9 +216,9 @@ private:
}
}
if(utf16)
- codec = QTextCodec::codecForMib(1000); // UTF-16
+ codec = TQTextCodec::codecForMib(1000); // UTF-16
else
- codec = QTextCodec::codecForMib(106); // UTF-8
+ codec = TQTextCodec::codecForMib(106); // UTF-8
v_encoding = codec->name();
dec = codec->makeDecoder();
@@ -238,11 +238,11 @@ private:
int n2 = out.find('>', n);
if(n2 != -1) {
++n2;
- QString h = out.mid(n, n2-n);
- QString enc = processXmlHeader(h);
- QTextCodec *codec = 0;
+ TQString h = out.mid(n, n2-n);
+ TQString enc = processXmlHeader(h);
+ TQTextCodec *codec = 0;
if(!enc.isEmpty())
- codec = QTextCodec::codecForName(enc.latin1());
+ codec = TQTextCodec::codecForName(enc.latin1());
// changing codecs
if(codec) {
@@ -257,7 +257,7 @@ private:
break;
}
}
- QString s;
+ TQString s;
if(!tryExtractPart(&s))
break;
if(checkBad && checkForBadChars(s)) {
@@ -273,7 +273,7 @@ private:
}
}
- QString processXmlHeader(const QString &h)
+ TQString processXmlHeader(const TQString &h)
{
if(h.left(5) != "<?xml")
return "";
@@ -281,7 +281,7 @@ private:
int endPos = h.find(">");
int startPos = h.find("encoding");
if(startPos < endPos && startPos != -1) {
- QString encoding;
+ TQString encoding;
do {
startPos++;
if(startPos > endPos) {
@@ -302,13 +302,13 @@ private:
return "";
}
- bool tryExtractPart(QString *s)
+ bool tryExtractPart(TQString *s)
{
int size = in.size() - at;
if(size == 0)
return false;
uchar *p = (uchar *)in.data() + at;
- QString nextChars;
+ TQString nextChars;
while(1) {
nextChars = dec->toUnicode((const char *)p, 1);
++p;
@@ -333,7 +333,7 @@ private:
return true;
}
- bool checkForBadChars(const QString &s)
+ bool checkForBadChars(const TQString &s)
{
int len = s.find('<');
if(len == -1)
@@ -357,7 +357,7 @@ namespace XMPP
class ParserHandler : public QXmlDefaultHandler
{
public:
- ParserHandler(StreamInput *_in, QDomDocument *_doc)
+ ParserHandler(StreamInput *_in, TQDomDocument *_doc)
{
in = _in;
doc = _doc;
@@ -381,7 +381,7 @@ namespace XMPP
return true;
}
- bool startPrefixMapping(const QString &prefix, const QString &uri)
+ bool startPrefixMapping(const TQString &prefix, const TQString &uri)
{
if(depth == 0) {
nsnames += prefix;
@@ -390,14 +390,14 @@ namespace XMPP
return true;
}
- bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
+ bool startElement(const TQString &namespaceURI, const TQString &localName, const TQString &qName, const TQXmlAttributes &atts)
{
if(depth == 0) {
Parser::Event *e = new Parser::Event;
- QXmlAttributes a;
+ TQXmlAttributes a;
for(int n = 0; n < atts.length(); ++n) {
- QString uri = atts.uri(n);
- QString ln = atts.localName(n);
+ TQString uri = atts.uri(n);
+ TQString ln = atts.localName(n);
if(a.index(uri, ln) == -1)
a.append(atts.qName(n), uri, ln, atts.value(n));
}
@@ -411,10 +411,10 @@ namespace XMPP
in->pause(true);
}
else {
- QDomElement e = doc->createElementNS(namespaceURI, qName);
+ TQDomElement e = doc->createElementNS(namespaceURI, qName);
for(int n = 0; n < atts.length(); ++n) {
- QString uri = atts.uri(n);
- QString ln = atts.localName(n);
+ TQString uri = atts.uri(n);
+ TQString ln = atts.localName(n);
bool have;
if(!uri.isEmpty()) {
have = e.hasAttributeNS(uri, ln);
@@ -440,7 +440,7 @@ namespace XMPP
return true;
}
- bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
+ bool endElement(const TQString &namespaceURI, const TQString &localName, const TQString &qName)
{
--depth;
if(depth == 0) {
@@ -461,8 +461,8 @@ namespace XMPP
eventList.append(e);
in->pause(true);
- elem = QDomElement();
- current = QDomElement();
+ elem = TQDomElement();
+ current = TQDomElement();
}
else
current = current.parentNode().toElement();
@@ -474,22 +474,22 @@ namespace XMPP
return true;
}
- bool characters(const QString &str)
+ bool characters(const TQString &str)
{
if(depth >= 1) {
- QString content = str;
+ TQString content = str;
if(content.isEmpty())
return true;
if(!current.isNull()) {
- QDomText text = doc->createTextNode(content);
+ TQDomText text = doc->createTextNode(content);
current.appendChild(text);
}
}
return true;
}
- /*bool processingInstruction(const QString &target, const QString &data)
+ /*bool processingInstruction(const TQString &target, const TQString &data)
{
printf("Processing: [%s], [%s]\n", target.latin1(), data.latin1());
in->resetLastData();
@@ -498,22 +498,22 @@ namespace XMPP
void checkNeedMore()
{
- // Here we will work around QXmlSimpleReader strangeness and self-closing tags.
+ // Here we will work around TQXmlSimpleReader strangeness and self-closing tags.
// The problem is that endElement() is called when the '/' is read, not when
// the final '>' is read. This is a potential problem when obtaining unprocessed
// bytes from StreamInput after this event, as the '>' character will end up
// in the unprocessed chunk. To work around this, we need to advance StreamInput's
// internal byte processing, but not the xml character data. This way, the '>'
// will get processed and will no longer be in the unprocessed return, but
- // QXmlSimpleReader can still read it. To do this, we call StreamInput::readNext
+ // TQXmlSimpleReader can still read it. To do this, we call StreamInput::readNext
// with 'peek' mode.
- QChar c = in->readNext(true); // peek
- if(c == QXmlInputSource::EndOfData) {
+ TQChar c = in->readNext(true); // peek
+ if(c == TQXmlInputSource::EndOfData) {
needMore = true;
}
else {
// We'll assume the next char is a '>'. If it isn't, then
- // QXmlSimpleReader will deal with that problem on the next
+ // TQXmlSimpleReader will deal with that problem on the next
// parse. We don't need to take any action here.
needMore = false;
@@ -540,11 +540,11 @@ namespace XMPP
}
StreamInput *in;
- QDomDocument *doc;
+ TQDomDocument *doc;
int depth;
- QStringList nsnames, nsvalues;
- QDomElement elem, current;
- QPtrList<Parser::Event> eventList;
+ TQStringList nsnames, nsvalues;
+ TQDomElement elem, current;
+ TQPtrList<Parser::Event> eventList;
bool needMore;
};
}
@@ -557,11 +557,11 @@ class Parser::Event::Private
{
public:
int type;
- QString ns, ln, qn;
- QXmlAttributes a;
- QDomElement e;
- QString str;
- QStringList nsnames, nsvalues;
+ TQString ns, ln, qn;
+ TQXmlAttributes a;
+ TQDomElement e;
+ TQString str;
+ TQStringList nsnames, nsvalues;
};
Parser::Event::Event()
@@ -601,49 +601,49 @@ int Parser::Event::type() const
return d->type;
}
-QString Parser::Event::nsprefix(const QString &s) const
+TQString Parser::Event::nsprefix(const TQString &s) const
{
- QStringList::ConstIterator it = d->nsnames.begin();
- QStringList::ConstIterator it2 = d->nsvalues.begin();
+ TQStringList::ConstIterator it = d->nsnames.begin();
+ TQStringList::ConstIterator it2 = d->nsvalues.begin();
for(; it != d->nsnames.end(); ++it) {
if((*it) == s)
return (*it2);
++it2;
}
- return QString::null;
+ return TQString::null;
}
-QString Parser::Event::namespaceURI() const
+TQString Parser::Event::namespaceURI() const
{
return d->ns;
}
-QString Parser::Event::localName() const
+TQString Parser::Event::localName() const
{
return d->ln;
}
-QString Parser::Event::qName() const
+TQString Parser::Event::qName() const
{
return d->qn;
}
-QXmlAttributes Parser::Event::atts() const
+TQXmlAttributes Parser::Event::atts() const
{
return d->a;
}
-QString Parser::Event::actualString() const
+TQString Parser::Event::actualString() const
{
return d->str;
}
-QDomElement Parser::Event::element() const
+TQDomElement Parser::Event::element() const
{
return d->e;
}
-void Parser::Event::setDocumentOpen(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts, const QStringList &nsnames, const QStringList &nsvalues)
+void Parser::Event::setDocumentOpen(const TQString &namespaceURI, const TQString &localName, const TQString &qName, const TQXmlAttributes &atts, const TQStringList &nsnames, const TQStringList &nsvalues)
{
if(!d)
d = new Private;
@@ -656,7 +656,7 @@ void Parser::Event::setDocumentOpen(const QString &namespaceURI, const QString &
d->nsvalues = nsvalues;
}
-void Parser::Event::setDocumentClose(const QString &namespaceURI, const QString &localName, const QString &qName)
+void Parser::Event::setDocumentClose(const TQString &namespaceURI, const TQString &localName, const TQString &qName)
{
if(!d)
d = new Private;
@@ -666,7 +666,7 @@ void Parser::Event::setDocumentClose(const QString &namespaceURI, const QString
d->qn = qName;
}
-void Parser::Event::setElement(const QDomElement &elem)
+void Parser::Event::setElement(const TQDomElement &elem)
{
if(!d)
d = new Private;
@@ -681,7 +681,7 @@ void Parser::Event::setError()
d->type = Error;
}
-void Parser::Event::setActualString(const QString &str)
+void Parser::Event::setActualString(const TQString &str)
{
d->str = str;
}
@@ -727,10 +727,10 @@ public:
}
}
- QDomDocument *doc;
+ TQDomDocument *doc;
StreamInput *in;
ParserHandler *handler;
- QXmlSimpleReader *reader;
+ TQXmlSimpleReader *reader;
};
Parser::Parser()
@@ -740,7 +740,7 @@ Parser::Parser()
// check for evil bug in Qt <= 3.2.1
if(!qt_bug_check) {
qt_bug_check = true;
- QDomElement e = d->doc->createElementNS("someuri", "somename");
+ TQDomElement e = d->doc->createElementNS("someuri", "somename");
if(e.hasAttributeNS("someuri", "somename"))
qt_bug_have = true;
else
@@ -758,7 +758,7 @@ void Parser::reset()
d->reset();
}
-void Parser::appendData(const QByteArray &a)
+void Parser::appendData(const TQByteArray &a)
{
d->in->appendData(a);
@@ -787,12 +787,12 @@ Parser::Event Parser::readNext()
return e;
}
-QByteArray Parser::unprocessed() const
+TQByteArray Parser::unprocessed() const
{
return d->in->unprocessed();
}
-QString Parser::encoding() const
+TQString Parser::encoding() const
{
return d->in->encoding();
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h
index b43be57e..b702ad55 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h
@@ -21,8 +21,8 @@
#ifndef PARSER_H
#define PARSER_H
-#include<qdom.h>
-#include<qxml.h>
+#include<tqdom.h>
+#include<tqxml.h>
namespace XMPP
{
@@ -45,26 +45,26 @@ namespace XMPP
int type() const;
// for document open
- QString nsprefix(const QString &s=QString::null) const;
+ TQString nsprefix(const TQString &s=TQString::null) const;
// for document open / close
- QString namespaceURI() const;
- QString localName() const;
- QString qName() const;
- QXmlAttributes atts() const;
+ TQString namespaceURI() const;
+ TQString localName() const;
+ TQString qName() const;
+ TQXmlAttributes atts() const;
// for element
- QDomElement element() const;
+ TQDomElement element() const;
// for any
- QString actualString() const;
+ TQString actualString() const;
// setup
- void setDocumentOpen(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts, const QStringList &nsnames, const QStringList &nsvalues);
- void setDocumentClose(const QString &namespaceURI, const QString &localName, const QString &qName);
- void setElement(const QDomElement &elem);
+ void setDocumentOpen(const TQString &namespaceURI, const TQString &localName, const TQString &qName, const TQXmlAttributes &atts, const TQStringList &nsnames, const TQStringList &nsvalues);
+ void setDocumentClose(const TQString &namespaceURI, const TQString &localName, const TQString &qName);
+ void setElement(const TQDomElement &elem);
void setError();
- void setActualString(const QString &);
+ void setActualString(const TQString &);
private:
class Private;
@@ -72,10 +72,10 @@ namespace XMPP
};
void reset();
- void appendData(const QByteArray &a);
+ void appendData(const TQByteArray &a);
Event readNext();
- QByteArray unprocessed() const;
- QString encoding() const;
+ TQByteArray unprocessed() const;
+ TQString encoding() const;
private:
class Private;
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp
index fd1e6cdc..76d3c781 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp
@@ -40,13 +40,13 @@ 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.
-static QString printArray(const QByteArray &a)
+static TQString printArray(const TQByteArray &a)
{
- QString s;
+ TQString s;
for(uint n = 0; n < a.size(); ++n) {
unsigned char c = (unsigned char)a[(int)n];
if(c < 32 || c >= 127) {
- QString str;
+ TQString str;
str.sprintf("[%02x]", c);
s += str;
}
@@ -59,13 +59,13 @@ static QString printArray(const QByteArray &a)
// firstChildElement
//
// Get an element's first child element
-static QDomElement firstChildElement(const QDomElement &e)
+static TQDomElement firstChildElement(const TQDomElement &e)
{
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
if(n.isElement())
return n.toElement();
}
- return QDomElement();
+ return TQDomElement();
}
//----------------------------------------------------------------------------
@@ -159,30 +159,30 @@ void BasicProtocol::reset()
XmlProtocol::reset();
init();
- to = QString();
- from = QString();
- id = QString();
- lang = QString();
+ to = TQString();
+ from = TQString();
+ id = TQString();
+ lang = TQString();
version = Version(1,0);
- errText = QString();
- errAppSpec = QDomElement();
- otherHost = QString();
+ errText = TQString();
+ errAppSpec = TQDomElement();
+ otherHost = TQString();
spare.resize(0);
- sasl_mech = QString();
+ sasl_mech = TQString();
sasl_mechlist.clear();
sasl_step.resize(0);
- stanzaToRecv = QDomElement();
+ stanzaToRecv = TQDomElement();
sendList.clear();
}
-void BasicProtocol::sendStanza(const QDomElement &e)
+void BasicProtocol::sendStanza(const TQDomElement &e)
{
SendItem i;
i.stanzaToSend = e;
sendList += i;
}
-void BasicProtocol::sendDirect(const QString &s)
+void BasicProtocol::sendDirect(const TQString &s)
{
SendItem i;
i.stringToSend = s;
@@ -196,10 +196,10 @@ void BasicProtocol::sendWhitespace()
sendList += i;
}
-QDomElement BasicProtocol::recvStanza()
+TQDomElement BasicProtocol::recvStanza()
{
- QDomElement e = stanzaToRecv;
- stanzaToRecv = QDomElement();
+ TQDomElement e = stanzaToRecv;
+ stanzaToRecv = TQDomElement();
return e;
}
@@ -208,7 +208,7 @@ void BasicProtocol::shutdown()
doShutdown = true;
}
-void BasicProtocol::shutdownWithError(int cond, const QString &str)
+void BasicProtocol::shutdownWithError(int cond, const TQString &str)
{
otherHost = str;
delayErrorAndClose(cond);
@@ -224,28 +224,28 @@ void BasicProtocol::setReady(bool b)
ready = b;
}
-QString BasicProtocol::saslMech() const
+TQString BasicProtocol::saslMech() const
{
return sasl_mech;
}
-QByteArray BasicProtocol::saslStep() const
+TQByteArray BasicProtocol::saslStep() const
{
return sasl_step;
}
-void BasicProtocol::setSASLMechList(const QStringList &list)
+void BasicProtocol::setSASLMechList(const TQStringList &list)
{
sasl_mechlist = list;
}
-void BasicProtocol::setSASLFirst(const QString &mech, const QByteArray &step)
+void BasicProtocol::setSASLFirst(const TQString &mech, const TQByteArray &step)
{
sasl_mech = mech;
sasl_step = step;
}
-void BasicProtocol::setSASLNext(const QByteArray &step)
+void BasicProtocol::setSASLNext(const TQByteArray &step)
{
sasl_step = step;
}
@@ -255,7 +255,7 @@ void BasicProtocol::setSASLAuthed()
sasl_authed = true;
}
-int BasicProtocol::stringToSASLCond(const QString &s)
+int BasicProtocol::stringToSASLCond(const TQString &s)
{
for(int n = 0; saslCondTable[n].str; ++n) {
if(s == saslCondTable[n].str)
@@ -264,7 +264,7 @@ int BasicProtocol::stringToSASLCond(const QString &s)
return -1;
}
-int BasicProtocol::stringToStreamCond(const QString &s)
+int BasicProtocol::stringToStreamCond(const TQString &s)
{
for(int n = 0; streamCondTable[n].str; ++n) {
if(s == streamCondTable[n].str)
@@ -273,30 +273,30 @@ int BasicProtocol::stringToStreamCond(const QString &s)
return -1;
}
-QString BasicProtocol::saslCondToString(int x)
+TQString BasicProtocol::saslCondToString(int x)
{
for(int n = 0; saslCondTable[n].str; ++n) {
if(x == saslCondTable[n].cond)
return saslCondTable[n].str;
}
- return QString();
+ return TQString();
}
-QString BasicProtocol::streamCondToString(int x)
+TQString BasicProtocol::streamCondToString(int x)
{
for(int n = 0; streamCondTable[n].str; ++n) {
if(x == streamCondTable[n].cond)
return streamCondTable[n].str;
}
- return QString();
+ return TQString();
}
-void BasicProtocol::extractStreamError(const QDomElement &e)
+void BasicProtocol::extractStreamError(const TQDomElement &e)
{
- QString text;
- QDomElement appSpec;
+ TQString text;
+ TQDomElement appSpec;
- QDomElement t = firstChildElement(e);
+ TQDomElement t = firstChildElement(e);
if(t.isNull() || t.namespaceURI() != NS_STREAMS) {
// probably old-style error
errCond = -1;
@@ -314,9 +314,9 @@ void BasicProtocol::extractStreamError(const QDomElement &e)
text = t.text();
// find first non-standard namespaced element
- QDomNodeList nl = e.childNodes();
+ TQDomNodeList nl = e.childNodes();
for(uint n = 0; n < nl.count(); ++n) {
- QDomNode i = nl.item(n);
+ TQDomNode i = nl.item(n);
if(i.isElement() && i.namespaceURI() != NS_STREAMS) {
appSpec = i.toElement();
break;
@@ -328,20 +328,20 @@ void BasicProtocol::extractStreamError(const QDomElement &e)
}
}
-void BasicProtocol::send(const QDomElement &e, bool clip)
+void BasicProtocol::send(const TQDomElement &e, bool clip)
{
writeElement(e, TypeElement, false, clip);
}
-void BasicProtocol::sendStreamError(int cond, const QString &text, const QDomElement &appSpec)
+void BasicProtocol::sendStreamError(int cond, const TQString &text, const TQDomElement &appSpec)
{
- QDomElement se = doc.createElementNS(NS_ETHERX, "stream:error");
- QDomElement err = doc.createElementNS(NS_STREAMS, streamCondToString(cond));
+ TQDomElement se = doc.createElementNS(NS_ETHERX, "stream:error");
+ TQDomElement err = doc.createElementNS(NS_STREAMS, streamCondToString(cond));
if(!otherHost.isEmpty())
err.appendChild(doc.createTextNode(otherHost));
se.appendChild(err);
if(!text.isEmpty()) {
- QDomElement te = doc.createElementNS(NS_STREAMS, "text");
+ TQDomElement te = doc.createElementNS(NS_STREAMS, "text");
te.setAttributeNS(NS_XML, "xml:lang", "en");
te.appendChild(doc.createTextNode(text));
se.appendChild(te);
@@ -351,15 +351,15 @@ void BasicProtocol::sendStreamError(int cond, const QString &text, const QDomEle
writeElement(se, 100, false);
}
-void BasicProtocol::sendStreamError(const QString &text)
+void BasicProtocol::sendStreamError(const TQString &text)
{
- QDomElement se = doc.createElementNS(NS_ETHERX, "stream:error");
+ TQDomElement se = doc.createElementNS(NS_ETHERX, "stream:error");
se.appendChild(doc.createTextNode(text));
writeElement(se, 100, false);
}
-bool BasicProtocol::errorAndClose(int cond, const QString &text, const QDomElement &appSpec)
+bool BasicProtocol::errorAndClose(int cond, const TQString &text, const TQDomElement &appSpec)
{
closeError = true;
errCond = cond;
@@ -376,7 +376,7 @@ bool BasicProtocol::error(int code)
return true;
}
-void BasicProtocol::delayErrorAndClose(int cond, const QString &text, const QDomElement &appSpec)
+void BasicProtocol::delayErrorAndClose(int cond, const TQString &text, const TQDomElement &appSpec)
{
errorCode = ErrStream;
errCond = cond;
@@ -391,21 +391,21 @@ void BasicProtocol::delayError(int code)
delayedError = true;
}
-QDomElement BasicProtocol::docElement()
+TQDomElement BasicProtocol::docElement()
{
// create the root element
- QDomElement e = doc.createElementNS(NS_ETHERX, "stream:stream");
+ TQDomElement e = doc.createElementNS(NS_ETHERX, "stream:stream");
- QString defns = defaultNamespace();
- QStringList list = extraNamespaces();
+ TQString defns = defaultNamespace();
+ TQStringList list = extraNamespaces();
// HACK: using attributes seems to be the only way to get additional namespaces in here
if(!defns.isEmpty())
e.setAttribute("xmlns", defns);
- for(QStringList::ConstIterator it = list.begin(); it != list.end();) {
- QString prefix = *(it++);
- QString uri = *(it++);
- e.setAttribute(QString("xmlns:") + prefix, uri);
+ for(TQStringList::ConstIterator it = list.begin(); it != list.end();) {
+ TQString prefix = *(it++);
+ TQString uri = *(it++);
+ e.setAttribute(TQString("xmlns:") + prefix, uri);
}
// additional attributes
@@ -418,7 +418,7 @@ QDomElement BasicProtocol::docElement()
if(!lang.isEmpty())
e.setAttributeNS(NS_XML, "xml:lang", lang);
if(version.major > 0 || version.minor > 0)
- e.setAttribute("version", QString::number(version.major) + '.' + QString::number(version.minor));
+ e.setAttribute("version", TQString::number(version.major) + '.' + TQString::number(version.minor));
return e;
}
@@ -433,12 +433,12 @@ void BasicProtocol::handleDocOpen(const Parser::Event &pe)
}
if(pe.namespaceURI() == NS_ETHERX && pe.localName() == "stream") {
- QXmlAttributes atts = pe.atts();
+ TQXmlAttributes atts = pe.atts();
// grab the version
int major = 0;
int minor = 0;
- QString verstr = atts.value("version");
+ TQString verstr = atts.value("version");
if(!verstr.isEmpty()) {
int n = verstr.find('.');
if(n != -1) {
@@ -454,7 +454,7 @@ void BasicProtocol::handleDocOpen(const Parser::Event &pe)
if(isIncoming()) {
to = atts.value("to");
- QString peerLang = atts.value(NS_XML, "lang");
+ TQString peerLang = atts.value(NS_XML, "lang");
if(!peerLang.isEmpty())
lang = peerLang;
}
@@ -495,7 +495,7 @@ bool BasicProtocol::handleCloseFinished()
return true;
}
-bool BasicProtocol::doStep(const QDomElement &e)
+bool BasicProtocol::doStep(const TQDomElement &e)
{
// handle pending error
if(delayedError) {
@@ -530,7 +530,7 @@ bool BasicProtocol::doStep(const QDomElement &e)
if(!sendList.isEmpty()) {
SendItem i;
{
- QValueList<SendItem>::Iterator it = sendList.begin();
+ TQValueList<SendItem>::Iterator it = sendList.begin();
i = (*it);
sendList.remove(it);
}
@@ -571,16 +571,16 @@ void BasicProtocol::itemWritten(int id, int)
}
}
-QString BasicProtocol::defaultNamespace()
+TQString BasicProtocol::defaultNamespace()
{
// default none
- return QString();
+ return TQString();
}
-QStringList BasicProtocol::extraNamespaces()
+TQStringList BasicProtocol::extraNamespaces()
{
// default none
- return QStringList();
+ return TQStringList();
}
void BasicProtocol::handleStreamOpen(const Parser::Event &)
@@ -612,7 +612,7 @@ void CoreProtocol::init()
// settings
jid = Jid();
- password = QString();
+ password = TQString();
oldOnly = false;
allowPlain = false;
doTLS = true;
@@ -620,8 +620,8 @@ void CoreProtocol::init()
doBinding = true;
// input
- user = QString();
- host = QString();
+ user = TQString();
+ host = TQString();
// status
old = false;
@@ -649,14 +649,14 @@ void CoreProtocol::startClientOut(const Jid &_jid, bool _oldOnly, bool tlsActive
startConnect();
}
-void CoreProtocol::startServerOut(const QString &_to)
+void CoreProtocol::startServerOut(const TQString &_to)
{
server = true;
to = _to;
startConnect();
}
-void CoreProtocol::startDialbackOut(const QString &_to, const QString &_from)
+void CoreProtocol::startDialbackOut(const TQString &_to, const TQString &_from)
{
server = true;
dialback = true;
@@ -665,7 +665,7 @@ void CoreProtocol::startDialbackOut(const QString &_to, const QString &_from)
startConnect();
}
-void CoreProtocol::startDialbackVerifyOut(const QString &_to, const QString &_from, const QString &id, const QString &key)
+void CoreProtocol::startDialbackVerifyOut(const TQString &_to, const TQString &_from, const TQString &id, const TQString &key)
{
server = true;
dialback = true;
@@ -677,20 +677,20 @@ void CoreProtocol::startDialbackVerifyOut(const QString &_to, const QString &_fr
startConnect();
}
-void CoreProtocol::startClientIn(const QString &_id)
+void CoreProtocol::startClientIn(const TQString &_id)
{
id = _id;
startAccept();
}
-void CoreProtocol::startServerIn(const QString &_id)
+void CoreProtocol::startServerIn(const TQString &_id)
{
server = true;
id = _id;
startAccept();
}
-void CoreProtocol::setLang(const QString &s)
+void CoreProtocol::setLang(const TQString &s)
{
lang = s;
}
@@ -710,17 +710,17 @@ void CoreProtocol::setAllowPlain(bool b)
allowPlain = b;
}
-void CoreProtocol::setPassword(const QString &s)
+void CoreProtocol::setPassword(const TQString &s)
{
password = s;
}
-void CoreProtocol::setFrom(const QString &s)
+void CoreProtocol::setFrom(const TQString &s)
{
from = s;
}
-void CoreProtocol::setDialbackKey(const QString &s)
+void CoreProtocol::setDialbackKey(const TQString &s)
{
dialback_key = s;
}
@@ -734,18 +734,18 @@ bool CoreProtocol::loginComplete()
return true;
}
-int CoreProtocol::getOldErrorCode(const QDomElement &e)
+int CoreProtocol::getOldErrorCode(const TQDomElement &e)
{
- QDomElement err = e.elementsByTagNameNS(NS_CLIENT, "error").item(0).toElement();
+ TQDomElement err = e.elementsByTagNameNS(NS_CLIENT, "error").item(0).toElement();
if(err.isNull() || !err.hasAttribute("code"))
return -1;
return err.attribute("code").toInt();
}
-/*QString CoreProtocol::xmlToString(const QDomElement &e, bool clip)
+/*TQString CoreProtocol::xmlToString(const TQDomElement &e, bool clip)
{
// determine an appropriate 'fakeNS' to use
- QString ns;
+ TQString ns;
if(e.prefix() == "stream")
ns = NS_ETHERX;
else if(e.prefix() == "db")
@@ -781,21 +781,21 @@ bool CoreProtocol::stepRequiresElement() const
return false;
}
-void CoreProtocol::stringSend(const QString &s)
+void CoreProtocol::stringSend(const TQString &s)
{
#ifdef XMPP_TEST
TD::outgoingTag(s);
#endif
}
-void CoreProtocol::stringRecv(const QString &s)
+void CoreProtocol::stringRecv(const TQString &s)
{
#ifdef XMPP_TEST
TD::incomingTag(s);
#endif
}
-QString CoreProtocol::defaultNamespace()
+TQString CoreProtocol::defaultNamespace()
{
if(server)
return NS_SERVER;
@@ -803,9 +803,9 @@ QString CoreProtocol::defaultNamespace()
return NS_CLIENT;
}
-QStringList CoreProtocol::extraNamespaces()
+TQStringList CoreProtocol::extraNamespaces()
{
- QStringList list;
+ TQStringList list;
if(dialback) {
list += "db";
list += NS_DIALBACK;
@@ -816,8 +816,8 @@ QStringList CoreProtocol::extraNamespaces()
void CoreProtocol::handleStreamOpen(const Parser::Event &pe)
{
if(isIncoming()) {
- QString ns = pe.nsprefix();
- QString db;
+ TQString ns = pe.nsprefix();
+ TQString db;
if(server) {
db = pe.nsprefix("db");
if(!db.isEmpty())
@@ -846,21 +846,21 @@ void CoreProtocol::handleStreamOpen(const Parser::Event &pe)
}
}
-void CoreProtocol::elementSend(const QDomElement &e)
+void CoreProtocol::elementSend(const TQDomElement &e)
{
#ifdef XMPP_TEST
TD::outgoingXml(e);
#endif
}
-void CoreProtocol::elementRecv(const QDomElement &e)
+void CoreProtocol::elementRecv(const TQDomElement &e)
{
#ifdef XMPP_TEST
TD::incomingXml(e);
#endif
}
-bool CoreProtocol::doStep2(const QDomElement &e)
+bool CoreProtocol::doStep2(const TQDomElement &e)
{
if(dialback)
return dialbackStep(e);
@@ -868,9 +868,9 @@ bool CoreProtocol::doStep2(const QDomElement &e)
return normalStep(e);
}
-bool CoreProtocol::isValidStanza(const QDomElement &e) const
+bool CoreProtocol::isValidStanza(const TQDomElement &e) const
{
- QString s = e.tagName();
+ TQString s = e.tagName();
if(e.namespaceURI() == (server ? NS_SERVER : NS_CLIENT) && (s == "message" || s == "presence" || s == "iq"))
return true;
else
@@ -879,7 +879,7 @@ bool CoreProtocol::isValidStanza(const QDomElement &e) const
bool CoreProtocol::grabPendingItem(const Jid &to, const Jid &from, int type, DBItem *item)
{
- for(QValueList<DBItem>::Iterator it = dbpending.begin(); it != dbpending.end(); ++it) {
+ for(TQValueList<DBItem>::Iterator it = dbpending.begin(); it != dbpending.end(); ++it) {
const DBItem &i = *it;
if(i.type == type && i.to.compare(to) && i.from.compare(from)) {
const DBItem &i = (*it);
@@ -891,7 +891,7 @@ bool CoreProtocol::grabPendingItem(const Jid &to, const Jid &from, int type, DBI
return false;
}
-bool CoreProtocol::dialbackStep(const QDomElement &e)
+bool CoreProtocol::dialbackStep(const TQDomElement &e)
{
if(step == Start) {
setReady(true);
@@ -904,12 +904,12 @@ bool CoreProtocol::dialbackStep(const QDomElement &e)
// process a request
DBItem i;
{
- QValueList<DBItem>::Iterator it = dbrequests.begin();
+ TQValueList<DBItem>::Iterator it = dbrequests.begin();
i = (*it);
dbrequests.remove(it);
}
- QDomElement r;
+ TQDomElement r;
if(i.type == DBItem::ResultRequest) {
r = doc.createElementNS(NS_DIALBACK, "db:result");
r.setAttribute("to", i.to.full());
@@ -959,7 +959,7 @@ bool CoreProtocol::dialbackStep(const QDomElement &e)
to.set(e.attribute("to"), "");
from.set(e.attribute("from"), "");
if(isIncoming()) {
- QString key = e.text();
+ TQString key = e.text();
// TODO: report event
}
else {
@@ -982,9 +982,9 @@ bool CoreProtocol::dialbackStep(const QDomElement &e)
Jid to, from;
to.set(e.attribute("to"), "");
from.set(e.attribute("from"), "");
- QString id = e.attribute("id");
+ TQString id = e.attribute("id");
if(isIncoming()) {
- QString key = e.text();
+ TQString key = e.text();
// TODO: report event
}
else {
@@ -1019,7 +1019,7 @@ bool CoreProtocol::dialbackStep(const QDomElement &e)
return false;
}
-bool CoreProtocol::normalStep(const QDomElement &e)
+bool CoreProtocol::normalStep(const TQDomElement &e)
{
if(step == Start) {
if(isIncoming()) {
@@ -1043,7 +1043,7 @@ bool CoreProtocol::normalStep(const QDomElement &e)
else if(step == HandleFeatures) {
// deal with TLS?
if(doTLS && !tls_started && !sasl_authed && features.tls_supported) {
- QDomElement e = doc.createElementNS(NS_TLS, "starttls");
+ TQDomElement e = doc.createElementNS(NS_TLS, "starttls");
send(e, true);
event = ESend;
@@ -1084,15 +1084,15 @@ bool CoreProtocol::normalStep(const QDomElement &e)
return true;
}
- QDomElement e = doc.createElement("iq");
+ TQDomElement e = doc.createElement("iq");
e.setAttribute("type", "set");
e.setAttribute("id", "bind_1");
- QDomElement b = doc.createElementNS(NS_BIND, "bind");
+ TQDomElement b = doc.createElementNS(NS_BIND, "bind");
// request specific resource?
- QString resource = jid.resource();
+ TQString resource = jid.resource();
if(!resource.isEmpty()) {
- QDomElement r = doc.createElement("resource");
+ TQDomElement r = doc.createElement("resource");
r.appendChild(doc.createTextNode(jid.resource()));
b.appendChild(r);
}
@@ -1105,11 +1105,11 @@ bool CoreProtocol::normalStep(const QDomElement &e)
return true;
}
else if(step == GetSASLFirst) {
- QDomElement e = doc.createElementNS(NS_SASL, "auth");
+ TQDomElement e = doc.createElementNS(NS_SASL, "auth");
e.setAttribute("mechanism", sasl_mech);
if(!sasl_step.isEmpty()) {
#ifdef XMPP_TEST
- TD::msg(QString("SASL OUT: [%1]").arg(printArray(sasl_step)));
+ TD::msg(TQString("SASL OUT: [%1]").arg(printArray(sasl_step)));
#endif
e.appendChild(doc.createTextNode(Base64::arrayToString(sasl_step)));
}
@@ -1122,15 +1122,15 @@ bool CoreProtocol::normalStep(const QDomElement &e)
else if(step == GetSASLNext) {
if(isIncoming()) {
if(sasl_authed) {
- QDomElement e = doc.createElementNS(NS_SASL, "success");
+ TQDomElement e = doc.createElementNS(NS_SASL, "success");
writeElement(e, TypeElement, false, true);
event = ESend;
step = IncHandleSASLSuccess;
return true;
}
else {
- QByteArray stepData = sasl_step;
- QDomElement e = doc.createElementNS(NS_SASL, "challenge");
+ TQByteArray stepData = sasl_step;
+ TQDomElement e = doc.createElementNS(NS_SASL, "challenge");
if(!stepData.isEmpty())
e.appendChild(doc.createTextNode(Base64::arrayToString(stepData)));
@@ -1141,11 +1141,11 @@ bool CoreProtocol::normalStep(const QDomElement &e)
}
}
else {
- QByteArray stepData = sasl_step;
+ TQByteArray stepData = sasl_step;
#ifdef XMPP_TEST
- TD::msg(QString("SASL OUT: [%1]").arg(printArray(sasl_step)));
+ TD::msg(TQString("SASL OUT: [%1]").arg(printArray(sasl_step)));
#endif
- QDomElement e = doc.createElementNS(NS_SASL, "response");
+ TQDomElement e = doc.createElementNS(NS_SASL, "response");
if(!stepData.isEmpty())
e.appendChild(doc.createTextNode(Base64::arrayToString(stepData)));
@@ -1162,12 +1162,12 @@ bool CoreProtocol::normalStep(const QDomElement &e)
return false;
}
else if(step == HandleAuthGet) {
- QDomElement e = doc.createElement("iq");
+ TQDomElement e = doc.createElement("iq");
e.setAttribute("to", to);
e.setAttribute("type", "get");
e.setAttribute("id", "auth_1");
- QDomElement q = doc.createElementNS("jabber:iq:auth", "query");
- QDomElement u = doc.createElement("username");
+ TQDomElement q = doc.createElementNS("jabber:iq:auth", "query");
+ TQDomElement u = doc.createElement("username");
u.appendChild(doc.createTextNode(jid.node()));
q.appendChild(u);
e.appendChild(q);
@@ -1178,22 +1178,22 @@ bool CoreProtocol::normalStep(const QDomElement &e)
return true;
}
else if(step == HandleAuthSet) {
- QDomElement e = doc.createElement("iq");
+ TQDomElement e = doc.createElement("iq");
e.setAttribute("to", to);
e.setAttribute("type", "set");
e.setAttribute("id", "auth_2");
- QDomElement q = doc.createElementNS("jabber:iq:auth", "query");
- QDomElement u = doc.createElement("username");
+ TQDomElement q = doc.createElementNS("jabber:iq:auth", "query");
+ TQDomElement u = doc.createElement("username");
u.appendChild(doc.createTextNode(jid.node()));
q.appendChild(u);
- QDomElement p;
+ TQDomElement p;
if(digest) {
// need SHA1 here
if(!QCA::isSupported(QCA::CAP_SHA1))
QCA::insertProvider(createProviderHash());
p = doc.createElement("digest");
- QCString cs = id.utf8() + password.utf8();
+ TQCString cs = id.utf8() + password.utf8();
p.appendChild(doc.createTextNode(QCA::SHA1::hashToString(cs)));
}
else {
@@ -1201,7 +1201,7 @@ bool CoreProtocol::normalStep(const QDomElement &e)
p.appendChild(doc.createTextNode(password));
}
q.appendChild(p);
- QDomElement r = doc.createElement("resource");
+ TQDomElement r = doc.createElement("resource");
r.appendChild(doc.createTextNode(jid.resource()));
q.appendChild(r);
e.appendChild(q);
@@ -1213,22 +1213,22 @@ bool CoreProtocol::normalStep(const QDomElement &e)
}
// server
else if(step == SendFeatures) {
- QDomElement f = doc.createElementNS(NS_ETHERX, "stream:features");
+ TQDomElement f = doc.createElementNS(NS_ETHERX, "stream:features");
if(!tls_started && !sasl_authed) { // don't offer tls if we are already sasl'd
- QDomElement tls = doc.createElementNS(NS_TLS, "starttls");
+ TQDomElement tls = doc.createElementNS(NS_TLS, "starttls");
f.appendChild(tls);
}
if(sasl_authed) {
if(!server) {
- QDomElement bind = doc.createElementNS(NS_BIND, "bind");
+ TQDomElement bind = doc.createElementNS(NS_BIND, "bind");
f.appendChild(bind);
}
}
else {
- QDomElement mechs = doc.createElementNS(NS_SASL, "mechanisms");
- for(QStringList::ConstIterator it = sasl_mechlist.begin(); it != sasl_mechlist.end(); ++it) {
- QDomElement m = doc.createElement("mechanism");
+ TQDomElement mechs = doc.createElementNS(NS_SASL, "mechanisms");
+ for(TQStringList::ConstIterator it = sasl_mechlist.begin(); it != sasl_mechlist.end(); ++it) {
+ TQDomElement m = doc.createElement("mechanism");
m.appendChild(doc.createTextNode(*it));
mechs.appendChild(m);
}
@@ -1261,25 +1261,25 @@ bool CoreProtocol::normalStep(const QDomElement &e)
if(e.namespaceURI() == NS_ETHERX && e.tagName() == "features") {
// extract features
StreamFeatures f;
- QDomElement s = e.elementsByTagNameNS(NS_TLS, "starttls").item(0).toElement();
+ TQDomElement s = e.elementsByTagNameNS(NS_TLS, "starttls").item(0).toElement();
if(!s.isNull()) {
f.tls_supported = true;
f.tls_required = s.elementsByTagNameNS(NS_TLS, "required").count() > 0;
}
- QDomElement m = e.elementsByTagNameNS(NS_SASL, "mechanisms").item(0).toElement();
+ TQDomElement m = e.elementsByTagNameNS(NS_SASL, "mechanisms").item(0).toElement();
if(!m.isNull()) {
f.sasl_supported = true;
- QDomNodeList l = m.elementsByTagNameNS(NS_SASL, "mechanism");
+ TQDomNodeList l = m.elementsByTagNameNS(NS_SASL, "mechanism");
for(uint n = 0; n < l.count(); ++n)
f.sasl_mechs += l.item(n).toElement().text();
}
- QDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement();
+ TQDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement();
if(!b.isNull())
f.bind_supported = true;
if(f.tls_supported) {
#ifdef XMPP_TEST
- QString s = "STARTTLS is available";
+ TQString s = "STARTTLS is available";
if(f.tls_required)
s += " (required)";
TD::msg(s);
@@ -1287,9 +1287,9 @@ bool CoreProtocol::normalStep(const QDomElement &e)
}
if(f.sasl_supported) {
#ifdef XMPP_TEST
- QString s = "SASL mechs:";
- for(QStringList::ConstIterator it = f.sasl_mechs.begin(); it != f.sasl_mechs.end(); ++it)
- s += QString(" [%1]").arg((*it));
+ TQString s = "SASL mechs:";
+ for(TQStringList::ConstIterator it = f.sasl_mechs.begin(); it != f.sasl_mechs.end(); ++it)
+ s += TQString(" [%1]").arg((*it));
TD::msg(s);
#endif
}
@@ -1339,9 +1339,9 @@ bool CoreProtocol::normalStep(const QDomElement &e)
// waiting for sasl challenge/success/fail
if(e.namespaceURI() == NS_SASL) {
if(e.tagName() == "challenge") {
- QByteArray a = Base64::stringToArray(e.text());
+ TQByteArray a = Base64::stringToArray(e.text());
#ifdef XMPP_TEST
- TD::msg(QString("SASL IN: [%1]").arg(printArray(a)));
+ TD::msg(TQString("SASL IN: [%1]").arg(printArray(a)));
#endif
sasl_step = a;
need = NSASLNext;
@@ -1355,7 +1355,7 @@ bool CoreProtocol::normalStep(const QDomElement &e)
return true;
}
else if(e.tagName() == "failure") {
- QDomElement t = firstChildElement(e);
+ TQDomElement t = firstChildElement(e);
if(t.isNull() || t.namespaceURI() != NS_SASL)
errCond = -1;
else
@@ -1374,15 +1374,15 @@ bool CoreProtocol::normalStep(const QDomElement &e)
}
else if(step == GetBindResponse) {
if(e.namespaceURI() == NS_CLIENT && e.tagName() == "iq") {
- QString type(e.attribute("type"));
- QString id(e.attribute("id"));
+ TQString type(e.attribute("type"));
+ TQString id(e.attribute("id"));
if(id == "bind_1" && (type == "result" || type == "error")) {
if(type == "result") {
- QDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement();
+ TQDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement();
Jid j;
if(!b.isNull()) {
- QDomElement je = e.elementsByTagName("jid").item(0).toElement();
+ TQDomElement je = e.elementsByTagName("jid").item(0).toElement();
j = je.text();
}
if(!j.isValid()) {
@@ -1396,20 +1396,20 @@ bool CoreProtocol::normalStep(const QDomElement &e)
else {
errCond = -1;
- QDomElement err = e.elementsByTagNameNS(NS_CLIENT, "error").item(0).toElement();
+ TQDomElement err = e.elementsByTagNameNS(NS_CLIENT, "error").item(0).toElement();
if(!err.isNull()) {
// get error condition
- QDomNodeList nl = err.childNodes();
- QDomElement t;
+ TQDomNodeList nl = err.childNodes();
+ TQDomElement t;
for(uint n = 0; n < nl.count(); ++n) {
- QDomNode i = nl.item(n);
+ TQDomNode i = nl.item(n);
if(i.isElement()) {
t = i.toElement();
break;
}
}
if(!t.isNull() && t.namespaceURI() == NS_STANZAS) {
- QString cond = t.tagName();
+ TQString cond = t.tagName();
if(cond == "not-allowed")
errCond = BindNotAllowed;
else if(cond == "conflict")
@@ -1434,13 +1434,13 @@ bool CoreProtocol::normalStep(const QDomElement &e)
// waiting for an iq
if(e.namespaceURI() == NS_CLIENT && e.tagName() == "iq") {
Jid from(e.attribute("from"));
- QString type(e.attribute("type"));
- QString id(e.attribute("id"));
+ TQString type(e.attribute("type"));
+ TQString id(e.attribute("id"));
bool okfrom = (from.isEmpty() || from.compare(Jid(to)));
if(okfrom && id == "auth_1" && (type == "result" || type == "error")) {
if(type == "result") {
- QDomElement q = e.elementsByTagNameNS("jabber:iq:auth", "query").item(0).toElement();
+ TQDomElement q = e.elementsByTagNameNS("jabber:iq:auth", "query").item(0).toElement();
if(q.isNull() || q.elementsByTagName("username").item(0).isNull() || q.elementsByTagName("resource").item(0).isNull()) {
event = EError;
errorCode = ErrProtocol;
@@ -1487,8 +1487,8 @@ bool CoreProtocol::normalStep(const QDomElement &e)
// waiting for an iq
if(e.namespaceURI() == NS_CLIENT && e.tagName() == "iq") {
Jid from(e.attribute("from"));
- QString type(e.attribute("type"));
- QString id(e.attribute("id"));
+ TQString type(e.attribute("type"));
+ TQString id(e.attribute("id"));
bool okfrom = (from.isEmpty() || from.compare(Jid(to)));
if(okfrom && id == "auth_2" && (type == "result" || type == "error")) {
@@ -1517,7 +1517,7 @@ bool CoreProtocol::normalStep(const QDomElement &e)
if(e.namespaceURI() == NS_TLS && e.localName() == "starttls") {
// TODO: don't let this be done twice
- QDomElement e = doc.createElementNS(NS_TLS, "proceed");
+ TQDomElement e = doc.createElementNS(NS_TLS, "proceed");
writeElement(e, TypeElement, false, true);
event = ESend;
step = HandleTLS;
@@ -1546,16 +1546,16 @@ bool CoreProtocol::normalStep(const QDomElement &e)
}
}
if(e.namespaceURI() == NS_CLIENT && e.tagName() == "iq") {
- QDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement();
+ TQDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement();
if(!b.isNull()) {
- QDomElement res = b.elementsByTagName("resource").item(0).toElement();
- QString resource = res.text();
+ TQDomElement res = b.elementsByTagName("resource").item(0).toElement();
+ TQString resource = res.text();
- QDomElement r = doc.createElement("iq");
+ TQDomElement r = doc.createElement("iq");
r.setAttribute("type", "result");
r.setAttribute("id", e.attribute("id"));
- QDomElement bind = doc.createElementNS(NS_BIND, "bind");
- QDomElement jid = doc.createElement("jid");
+ TQDomElement bind = doc.createElementNS(NS_BIND, "bind");
+ TQDomElement jid = doc.createElement("jid");
Jid j = user + '@' + host + '/' + resource;
jid.appendChild(doc.createTextNode(j.full()));
bind.appendChild(jid);
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h
index 6cb82472..0c735192 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h
@@ -21,7 +21,7 @@
#ifndef PROTOCOL_H
#define PROTOCOL_H
-#include<qpair.h>
+#include<tqpair.h>
#include"xmlprotocol.h"
#include"xmpp.h"
@@ -56,7 +56,7 @@ namespace XMPP
bool tls_supported, sasl_supported, bind_supported;
bool tls_required;
- QStringList sasl_mechs;
+ TQStringList sasl_mechs;
};
class BasicProtocol : public XmlProtocol
@@ -136,78 +136,78 @@ namespace XMPP
void reset();
// for outgoing xml
- QDomDocument doc;
+ TQDomDocument doc;
// sasl-related
- QString saslMech() const;
- QByteArray saslStep() const;
- void setSASLMechList(const QStringList &list);
- void setSASLFirst(const QString &mech, const QByteArray &step);
- void setSASLNext(const QByteArray &step);
+ TQString saslMech() const;
+ TQByteArray saslStep() const;
+ void setSASLMechList(const TQStringList &list);
+ void setSASLFirst(const TQString &mech, const TQByteArray &step);
+ void setSASLNext(const TQByteArray &step);
void setSASLAuthed();
// send / recv
- void sendStanza(const QDomElement &e);
- void sendDirect(const QString &s);
+ void sendStanza(const TQDomElement &e);
+ void sendDirect(const TQString &s);
void sendWhitespace();
- QDomElement recvStanza();
+ TQDomElement recvStanza();
// shutdown
void shutdown();
- void shutdownWithError(int cond, const QString &otherHost="");
+ void shutdownWithError(int cond, const TQString &otherHost="");
// <stream> information
- QString to, from, id, lang;
+ TQString to, from, id, lang;
Version version;
// error output
int errCond;
- QString errText;
- QDomElement errAppSpec;
- QString otherHost;
+ TQString errText;
+ TQDomElement errAppSpec;
+ TQString otherHost;
- QByteArray spare; // filled with unprocessed data on NStartTLS and NSASLLayer
+ TQByteArray spare; // filled with unprocessed data on NStartTLS and NSASLLayer
bool isReady() const;
enum { TypeElement, TypeStanza, TypeDirect, TypePing };
protected:
- static int stringToSASLCond(const QString &s);
- static int stringToStreamCond(const QString &s);
- static QString saslCondToString(int);
- static QString streamCondToString(int);
+ static int stringToSASLCond(const TQString &s);
+ static int stringToStreamCond(const TQString &s);
+ static TQString saslCondToString(int);
+ static TQString streamCondToString(int);
- void send(const QDomElement &e, bool clip=false);
- void sendStreamError(int cond, const QString &text="", const QDomElement &appSpec=QDomElement());
- void sendStreamError(const QString &text); // old-style
+ void send(const TQDomElement &e, bool clip=false);
+ void sendStreamError(int cond, const TQString &text="", const TQDomElement &appSpec=TQDomElement());
+ void sendStreamError(const TQString &text); // old-style
- bool errorAndClose(int cond, const QString &text="", const QDomElement &appSpec=QDomElement());
+ bool errorAndClose(int cond, const TQString &text="", const TQDomElement &appSpec=TQDomElement());
bool error(int code);
- void delayErrorAndClose(int cond, const QString &text="", const QDomElement &appSpec=QDomElement());
+ void delayErrorAndClose(int cond, const TQString &text="", const TQDomElement &appSpec=TQDomElement());
void delayError(int code);
// reimplemented
- QDomElement docElement();
+ TQDomElement docElement();
void handleDocOpen(const Parser::Event &pe);
bool handleError();
bool handleCloseFinished();
- bool doStep(const QDomElement &e);
+ bool doStep(const TQDomElement &e);
void itemWritten(int id, int size);
- virtual QString defaultNamespace();
- virtual QStringList extraNamespaces(); // stringlist: prefix,uri,prefix,uri, [...]
+ virtual TQString defaultNamespace();
+ virtual TQStringList extraNamespaces(); // stringlist: prefix,uri,prefix,uri, [...]
virtual void handleStreamOpen(const Parser::Event &pe);
- virtual bool doStep2(const QDomElement &e)=0;
+ virtual bool doStep2(const TQDomElement &e)=0;
void setReady(bool b);
- QString sasl_mech;
- QStringList sasl_mechlist;
- QByteArray sasl_step;
+ TQString sasl_mech;
+ TQStringList sasl_mechlist;
+ TQByteArray sasl_step;
bool sasl_authed;
- QDomElement stanzaToRecv;
+ TQDomElement stanzaToRecv;
private:
struct SASLCondEntry
@@ -226,17 +226,17 @@ namespace XMPP
struct SendItem
{
- QDomElement stanzaToSend;
- QString stringToSend;
+ TQDomElement stanzaToSend;
+ TQString stringToSend;
bool doWhitespace;
};
- QValueList<SendItem> sendList;
+ TQValueList<SendItem> sendList;
bool doShutdown, delayedError, closeError, ready;
int stanzasPending, stanzasWritten;
void init();
- void extractStreamError(const QDomElement &e);
+ void extractStreamError(const TQDomElement &e);
};
class CoreProtocol : public BasicProtocol
@@ -254,30 +254,30 @@ namespace XMPP
void reset();
void startClientOut(const Jid &jid, bool oldOnly, bool tlsActive, bool doAuth);
- void startServerOut(const QString &to);
- void startDialbackOut(const QString &to, const QString &from);
- void startDialbackVerifyOut(const QString &to, const QString &from, const QString &id, const QString &key);
- void startClientIn(const QString &id);
- void startServerIn(const QString &id);
+ void startServerOut(const TQString &to);
+ void startDialbackOut(const TQString &to, const TQString &from);
+ void startDialbackVerifyOut(const TQString &to, const TQString &from, const TQString &id, const TQString &key);
+ void startClientIn(const TQString &id);
+ void startServerIn(const TQString &id);
- void setLang(const QString &s);
+ void setLang(const TQString &s);
void setAllowTLS(bool b);
void setAllowBind(bool b);
void setAllowPlain(bool b); // old-mode
- void setPassword(const QString &s);
- void setFrom(const QString &s);
- void setDialbackKey(const QString &s);
+ void setPassword(const TQString &s);
+ void setFrom(const TQString &s);
+ void setDialbackKey(const TQString &s);
// input
- QString user, host;
+ TQString user, host;
// status
bool old;
StreamFeatures features;
- //static QString xmlToString(const QDomElement &e, bool clip=false);
+ //static TQString xmlToString(const TQDomElement &e, bool clip=false);
class DBItem
{
@@ -285,7 +285,7 @@ namespace XMPP
enum { ResultRequest, ResultGrant, VerifyRequest, VerifyGrant, Validated };
int type;
Jid to, from;
- QString key, id;
+ TQString key, id;
bool ok;
};
@@ -312,7 +312,7 @@ namespace XMPP
GetAuthSetResponse // read auth-set response
};
- QValueList<DBItem> dbrequests, dbpending, dbvalidated;
+ TQValueList<DBItem> dbrequests, dbpending, dbvalidated;
bool server, dialback, dialback_verify;
int step;
@@ -324,31 +324,31 @@ namespace XMPP
bool oldOnly;
bool allowPlain;
bool doTLS, doAuth, doBinding;
- QString password;
+ TQString password;
- QString dialback_id, dialback_key;
- QString self_from;
+ TQString dialback_id, dialback_key;
+ TQString self_from;
void init();
- static int getOldErrorCode(const QDomElement &e);
+ static int getOldErrorCode(const TQDomElement &e);
bool loginComplete();
- bool isValidStanza(const QDomElement &e) const;
+ bool isValidStanza(const TQDomElement &e) const;
bool grabPendingItem(const Jid &to, const Jid &from, int type, DBItem *item);
- bool normalStep(const QDomElement &e);
- bool dialbackStep(const QDomElement &e);
+ bool normalStep(const TQDomElement &e);
+ bool dialbackStep(const TQDomElement &e);
// reimplemented
bool stepAdvancesParser() const;
bool stepRequiresElement() const;
- void stringSend(const QString &s);
- void stringRecv(const QString &s);
- QString defaultNamespace();
- QStringList extraNamespaces();
+ void stringSend(const TQString &s);
+ void stringRecv(const TQString &s);
+ TQString defaultNamespace();
+ TQStringList extraNamespaces();
void handleStreamOpen(const Parser::Event &pe);
- bool doStep2(const QDomElement &e);
- void elementSend(const QDomElement &e);
- void elementRecv(const QDomElement &e);
+ bool doStep2(const TQDomElement &e);
+ void elementSend(const TQDomElement &e);
+ void elementRecv(const TQDomElement &e);
};
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h
index e6172434..6eda17f9 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h
@@ -21,11 +21,11 @@
#ifndef QCAPROVIDER_H
#define QCAPROVIDER_H
-#include<qglobal.h>
-#include<qstring.h>
-#include<qdatetime.h>
-#include<qobject.h>
-#include<qhostaddress.h>
+#include<tqglobal.h>
+#include<tqstring.h>
+#include<tqdatetime.h>
+#include<tqobject.h>
+#include<tqhostaddress.h>
#include"qca.h"
#define QCA_PLUGIN_VERSION 1
@@ -50,7 +50,7 @@ public:
virtual QCA_HashContext *clone()=0;
virtual void reset()=0;
virtual void update(const char *in, unsigned int len)=0;
- virtual void final(QByteArray *out)=0;
+ virtual void final(TQByteArray *out)=0;
};
class QCA_CipherContext
@@ -66,7 +66,7 @@ public:
virtual bool setup(int dir, int mode, const char *key, int keysize, const char *iv, bool pad)=0;
virtual bool update(const char *in, unsigned int len)=0;
- virtual bool final(QByteArray *out)=0;
+ virtual bool final(TQByteArray *out)=0;
};
class QCA_RSAKeyContext
@@ -82,17 +82,17 @@ public:
virtual bool createFromPEM(const char *in, unsigned int len)=0;
virtual bool createFromNative(void *in)=0;
virtual bool generate(unsigned int bits)=0;
- virtual bool toDER(QByteArray *out, bool publicOnly)=0;
- virtual bool toPEM(QByteArray *out, bool publicOnly)=0;
+ virtual bool toDER(TQByteArray *out, bool publicOnly)=0;
+ virtual bool toPEM(TQByteArray *out, bool publicOnly)=0;
- virtual bool encrypt(const QByteArray &in, QByteArray *out, bool oaep)=0;
- virtual bool decrypt(const QByteArray &in, QByteArray *out, bool oaep)=0;
+ virtual bool encrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0;
+ virtual bool decrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0;
};
struct QCA_CertProperty
{
- QString var;
- QString val;
+ TQString var;
+ TQString val;
};
class QCA_CertContext
@@ -104,17 +104,17 @@ public:
virtual bool isNull() const=0;
virtual bool createFromDER(const char *in, unsigned int len)=0;
virtual bool createFromPEM(const char *in, unsigned int len)=0;
- virtual bool toDER(QByteArray *out)=0;
- virtual bool toPEM(QByteArray *out)=0;
-
- virtual QString serialNumber() const=0;
- virtual QString subjectString() const=0;
- virtual QString issuerString() const=0;
- virtual QValueList<QCA_CertProperty> subject() const=0;
- virtual QValueList<QCA_CertProperty> issuer() const=0;
- virtual QDateTime notBefore() const=0;
- virtual QDateTime notAfter() const=0;
- virtual bool matchesAddress(const QString &realHost) const=0;
+ virtual bool toDER(TQByteArray *out)=0;
+ virtual bool toPEM(TQByteArray *out)=0;
+
+ virtual TQString serialNumber() const=0;
+ virtual TQString subjectString() const=0;
+ virtual TQString issuerString() const=0;
+ virtual TQValueList<QCA_CertProperty> subject() const=0;
+ virtual TQValueList<QCA_CertProperty> issuer() const=0;
+ virtual TQDateTime notBefore() const=0;
+ virtual TQDateTime notAfter() const=0;
+ virtual bool matchesAddress(const TQString &realHost) const=0;
};
class QCA_TLSContext
@@ -124,15 +124,15 @@ public:
virtual ~QCA_TLSContext() {}
virtual void reset()=0;
- virtual bool startClient(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
- virtual bool startServer(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
+ virtual bool startClient(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
+ virtual bool startServer(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
- virtual int handshake(const QByteArray &in, QByteArray *out)=0;
- virtual int shutdown(const QByteArray &in, QByteArray *out)=0;
- virtual bool encode(const QByteArray &plain, QByteArray *to_net, int *encoded)=0;
- virtual bool decode(const QByteArray &from_net, QByteArray *plain, QByteArray *to_net)=0;
+ virtual int handshake(const TQByteArray &in, TQByteArray *out)=0;
+ virtual int shutdown(const TQByteArray &in, TQByteArray *out)=0;
+ virtual bool encode(const TQByteArray &plain, TQByteArray *to_net, int *encoded)=0;
+ virtual bool decode(const TQByteArray &from_net, TQByteArray *plain, TQByteArray *to_net)=0;
virtual bool eof() const=0;
- virtual QByteArray unprocessed()=0;
+ virtual TQByteArray unprocessed()=0;
virtual QCA_CertContext *peerCertificate() const=0;
virtual int validityResult() const=0;
@@ -140,7 +140,7 @@ public:
struct QCA_SASLHostPort
{
- QHostAddress addr;
+ TQHostAddress addr;
Q_UINT16 port;
};
@@ -157,35 +157,35 @@ public:
// common
virtual void reset()=0;
- virtual void setCoreProps(const QString &service, const QString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0;
- virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const QString &_ext_authid, int _ext_ssf)=0;
+ virtual void setCoreProps(const TQString &service, const TQString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0;
+ virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const TQString &_ext_authid, int _ext_ssf)=0;
virtual int security() const=0;
virtual int errorCond() const=0;
// init / first step
- virtual bool clientStart(const QStringList &mechlist)=0;
+ virtual bool clientStart(const TQStringList &mechlist)=0;
virtual int clientFirstStep(bool allowClientSendFirst)=0;
- virtual bool serverStart(const QString &realm, QStringList *mechlist, const QString &name)=0;
- virtual int serverFirstStep(const QString &mech, const QByteArray *in)=0;
+ virtual bool serverStart(const TQString &realm, TQStringList *mechlist, const TQString &name)=0;
+ virtual int serverFirstStep(const TQString &mech, const TQByteArray *in)=0;
// get / set params
virtual QCA_SASLNeedParams clientParamsNeeded() const=0;
- virtual void setClientParams(const QString *user, const QString *authzid, const QString *pass, const QString *realm)=0;
- virtual QString username() const=0;
- virtual QString authzid() const=0;
+ virtual void setClientParams(const TQString *user, const TQString *authzid, const TQString *pass, const TQString *realm)=0;
+ virtual TQString username() const=0;
+ virtual TQString authzid() const=0;
// continue steps
- virtual int nextStep(const QByteArray &in)=0;
+ virtual int nextStep(const TQByteArray &in)=0;
virtual int tryAgain()=0;
// results
- virtual QString mech() const=0;
- virtual const QByteArray *clientInit() const=0;
- virtual QByteArray result() const=0;
+ virtual TQString mech() const=0;
+ virtual const TQByteArray *clientInit() const=0;
+ virtual TQByteArray result() const=0;
// security layer
- virtual bool encode(const QByteArray &in, QByteArray *out)=0;
- virtual bool decode(const QByteArray &in, QByteArray *out)=0;
+ virtual bool encode(const TQByteArray &in, TQByteArray *out)=0;
+ virtual bool decode(const TQByteArray &in, TQByteArray *out)=0;
};
#endif
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp
index 159c8058..f7d44db4 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp
@@ -28,9 +28,9 @@
#include"securestream.h"
-#include<qguardedptr.h>
-#include<qvaluelist.h>
-#include<qtimer.h>
+#include<tqguardedptr.h>
+#include<tqvaluelist.h>
+#include<tqtimer.h>
#ifdef USE_TLSHANDLER
#include"xmpp.h"
@@ -56,7 +56,7 @@ public:
int finished(int encoded);
int p;
- QValueList<Item> list;
+ TQValueList<Item> list;
};
LayerTracker::LayerTracker()
@@ -90,7 +90,7 @@ void LayerTracker::specifyEncoded(int encoded, int plain)
int LayerTracker::finished(int encoded)
{
int plain = 0;
- for(QValueList<Item>::Iterator it = list.begin(); it != list.end();) {
+ for(TQValueList<Item>::Iterator it = list.begin(); it != list.end();) {
Item &i = *it;
// not enough?
@@ -131,11 +131,11 @@ public:
type = TLS;
p.tls = t;
init();
- connect(p.tls, SIGNAL(handshaken()), SLOT(tls_handshaken()));
- connect(p.tls, SIGNAL(readyRead()), SLOT(tls_readyRead()));
- connect(p.tls, SIGNAL(readyReadOutgoing(int)), SLOT(tls_readyReadOutgoing(int)));
- connect(p.tls, SIGNAL(closed()), SLOT(tls_closed()));
- connect(p.tls, SIGNAL(error(int)), SLOT(tls_error(int)));
+ connect(p.tls, TQT_SIGNAL(handshaken()), TQT_SLOT(tls_handshaken()));
+ connect(p.tls, TQT_SIGNAL(readyRead()), TQT_SLOT(tls_readyRead()));
+ connect(p.tls, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(tls_readyReadOutgoing(int)));
+ connect(p.tls, TQT_SIGNAL(closed()), TQT_SLOT(tls_closed()));
+ connect(p.tls, TQT_SIGNAL(error(int)), TQT_SLOT(tls_error(int)));
}
SecureLayer(QCA::SASL *s)
@@ -143,9 +143,9 @@ public:
type = SASL;
p.sasl = s;
init();
- connect(p.sasl, SIGNAL(readyRead()), SLOT(sasl_readyRead()));
- connect(p.sasl, SIGNAL(readyReadOutgoing(int)), SLOT(sasl_readyReadOutgoing(int)));
- connect(p.sasl, SIGNAL(error(int)), SLOT(sasl_error(int)));
+ connect(p.sasl, TQT_SIGNAL(readyRead()), TQT_SLOT(sasl_readyRead()));
+ connect(p.sasl, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(sasl_readyReadOutgoing(int)));
+ connect(p.sasl, TQT_SIGNAL(error(int)), TQT_SLOT(sasl_error(int)));
}
#ifdef USE_TLSHANDLER
@@ -154,11 +154,11 @@ public:
type = TLSH;
p.tlsHandler = t;
init();
- connect(p.tlsHandler, SIGNAL(success()), SLOT(tlsHandler_success()));
- connect(p.tlsHandler, SIGNAL(fail()), SLOT(tlsHandler_fail()));
- connect(p.tlsHandler, SIGNAL(closed()), SLOT(tlsHandler_closed()));
- connect(p.tlsHandler, SIGNAL(readyRead(const QByteArray &)), SLOT(tlsHandler_readyRead(const QByteArray &)));
- connect(p.tlsHandler, SIGNAL(readyReadOutgoing(const QByteArray &, int)), SLOT(tlsHandler_readyReadOutgoing(const QByteArray &, int)));
+ connect(p.tlsHandler, TQT_SIGNAL(success()), TQT_SLOT(tlsHandler_success()));
+ connect(p.tlsHandler, TQT_SIGNAL(fail()), TQT_SLOT(tlsHandler_fail()));
+ connect(p.tlsHandler, TQT_SIGNAL(closed()), TQT_SLOT(tlsHandler_closed()));
+ connect(p.tlsHandler, TQT_SIGNAL(readyRead(const TQByteArray &)), TQT_SLOT(tlsHandler_readyRead(const TQByteArray &)));
+ connect(p.tlsHandler, TQT_SIGNAL(readyReadOutgoing(const TQByteArray &, int)), TQT_SLOT(tlsHandler_readyReadOutgoing(const TQByteArray &, int)));
}
#endif
@@ -168,7 +168,7 @@ public:
prebytes = 0;
}
- void write(const QByteArray &a)
+ void write(const TQByteArray &a)
{
layer.addPlain(a.size());
switch(type) {
@@ -180,7 +180,7 @@ public:
}
}
- void writeIncoming(const QByteArray &a)
+ void writeIncoming(const TQByteArray &a)
{
switch(type) {
case TLS: { p.tls->writeIncoming(a); break; }
@@ -218,9 +218,9 @@ public:
signals:
void tlsHandshaken();
- void tlsClosed(const QByteArray &);
- void readyRead(const QByteArray &);
- void needWrite(const QByteArray &);
+ void tlsClosed(const TQByteArray &);
+ void readyRead(const TQByteArray &);
+ void needWrite(const TQByteArray &);
void error(int);
private slots:
@@ -232,13 +232,13 @@ private slots:
void tls_readyRead()
{
- QByteArray a = p.tls->read();
+ TQByteArray a = p.tls->read();
readyRead(a);
}
void tls_readyReadOutgoing(int plainBytes)
{
- QByteArray a = p.tls->readOutgoing();
+ TQByteArray a = p.tls->readOutgoing();
if(tls_done)
layer.specifyEncoded(a.size(), plainBytes);
needWrite(a);
@@ -246,7 +246,7 @@ private slots:
void tls_closed()
{
- QByteArray a = p.tls->readUnprocessed();
+ TQByteArray a = p.tls->readUnprocessed();
tlsClosed(a);
}
@@ -257,13 +257,13 @@ private slots:
void sasl_readyRead()
{
- QByteArray a = p.sasl->read();
+ TQByteArray a = p.sasl->read();
readyRead(a);
}
void sasl_readyReadOutgoing(int plainBytes)
{
- QByteArray a = p.sasl->readOutgoing();
+ TQByteArray a = p.sasl->readOutgoing();
layer.specifyEncoded(a.size(), plainBytes);
needWrite(a);
}
@@ -287,15 +287,15 @@ private slots:
void tlsHandler_closed()
{
- tlsClosed(QByteArray());
+ tlsClosed(TQByteArray());
}
- void tlsHandler_readyRead(const QByteArray &a)
+ void tlsHandler_readyRead(const TQByteArray &a)
{
readyRead(a);
}
- void tlsHandler_readyReadOutgoing(const QByteArray &a, int plainBytes)
+ void tlsHandler_readyReadOutgoing(const TQByteArray &a, int plainBytes)
{
if(tls_done)
layer.specifyEncoded(a.size(), plainBytes);
@@ -310,7 +310,7 @@ class SecureStream::Private
{
public:
ByteStream *bs;
- QPtrList<SecureLayer> layers;
+ TQPtrList<SecureLayer> layers;
int pending;
int errorCode;
bool active;
@@ -318,7 +318,7 @@ public:
bool haveTLS() const
{
- QPtrListIterator<SecureLayer> it(layers);
+ TQPtrListIterator<SecureLayer> it(layers);
for(SecureLayer *s; (s = it.current()); ++it) {
if(s->type == SecureLayer::TLS
#ifdef USE_TLSHANDLER
@@ -333,7 +333,7 @@ public:
bool haveSASL() const
{
- QPtrListIterator<SecureLayer> it(layers);
+ TQPtrListIterator<SecureLayer> it(layers);
for(SecureLayer *s; (s = it.current()); ++it) {
if(s->type == SecureLayer::SASL)
return true;
@@ -348,8 +348,8 @@ SecureStream::SecureStream(ByteStream *s)
d = new Private;
d->bs = s;
- connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead()));
- connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int)));
+ connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead()));
+ connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int)));
d->layers.setAutoDelete(true);
d->pending = 0;
@@ -362,25 +362,25 @@ SecureStream::~SecureStream()
delete d;
}
-void SecureStream::linkLayer(QObject *s)
+void SecureStream::linkLayer(TQObject *s)
{
- connect(s, SIGNAL(tlsHandshaken()), SLOT(layer_tlsHandshaken()));
- connect(s, SIGNAL(tlsClosed(const QByteArray &)), SLOT(layer_tlsClosed(const QByteArray &)));
- connect(s, SIGNAL(readyRead(const QByteArray &)), SLOT(layer_readyRead(const QByteArray &)));
- connect(s, SIGNAL(needWrite(const QByteArray &)), SLOT(layer_needWrite(const QByteArray &)));
- connect(s, SIGNAL(error(int)), SLOT(layer_error(int)));
+ connect(s, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(layer_tlsHandshaken()));
+ connect(s, TQT_SIGNAL(tlsClosed(const TQByteArray &)), TQT_SLOT(layer_tlsClosed(const TQByteArray &)));
+ connect(s, TQT_SIGNAL(readyRead(const TQByteArray &)), TQT_SLOT(layer_readyRead(const TQByteArray &)));
+ connect(s, TQT_SIGNAL(needWrite(const TQByteArray &)), TQT_SLOT(layer_needWrite(const TQByteArray &)));
+ connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(layer_error(int)));
}
int SecureStream::calcPrebytes() const
{
int x = 0;
- QPtrListIterator<SecureLayer> it(d->layers);
+ TQPtrListIterator<SecureLayer> it(d->layers);
for(SecureLayer *s; (s = it.current()); ++it)
x += s->prebytes;
return (d->pending - x);
}
-void SecureStream::startTLSClient(QCA::TLS *t, const QByteArray &spare)
+void SecureStream::startTLSClient(QCA::TLS *t, const TQByteArray &spare)
{
if(!d->active || d->topInProgress || d->haveTLS())
return;
@@ -394,7 +394,7 @@ void SecureStream::startTLSClient(QCA::TLS *t, const QByteArray &spare)
insertData(spare);
}
-void SecureStream::startTLSServer(QCA::TLS *t, const QByteArray &spare)
+void SecureStream::startTLSServer(QCA::TLS *t, const TQByteArray &spare)
{
if(!d->active || d->topInProgress || d->haveTLS())
return;
@@ -408,7 +408,7 @@ void SecureStream::startTLSServer(QCA::TLS *t, const QByteArray &spare)
insertData(spare);
}
-void SecureStream::setLayerSASL(QCA::SASL *sasl, const QByteArray &spare)
+void SecureStream::setLayerSASL(QCA::SASL *sasl, const TQByteArray &spare)
{
if(!d->active || d->topInProgress || d->haveSASL())
return;
@@ -422,7 +422,7 @@ void SecureStream::setLayerSASL(QCA::SASL *sasl, const QByteArray &spare)
}
#ifdef USE_TLSHANDLER
-void SecureStream::startTLSClient(XMPP::TLSHandler *t, const QString &server, const QByteArray &spare)
+void SecureStream::startTLSClient(XMPP::TLSHandler *t, const TQString &server, const TQByteArray &spare)
{
if(!d->active || d->topInProgress || d->haveTLS())
return;
@@ -459,7 +459,7 @@ bool SecureStream::isOpen() const
return d->active;
}
-void SecureStream::write(const QByteArray &a)
+void SecureStream::write(const TQByteArray &a)
{
if(!isOpen())
return;
@@ -481,7 +481,7 @@ int SecureStream::bytesToWrite() const
void SecureStream::bs_readyRead()
{
- QByteArray a = d->bs->read();
+ TQByteArray a = d->bs->read();
// send to the first layer
SecureLayer *s = d->layers.getFirst();
@@ -493,7 +493,7 @@ void SecureStream::bs_readyRead()
void SecureStream::bs_bytesWritten(int bytes)
{
- QPtrListIterator<SecureLayer> it(d->layers);
+ TQPtrListIterator<SecureLayer> it(d->layers);
for(SecureLayer *s; (s = it.current()); ++it)
bytes = s->finished(bytes);
@@ -509,17 +509,17 @@ void SecureStream::layer_tlsHandshaken()
tlsHandshaken();
}
-void SecureStream::layer_tlsClosed(const QByteArray &)
+void SecureStream::layer_tlsClosed(const TQByteArray &)
{
d->active = false;
d->layers.clear();
tlsClosed();
}
-void SecureStream::layer_readyRead(const QByteArray &a)
+void SecureStream::layer_readyRead(const TQByteArray &a)
{
SecureLayer *s = (SecureLayer *)sender();
- QPtrListIterator<SecureLayer> it(d->layers);
+ TQPtrListIterator<SecureLayer> it(d->layers);
while(it.current() != s)
++it;
@@ -532,10 +532,10 @@ void SecureStream::layer_readyRead(const QByteArray &a)
incomingData(a);
}
-void SecureStream::layer_needWrite(const QByteArray &a)
+void SecureStream::layer_needWrite(const TQByteArray &a)
{
SecureLayer *s = (SecureLayer *)sender();
- QPtrListIterator<SecureLayer> it(d->layers);
+ TQPtrListIterator<SecureLayer> it(d->layers);
while(it.current() != s)
++it;
@@ -565,7 +565,7 @@ void SecureStream::layer_error(int x)
#endif
}
-void SecureStream::insertData(const QByteArray &a)
+void SecureStream::insertData(const TQByteArray &a)
{
if(!a.isEmpty()) {
SecureLayer *s = d->layers.getLast();
@@ -576,12 +576,12 @@ void SecureStream::insertData(const QByteArray &a)
}
}
-void SecureStream::writeRawData(const QByteArray &a)
+void SecureStream::writeRawData(const TQByteArray &a)
{
d->bs->write(a);
}
-void SecureStream::incomingData(const QByteArray &a)
+void SecureStream::incomingData(const TQByteArray &a)
{
appendRead(a);
if(bytesAvailable())
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h
index 8ae9f761..844fd3d1 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h
@@ -41,11 +41,11 @@ public:
SecureStream(ByteStream *s);
~SecureStream();
- void startTLSClient(QCA::TLS *t, const QByteArray &spare=QByteArray());
- void startTLSServer(QCA::TLS *t, const QByteArray &spare=QByteArray());
- void setLayerSASL(QCA::SASL *s, const QByteArray &spare=QByteArray());
+ void startTLSClient(QCA::TLS *t, const TQByteArray &spare=TQByteArray());
+ void startTLSServer(QCA::TLS *t, const TQByteArray &spare=TQByteArray());
+ void setLayerSASL(QCA::SASL *s, const TQByteArray &spare=TQByteArray());
#ifdef USE_TLSHANDLER
- void startTLSClient(XMPP::TLSHandler *t, const QString &server, const QByteArray &spare=QByteArray());
+ void startTLSClient(XMPP::TLSHandler *t, const TQString &server, const TQByteArray &spare=TQByteArray());
#endif
void closeTLS();
@@ -53,7 +53,7 @@ public:
// reimplemented
bool isOpen() const;
- void write(const QByteArray &);
+ void write(const TQByteArray &);
int bytesToWrite() const;
signals:
@@ -65,17 +65,17 @@ private slots:
void bs_bytesWritten(int);
void layer_tlsHandshaken();
- void layer_tlsClosed(const QByteArray &);
- void layer_readyRead(const QByteArray &);
- void layer_needWrite(const QByteArray &);
+ void layer_tlsClosed(const TQByteArray &);
+ void layer_readyRead(const TQByteArray &);
+ void layer_needWrite(const TQByteArray &);
void layer_error(int);
private:
- void linkLayer(QObject *);
+ void linkLayer(TQObject *);
int calcPrebytes() const;
- void insertData(const QByteArray &a);
- void writeRawData(const QByteArray &a);
- void incomingData(const QByteArray &a);
+ void insertData(const TQByteArray &a);
+ void writeRawData(const TQByteArray &a);
+ void incomingData(const TQByteArray &a);
class Private;
Private *d;
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp
index 82a7aac4..c825a2ca 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp
@@ -20,10 +20,10 @@
#include"simplesasl.h"
-#include<qhostaddress.h>
-#include<qstringlist.h>
-#include<qptrlist.h>
-#include<qvaluelist.h>
+#include<tqhostaddress.h>
+#include<tqstringlist.h>
+#include<tqptrlist.h>
+#include<tqvaluelist.h>
#include<qca.h>
#include<stdlib.h>
#include"base64.h"
@@ -33,17 +33,17 @@ namespace XMPP
struct Prop
{
- QCString var, val;
+ TQCString var, val;
};
-class PropList : public QValueList<Prop>
+class PropList : public TQValueList<Prop>
{
public:
- PropList() : QValueList<Prop>()
+ PropList() : TQValueList<Prop>()
{
}
- void set(const QCString &var, const QCString &val)
+ void set(const TQCString &var, const TQCString &val)
{
Prop p;
p.var = var;
@@ -51,18 +51,18 @@ public:
append(p);
}
- QCString get(const QCString &var)
+ TQCString get(const TQCString &var)
{
for(ConstIterator it = begin(); it != end(); ++it) {
if((*it).var == var)
return (*it).val;
}
- return QCString();
+ return TQCString();
}
- QCString toString() const
+ TQCString toString() const
{
- QCString str;
+ TQCString str;
bool first = true;
for(ConstIterator it = begin(); it != end(); ++it) {
if(!first)
@@ -73,7 +73,7 @@ public:
return str;
}
- bool fromString(const QCString &str)
+ bool fromString(const TQCString &str)
{
PropList list;
int at = 0;
@@ -81,7 +81,7 @@ public:
int n = str.find('=', at);
if(n == -1)
break;
- QCString var, val;
+ TQCString var, val;
var = str.mid(at, n-at);
at = n + 1;
if(str[at] == '\"') {
@@ -122,7 +122,7 @@ public:
return true;
}
- int varCount(const QCString &var)
+ int varCount(const TQCString &var)
{
int n = 0;
for(ConstIterator it = begin(); it != end(); ++it) {
@@ -132,9 +132,9 @@ public:
return n;
}
- QStringList getValues(const QCString &var)
+ TQStringList getValues(const TQCString &var)
{
- QStringList list;
+ TQStringList list;
for(ConstIterator it = begin(); it != end(); ++it) {
if((*it).var == var)
list += (*it).val;
@@ -147,19 +147,19 @@ class SimpleSASLContext : public QCA_SASLContext
{
public:
// core props
- QString service, host;
+ TQString service, host;
// state
int step;
- QByteArray in_buf;
- QString out_mech;
- QByteArray out_buf;
+ TQByteArray in_buf;
+ TQString out_mech;
+ TQByteArray out_buf;
bool capable;
int err;
QCA_SASLNeedParams need;
QCA_SASLNeedParams have;
- QString user, authz, pass, realm;
+ TQString user, authz, pass, realm;
SimpleSASLContext()
{
@@ -179,7 +179,7 @@ public:
void resetState()
{
- out_mech = QString();
+ out_mech = TQString();
out_buf.resize(0);
err = -1;
}
@@ -195,19 +195,19 @@ public:
have.authzid = false;
have.pass = false;
have.realm = false;
- user = QString();
- authz = QString();
- pass = QString();
- realm = QString();
+ user = TQString();
+ authz = TQString();
+ pass = TQString();
+ realm = TQString();
}
- void setCoreProps(const QString &_service, const QString &_host, QCA_SASLHostPort *, QCA_SASLHostPort *)
+ void setCoreProps(const TQString &_service, const TQString &_host, QCA_SASLHostPort *, QCA_SASLHostPort *)
{
service = _service;
host = _host;
}
- void setSecurityProps(bool, bool, bool, bool, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int, const QString &, int)
+ void setSecurityProps(bool, bool, bool, bool, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int, const TQString &, int)
{
if(reqForward || reqCreds || reqMutual || ssfMin > 0)
capable = false;
@@ -225,10 +225,10 @@ public:
return err;
}
- bool clientStart(const QStringList &mechlist)
+ bool clientStart(const TQStringList &mechlist)
{
bool haveMech = false;
- for(QStringList::ConstIterator it = mechlist.begin(); it != mechlist.end(); ++it) {
+ for(TQStringList::ConstIterator it = mechlist.begin(); it != mechlist.end(); ++it) {
if((*it) == "DIGEST-MD5") {
haveMech = true;
break;
@@ -249,12 +249,12 @@ public:
return clientTryAgain();
}
- bool serverStart(const QString &, QStringList *, const QString &)
+ bool serverStart(const TQString &, TQStringList *, const TQString &)
{
return false;
}
- int serverFirstStep(const QString &, const QByteArray *)
+ int serverFirstStep(const TQString &, const TQByteArray *)
{
return Error;
}
@@ -264,7 +264,7 @@ public:
return need;
}
- void setClientParams(const QString *_user, const QString *_authzid, const QString *_pass, const QString *_realm)
+ void setClientParams(const TQString *_user, const TQString *_authzid, const TQString *_pass, const TQString *_realm)
{
if(_user) {
user = *_user;
@@ -288,17 +288,17 @@ public:
}
}
- QString username() const
+ TQString username() const
{
- return QString();
+ return TQString();
}
- QString authzid() const
+ TQString authzid() const
{
- return QString();
+ return TQString();
}
- int nextStep(const QByteArray &in)
+ int nextStep(const TQByteArray &in)
{
in_buf = in.copy();
return tryAgain();
@@ -309,17 +309,17 @@ public:
return clientTryAgain();
}
- QString mech() const
+ TQString mech() const
{
return out_mech;
}
- const QByteArray *clientInit() const
+ const TQByteArray *clientInit() const
{
return 0;
}
- QByteArray result() const
+ TQByteArray result() const
{
return out_buf;
}
@@ -349,7 +349,7 @@ public:
return NeedParams;
// get props
- QCString cs(in_buf.data(), in_buf.size()+1);
+ TQCString cs(in_buf.data(), in_buf.size()+1);
PropList in;
if(!in.fromString(cs)) {
err = QCA::SASL::BadProto;
@@ -357,30 +357,30 @@ public:
}
// make a cnonce
- QByteArray a(32);
+ TQByteArray a(32);
for(int n = 0; n < (int)a.size(); ++n)
a[n] = (char)(256.0*rand()/(RAND_MAX+1.0));
- QCString cnonce = Base64::arrayToString(a).latin1();
+ TQCString cnonce = Base64::arrayToString(a).latin1();
// make other variables
realm = host;
- QCString nonce = in.get("nonce");
- QCString nc = "00000001";
- QCString uri = service.utf8() + '/' + host.utf8();
- QCString qop = "auth";
+ TQCString nonce = in.get("nonce");
+ TQCString nc = "00000001";
+ TQCString uri = service.utf8() + '/' + host.utf8();
+ TQCString qop = "auth";
// build 'response'
- QCString X = user.utf8() + ':' + realm.utf8() + ':' + pass.utf8();
- QByteArray Y = QCA::MD5::hash(X);
- QCString tmp = QCString(":") + nonce + ':' + cnonce + ':' + authz.utf8();
- QByteArray A1(Y.size() + tmp.length());
+ TQCString X = user.utf8() + ':' + realm.utf8() + ':' + pass.utf8();
+ TQByteArray Y = QCA::MD5::hash(X);
+ TQCString tmp = TQCString(":") + nonce + ':' + cnonce + ':' + authz.utf8();
+ TQByteArray A1(Y.size() + tmp.length());
memcpy(A1.data(), Y.data(), Y.size());
memcpy(A1.data() + Y.size(), tmp.data(), tmp.length());
- QCString A2 = "AUTHENTICATE:" + uri;
- QCString HA1 = QCA::MD5::hashToString(A1).latin1();
- QCString HA2 = QCA::MD5::hashToString(A2).latin1();
- QCString KD = HA1 + ':' + nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + HA2;
- QCString Z = QCA::MD5::hashToString(KD).latin1();
+ TQCString A2 = "AUTHENTICATE:" + uri;
+ TQCString HA1 = QCA::MD5::hashToString(A1).latin1();
+ TQCString HA2 = QCA::MD5::hashToString(A2).latin1();
+ TQCString KD = HA1 + ':' + nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + HA2;
+ TQCString Z = QCA::MD5::hashToString(KD).latin1();
// build output
PropList out;
@@ -396,7 +396,7 @@ public:
out.set("response", Z);
out.set("charset", "utf-8");
out.set("authzid", authz.utf8());
- QCString s = out.toString();
+ TQCString s = out.toString();
// done
out_buf.resize(s.length());
@@ -410,13 +410,13 @@ public:
}
}
- bool encode(const QByteArray &a, QByteArray *b)
+ bool encode(const TQByteArray &a, TQByteArray *b)
{
*b = a.copy();
return true;
}
- bool decode(const QByteArray &a, QByteArray *b)
+ bool decode(const TQByteArray &a, TQByteArray *b)
{
*b = a.copy();
return true;
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp
index 5482e2b3..d3182ffe 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp
@@ -44,9 +44,9 @@
#include"xmpp.h"
-#include<qtextstream.h>
-#include<qguardedptr.h>
-#include<qtimer.h>
+#include<tqtextstream.h>
+#include<tqguardedptr.h>
+#include<tqtimer.h>
#include<qca.h>
#include<stdlib.h>
#include"bytestream.h"
@@ -70,15 +70,15 @@ void XMPP::setDebug(Debug *p)
debug_ptr = p;
}
-static QByteArray randomArray(int size)
+static TQByteArray randomArray(int size)
{
- QByteArray a(size);
+ TQByteArray a(size);
for(int n = 0; n < size; ++n)
a[n] = (char)(256.0*rand()/(RAND_MAX+1.0));
return a;
}
-static QString genId()
+static TQString genId()
{
// need SHA1 here
if(!QCA::isSupported(QCA::CAP_SHA1))
@@ -90,7 +90,7 @@ static QString genId()
//----------------------------------------------------------------------------
// Stanza
//----------------------------------------------------------------------------
-Stanza::Error::Error(int _type, int _condition, const QString &_text, const QDomElement &_appSpec)
+Stanza::Error::Error(int _type, int _condition, const TQString &_text, const TQDomElement &_appSpec)
{
type = _type;
condition = _condition;
@@ -115,7 +115,7 @@ public:
};
static ErrorCondEntry errorCondTable[];
- static int stringToKind(const QString &s)
+ static int stringToKind(const TQString &s)
{
if(s == "message")
return Message;
@@ -127,7 +127,7 @@ public:
return -1;
}
- static QString kindToString(Kind k)
+ static TQString kindToString(Kind k)
{
if(k == Message)
return "message";
@@ -137,7 +137,7 @@ public:
return "iq";
}
- static int stringToErrorType(const QString &s)
+ static int stringToErrorType(const TQString &s)
{
for(int n = 0; errorTypeTable[n].str; ++n) {
if(s == errorTypeTable[n].str)
@@ -146,16 +146,16 @@ public:
return -1;
}
- static QString errorTypeToString(int x)
+ static TQString errorTypeToString(int x)
{
for(int n = 0; errorTypeTable[n].str; ++n) {
if(x == errorTypeTable[n].type)
return errorTypeTable[n].str;
}
- return QString();
+ return TQString();
}
- static int stringToErrorCond(const QString &s)
+ static int stringToErrorCond(const TQString &s)
{
for(int n = 0; errorCondTable[n].str; ++n) {
if(s == errorCondTable[n].str)
@@ -164,17 +164,17 @@ public:
return -1;
}
- static QString errorCondToString(int x)
+ static TQString errorCondToString(int x)
{
for(int n = 0; errorCondTable[n].str; ++n) {
if(x == errorCondTable[n].cond)
return errorCondTable[n].str;
}
- return QString();
+ return TQString();
}
Stream *s;
- QDomElement e;
+ TQDomElement e;
};
Stanza::Private::ErrorTypeEntry Stanza::Private::errorTypeTable[] =
@@ -215,7 +215,7 @@ Stanza::Stanza()
d = 0;
}
-Stanza::Stanza(Stream *s, Kind k, const Jid &to, const QString &type, const QString &id)
+Stanza::Stanza(Stream *s, Kind k, const Jid &to, const TQString &type, const TQString &id)
{
d = new Private;
@@ -235,7 +235,7 @@ Stanza::Stanza(Stream *s, Kind k, const Jid &to, const QString &type, const QStr
setId(id);
}
-Stanza::Stanza(Stream *s, const QDomElement &e)
+Stanza::Stanza(Stream *s, const TQDomElement &e)
{
d = 0;
if(e.namespaceURI() != s->baseNS())
@@ -273,59 +273,59 @@ bool Stanza::isNull() const
return (d ? false: true);
}
-QDomElement Stanza::element() const
+TQDomElement Stanza::element() const
{
return d->e;
}
-QString Stanza::toString() const
+TQString Stanza::toString() const
{
return Stream::xmlToString(d->e);
}
-QDomDocument & Stanza::doc() const
+TQDomDocument & Stanza::doc() const
{
return d->s->doc();
}
-QString Stanza::baseNS() const
+TQString Stanza::baseNS() const
{
return d->s->baseNS();
}
-QString Stanza::xhtmlImNS() const
+TQString Stanza::xhtmlImNS() const
{
return d->s->xhtmlImNS();
}
-QString Stanza::xhtmlNS() const
+TQString Stanza::xhtmlNS() const
{
return d->s->xhtmlNS();
}
-QDomElement Stanza::createElement(const QString &ns, const QString &tagName)
+TQDomElement Stanza::createElement(const TQString &ns, const TQString &tagName)
{
return d->s->doc().createElementNS(ns, tagName);
}
-QDomElement Stanza::createTextElement(const QString &ns, const QString &tagName, const QString &text)
+TQDomElement Stanza::createTextElement(const TQString &ns, const TQString &tagName, const TQString &text)
{
- QDomElement e = d->s->doc().createElementNS(ns, tagName);
+ TQDomElement e = d->s->doc().createElementNS(ns, tagName);
e.appendChild(d->s->doc().createTextNode(text));
return e;
}
-QDomElement Stanza::createXHTMLElement(const QString &xHTML)
+TQDomElement Stanza::createXHTMLElement(const TQString &xHTML)
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(xHTML, true);
- QDomElement root = doc.documentElement();
- //QDomElement e;
+ TQDomElement root = doc.documentElement();
+ //TQDomElement e;
return (root);
}
-void Stanza::appendChild(const QDomElement &e)
+void Stanza::appendChild(const TQDomElement &e)
{
d->e.appendChild(e);
}
@@ -350,19 +350,19 @@ Jid Stanza::from() const
return Jid(d->e.attribute("from"));
}
-QString Stanza::id() const
+TQString Stanza::id() const
{
return d->e.attribute("id");
}
-QString Stanza::type() const
+TQString Stanza::type() const
{
return d->e.attribute("type");
}
-QString Stanza::lang() const
+TQString Stanza::lang() const
{
- return d->e.attributeNS(NS_XML, "lang", QString());
+ return d->e.attributeNS(NS_XML, "lang", TQString());
}
void Stanza::setTo(const Jid &j)
@@ -375,17 +375,17 @@ void Stanza::setFrom(const Jid &j)
d->e.setAttribute("from", j.full());
}
-void Stanza::setId(const QString &id)
+void Stanza::setId(const TQString &id)
{
d->e.setAttribute("id", id);
}
-void Stanza::setType(const QString &type)
+void Stanza::setType(const TQString &type)
{
d->e.setAttribute("type", type);
}
-void Stanza::setLang(const QString &lang)
+void Stanza::setLang(const TQString &lang)
{
d->e.setAttribute("xml:lang", lang);
}
@@ -393,7 +393,7 @@ void Stanza::setLang(const QString &lang)
Stanza::Error Stanza::error() const
{
Error err;
- QDomElement e = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement();
+ TQDomElement e = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement();
if(e.isNull())
return err;
@@ -403,11 +403,11 @@ Stanza::Error Stanza::error() const
err.type = x;
// condition: find first element
- QDomNodeList nl = e.childNodes();
- QDomElement t;
+ TQDomNodeList nl = e.childNodes();
+ TQDomElement t;
uint n;
for(n = 0; n < nl.count(); ++n) {
- QDomNode i = nl.item(n);
+ TQDomNode i = nl.item(n);
if(i.isElement()) {
t = i.toElement();
break;
@@ -429,7 +429,7 @@ Stanza::Error Stanza::error() const
// appspec: find first non-standard namespaced element
nl = e.childNodes();
for(n = 0; n < nl.count(); ++n) {
- QDomNode i = nl.item(n);
+ TQDomNode i = nl.item(n);
if(i.isElement() && i.namespaceURI() != NS_STANZAS) {
err.appSpec = i.toElement();
break;
@@ -441,7 +441,7 @@ Stanza::Error Stanza::error() const
void Stanza::setError(const Error &err)
{
// create the element if necessary
- QDomElement errElem = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement();
+ TQDomElement errElem = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement();
if(errElem.isNull()) {
errElem = d->e.ownerDocument().createElementNS(d->s->baseNS(), "error");
d->e.appendChild(errElem);
@@ -449,13 +449,13 @@ void Stanza::setError(const Error &err)
// error type/condition
if(d->s->old()) {
- errElem.setAttribute("code", QString::number(err.condition));
+ errElem.setAttribute("code", TQString::number(err.condition));
}
else {
- QString stype = Private::errorTypeToString(err.type);
+ TQString stype = Private::errorTypeToString(err.type);
if(stype.isEmpty())
return;
- QString scond = Private::errorCondToString(err.condition);
+ TQString scond = Private::errorCondToString(err.condition);
if(scond.isEmpty())
return;
@@ -468,7 +468,7 @@ void Stanza::setError(const Error &err)
errElem.appendChild(d->e.ownerDocument().createTextNode(err.text));
}
else {
- QDomElement te = d->e.ownerDocument().createElementNS(d->s->baseNS(), "text");
+ TQDomElement te = d->e.ownerDocument().createElementNS(d->s->baseNS(), "text");
te.appendChild(d->e.ownerDocument().createTextNode(err.text));
errElem.appendChild(te);
}
@@ -479,7 +479,7 @@ void Stanza::setError(const Error &err)
void Stanza::clearError()
{
- QDomElement errElem = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement();
+ TQDomElement errElem = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement();
if(!errElem.isNull())
d->e.removeChild(errElem);
}
@@ -488,8 +488,8 @@ void Stanza::clearError()
// Stream
//----------------------------------------------------------------------------
static XmlProtocol *foo = 0;
-Stream::Stream(QObject *parent)
-:QObject(parent)
+Stream::Stream(TQObject *parent)
+:TQObject(parent)
{
}
@@ -497,17 +497,17 @@ Stream::~Stream()
{
}
-Stanza Stream::createStanza(Stanza::Kind k, const Jid &to, const QString &type, const QString &id)
+Stanza Stream::createStanza(Stanza::Kind k, const Jid &to, const TQString &type, const TQString &id)
{
return Stanza(this, k, to, type, id);
}
-Stanza Stream::createStanza(const QDomElement &e)
+Stanza Stream::createStanza(const TQDomElement &e)
{
return Stanza(this, e);
}
-QString Stream::xmlToString(const QDomElement &e, bool clip)
+TQString Stream::xmlToString(const TQDomElement &e, bool clip)
{
if(!foo)
foo = new CoreProtocol;
@@ -569,14 +569,14 @@ public:
}
Jid jid;
- QString server;
+ TQString server;
bool oldOnly;
bool allowPlain, mutualAuth;
bool haveLocalAddr;
- QHostAddress localAddr;
+ TQHostAddress localAddr;
Q_UINT16 localPort;
int minimumSSF, maximumSSF;
- QString sasl_mech;
+ TQString sasl_mech;
bool doBinding;
bool in_rrsig;
@@ -590,7 +590,7 @@ public:
CoreProtocol client;
CoreProtocol srv;
- QString defRealm;
+ TQString defRealm;
int mode;
int state;
@@ -600,51 +600,51 @@ public:
bool tls_warned, using_tls;
bool doAuth;
- QStringList sasl_mechlist;
+ TQStringList sasl_mechlist;
int errCond;
- QString errText;
- QDomElement errAppSpec;
+ TQString errText;
+ TQDomElement errAppSpec;
- QPtrList<Stanza> in;
+ TQPtrList<Stanza> in;
- QTimer noopTimer;
+ TQTimer noopTimer;
int noop_time;
};
-ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, QObject *parent)
+ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, TQObject *parent)
:Stream(parent)
{
d = new Private;
d->mode = Client;
d->conn = conn;
- connect(d->conn, SIGNAL(connected()), SLOT(cr_connected()));
- connect(d->conn, SIGNAL(error()), SLOT(cr_error()));
+ connect(d->conn, TQT_SIGNAL(connected()), TQT_SLOT(cr_connected()));
+ connect(d->conn, TQT_SIGNAL(error()), TQT_SLOT(cr_error()));
d->noop_time = 0;
- connect(&d->noopTimer, SIGNAL(timeout()), SLOT(doNoop()));
+ connect(&d->noopTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doNoop()));
d->tlsHandler = tlsHandler;
}
-ClientStream::ClientStream(const QString &host, const QString &defRealm, ByteStream *bs, QCA::TLS *tls, QObject *parent)
+ClientStream::ClientStream(const TQString &host, const TQString &defRealm, ByteStream *bs, QCA::TLS *tls, TQObject *parent)
:Stream(parent)
{
d = new Private;
d->mode = Server;
d->bs = bs;
- connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed()));
- connect(d->bs, SIGNAL(delayedCloseFinished()), SLOT(bs_delayedCloseFinished()));
- connect(d->bs, SIGNAL(error(int)), SLOT(bs_error(int)));
+ connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed()));
+ connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished()));
+ connect(d->bs, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int)));
- QByteArray spare = d->bs->read();
+ TQByteArray spare = d->bs->read();
d->ss = new SecureStream(d->bs);
- connect(d->ss, SIGNAL(readyRead()), SLOT(ss_readyRead()));
- connect(d->ss, SIGNAL(bytesWritten(int)), SLOT(ss_bytesWritten(int)));
- connect(d->ss, SIGNAL(tlsHandshaken()), SLOT(ss_tlsHandshaken()));
- connect(d->ss, SIGNAL(tlsClosed()), SLOT(ss_tlsClosed()));
- connect(d->ss, SIGNAL(error(int)), SLOT(ss_error(int)));
+ connect(d->ss, TQT_SIGNAL(readyRead()), TQT_SLOT(ss_readyRead()));
+ connect(d->ss, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(ss_bytesWritten(int)));
+ connect(d->ss, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(ss_tlsHandshaken()));
+ connect(d->ss, TQT_SIGNAL(tlsClosed()), TQT_SLOT(ss_tlsClosed()));
+ connect(d->ss, TQT_SIGNAL(error(int)), TQT_SLOT(ss_error(int)));
d->server = host;
d->defRealm = defRealm;
@@ -655,7 +655,7 @@ ClientStream::ClientStream(const QString &host, const QString &defRealm, ByteStr
//d->srv.startServerIn(genId());
//d->state = Connecting;
//d->jid = Jid();
- //d->server = QString();
+ //d->server = TQString();
}
ClientStream::~ClientStream()
@@ -761,13 +761,13 @@ bool ClientStream::isAuthenticated() const
return (d->state == Active) ? true: false;
}
-void ClientStream::setUsername(const QString &s)
+void ClientStream::setUsername(const TQString &s)
{
if(d->sasl)
d->sasl->setUsername(s);
}
-void ClientStream::setPassword(const QString &s)
+void ClientStream::setPassword(const TQString &s)
{
if(d->client.old) {
d->client.setPassword(s);
@@ -778,7 +778,7 @@ void ClientStream::setPassword(const QString &s)
}
}
-void ClientStream::setRealm(const QString &s)
+void ClientStream::setRealm(const TQString &s)
{
if(d->sasl)
d->sasl->setRealm(s);
@@ -817,7 +817,7 @@ void ClientStream::setNoopTime(int mills)
d->noopTimer.start(d->noop_time);
}
-QString ClientStream::saslMechanism() const
+TQString ClientStream::saslMechanism() const
{
return d->client.saslMech();
}
@@ -827,12 +827,12 @@ int ClientStream::saslSSF() const
return d->sasl_ssf;
}
-void ClientStream::setSASLMechanism(const QString &s)
+void ClientStream::setSASLMechanism(const TQString &s)
{
d->sasl_mech = s;
}
-void ClientStream::setLocalAddr(const QHostAddress &addr, Q_UINT16 port)
+void ClientStream::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port)
{
d->haveLocalAddr = true;
d->localAddr = addr;
@@ -844,12 +844,12 @@ int ClientStream::errorCondition() const
return d->errCond;
}
-QString ClientStream::errorText() const
+TQString ClientStream::errorText() const
{
return d->errText;
}
-QDomElement ClientStream::errorAppSpec() const
+TQDomElement ClientStream::errorAppSpec() const
{
return d->errAppSpec;
}
@@ -871,22 +871,22 @@ void ClientStream::close()
}
}
-QDomDocument & ClientStream::doc() const
+TQDomDocument & ClientStream::doc() const
{
return d->client.doc;
}
-QString ClientStream::baseNS() const
+TQString ClientStream::baseNS() const
{
return NS_CLIENT;
}
-QString ClientStream::xhtmlImNS() const
+TQString ClientStream::xhtmlImNS() const
{
return NS_XHTML_IM;
}
-QString ClientStream::xhtmlNS() const
+TQString ClientStream::xhtmlNS() const
{
return NS_XHTML;
}
@@ -940,17 +940,17 @@ void ClientStream::write(const Stanza &s)
void ClientStream::cr_connected()
{
d->bs = d->conn->stream();
- connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed()));
- connect(d->bs, SIGNAL(delayedCloseFinished()), SLOT(bs_delayedCloseFinished()));
+ connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed()));
+ connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished()));
- QByteArray spare = d->bs->read();
+ TQByteArray spare = d->bs->read();
d->ss = new SecureStream(d->bs);
- connect(d->ss, SIGNAL(readyRead()), SLOT(ss_readyRead()));
- connect(d->ss, SIGNAL(bytesWritten(int)), SLOT(ss_bytesWritten(int)));
- connect(d->ss, SIGNAL(tlsHandshaken()), SLOT(ss_tlsHandshaken()));
- connect(d->ss, SIGNAL(tlsClosed()), SLOT(ss_tlsClosed()));
- connect(d->ss, SIGNAL(error(int)), SLOT(ss_error(int)));
+ connect(d->ss, TQT_SIGNAL(readyRead()), TQT_SLOT(ss_readyRead()));
+ connect(d->ss, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(ss_bytesWritten(int)));
+ connect(d->ss, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(ss_tlsHandshaken()));
+ connect(d->ss, TQT_SIGNAL(tlsClosed()), TQT_SLOT(ss_tlsClosed()));
+ connect(d->ss, TQT_SIGNAL(error(int)), TQT_SLOT(ss_error(int)));
//d->client.startDialbackOut("andbit.net", "im.pyxa.org");
//d->client.startServerOut(d->server);
@@ -968,7 +968,7 @@ void ClientStream::cr_connected()
d->client.doTLS = d->tlsHandler ? true: false;
d->client.doBinding = d->doBinding;*/
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
connected();
if(!self)
return;
@@ -1008,10 +1008,10 @@ void ClientStream::bs_error(int)
void ClientStream::ss_readyRead()
{
- QByteArray a = d->ss->read();
+ TQByteArray a = d->ss->read();
#ifdef XMPP_DEBUG
- QCString cs(a.data(), a.size()+1);
+ TQCString cs(a.data(), a.size()+1);
fprintf(stderr, "ClientStream: recv: %d [%s]\n", a.size(), cs.data());
#endif
@@ -1044,7 +1044,7 @@ void ClientStream::ss_bytesWritten(int bytes)
void ClientStream::ss_tlsHandshaken()
{
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
securityLayerActivated(LayerTLS);
if(!self)
return;
@@ -1070,17 +1070,17 @@ void ClientStream::ss_error(int x)
}
}
-void ClientStream::sasl_clientFirstStep(const QString &mech, const QByteArray *stepData)
+void ClientStream::sasl_clientFirstStep(const TQString &mech, const TQByteArray *stepData)
{
- d->client.setSASLFirst(mech, stepData ? *stepData : QByteArray());
+ d->client.setSASLFirst(mech, stepData ? *stepData : TQByteArray());
//d->client.sasl_mech = mech;
//d->client.sasl_firstStep = stepData ? true : false;
- //d->client.sasl_step = stepData ? *stepData : QByteArray();
+ //d->client.sasl_step = stepData ? *stepData : TQByteArray();
processNext();
}
-void ClientStream::sasl_nextStep(const QByteArray &stepData)
+void ClientStream::sasl_nextStep(const TQByteArray &stepData)
{
if(d->mode == Client)
d->client.setSASLNext(stepData);
@@ -1109,12 +1109,12 @@ void ClientStream::sasl_needParams(bool user, bool authzid, bool pass, bool real
d->sasl->continueAfterParams();
}
-void ClientStream::sasl_authCheck(const QString &user, const QString &)
+void ClientStream::sasl_authCheck(const TQString &user, const TQString &)
{
//#ifdef XMPP_DEBUG
// printf("authcheck: [%s], [%s]\n", user.latin1(), authzid.latin1());
//#endif
- QString u = user;
+ TQString u = user;
int n = u.find('@');
if(n != -1)
u.truncate(n);
@@ -1163,10 +1163,10 @@ void ClientStream::srvProcessNext()
else if(need == CoreProtocol::NSASLMechs) {
if(!d->sasl) {
d->sasl = new QCA::SASL;
- connect(d->sasl, SIGNAL(authCheck(const QString &, const QString &)), SLOT(sasl_authCheck(const QString &, const QString &)));
- connect(d->sasl, SIGNAL(nextStep(const QByteArray &)), SLOT(sasl_nextStep(const QByteArray &)));
- connect(d->sasl, SIGNAL(authenticated()), SLOT(sasl_authenticated()));
- connect(d->sasl, SIGNAL(error(int)), SLOT(sasl_error(int)));
+ connect(d->sasl, TQT_SIGNAL(authCheck(const TQString &, const TQString &)), TQT_SLOT(sasl_authCheck(const TQString &, const TQString &)));
+ connect(d->sasl, TQT_SIGNAL(nextStep(const TQByteArray &)), TQT_SLOT(sasl_nextStep(const TQByteArray &)));
+ connect(d->sasl, TQT_SIGNAL(authenticated()), TQT_SLOT(sasl_authenticated()));
+ connect(d->sasl, TQT_SIGNAL(error(int)), TQT_SLOT(sasl_error(int)));
//d->sasl->setAllowAnonymous(false);
//d->sasl->setRequirePassCredentials(true);
@@ -1175,7 +1175,7 @@ void ClientStream::srvProcessNext()
d->sasl->setMinimumSSF(0);
d->sasl->setMaximumSSF(256);
- QStringList list;
+ TQStringList list;
// TODO: d->server is probably wrong here
if(!d->sasl->startServer("xmpp", d->server, d->defRealm, &list)) {
printf("Error initializing SASL\n");
@@ -1193,18 +1193,18 @@ void ClientStream::srvProcessNext()
// TODO
return;
}
- QByteArray a = d->srv.spare;
+ TQByteArray a = d->srv.spare;
d->ss->startTLSServer(d->tls, a);
}
else if(need == CoreProtocol::NSASLFirst) {
printf("Need SASL First Step\n");
- QByteArray a = d->srv.saslStep();
+ TQByteArray a = d->srv.saslStep();
d->sasl->putServerFirstStep(d->srv.saslMech(), a);
}
else if(need == CoreProtocol::NSASLNext) {
printf("Need SASL Next Step\n");
- QByteArray a = d->srv.saslStep();
- QCString cs(a.data(), a.size()+1);
+ TQByteArray a = d->srv.saslStep();
+ TQCString cs(a.data(), a.size()+1);
printf("[%s]\n", cs.data());
d->sasl->putStep(a);
}
@@ -1230,8 +1230,8 @@ void ClientStream::srvProcessNext()
return;
}
case CoreProtocol::ESend: {
- QByteArray a = d->srv.takeOutgoingData();
- QCString cs(a.size()+1);
+ TQByteArray a = d->srv.takeOutgoingData();
+ TQCString cs(a.size()+1);
memcpy(cs.data(), a.data(), a.size());
printf("Need Send: {%s}\n", cs.data());
d->ss->write(a);
@@ -1241,7 +1241,7 @@ void ClientStream::srvProcessNext()
printf("Break (RecvOpen)\n");
// calculate key
- QCString str = QCA::SHA1::hashToString("secret").utf8();
+ TQCString str = QCA::SHA1::hashToString("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);
@@ -1258,8 +1258,8 @@ void ClientStream::srvProcessNext()
}
case CoreProtocol::ESASLSuccess: {
printf("Break SASL Success\n");
- disconnect(d->sasl, SIGNAL(error(int)), this, SLOT(sasl_error(int)));
- QByteArray a = d->srv.spare;
+ disconnect(d->sasl, TQT_SIGNAL(error(int)), this, TQT_SLOT(sasl_error(int)));
+ TQByteArray a = d->srv.spare;
d->ss->setLayerSASL(d->sasl, a);
break;
}
@@ -1276,7 +1276,7 @@ void ClientStream::srvProcessNext()
void ClientStream::doReadyRead()
{
- //QGuardedPtr<QObject> self = this;
+ //TQGuardedPtr<TQObject> self = this;
readyRead();
//if(!self)
// return;
@@ -1290,7 +1290,7 @@ void ClientStream::processNext()
return;
}
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
while(1) {
#ifdef XMPP_DEBUG
@@ -1298,11 +1298,11 @@ void ClientStream::processNext()
#endif
bool ok = d->client.processStep();
// deal with send/received items
- for(QValueList<XmlProtocol::TransferItem>::ConstIterator it = d->client.transferItemList.begin(); it != d->client.transferItemList.end(); ++it) {
+ for(TQValueList<XmlProtocol::TransferItem>::ConstIterator it = d->client.transferItemList.begin(); it != d->client.transferItemList.end(); ++it) {
const XmlProtocol::TransferItem &i = *it;
if(i.isExternal)
continue;
- QString str;
+ TQString str;
if(i.isString) {
// skip whitespace pings
if(i.str.stripWhiteSpace().isEmpty())
@@ -1324,7 +1324,7 @@ void ClientStream::processNext()
//if(!d->in_rrsig && !d->in.isEmpty()) {
if(!d->in.isEmpty()) {
//d->in_rrsig = true;
- QTimer::singleShot(0, this, SLOT(doReadyRead()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doReadyRead()));
}
if(cont)
@@ -1343,9 +1343,9 @@ void ClientStream::processNext()
return;
}
case CoreProtocol::ESend: {
- QByteArray a = d->client.takeOutgoingData();
+ TQByteArray a = d->client.takeOutgoingData();
#ifdef XMPP_DEBUG
- QCString cs(a.size()+1);
+ TQCString cs(a.size()+1);
memcpy(cs.data(), a.data(), a.size());
printf("Need Send: {%s}\n", cs.data());
#endif
@@ -1358,9 +1358,9 @@ void ClientStream::processNext()
#endif
#ifdef XMPP_TEST
- QString s = QString("handshake success (lang=[%1]").arg(d->client.lang);
+ TQString s = TQString("handshake success (lang=[%1]").arg(d->client.lang);
if(!d->client.from.isEmpty())
- s += QString(", from=[%1]").arg(d->client.from);
+ s += TQString(", from=[%1]").arg(d->client.from);
s += ')';
TD::msg(s);
#endif
@@ -1480,11 +1480,11 @@ bool ClientStream::handleNeed()
}
d->sasl = new QCA::SASL;
- connect(d->sasl, SIGNAL(clientFirstStep(const QString &, const QByteArray *)), SLOT(sasl_clientFirstStep(const QString &, const QByteArray *)));
- connect(d->sasl, SIGNAL(nextStep(const QByteArray &)), SLOT(sasl_nextStep(const QByteArray &)));
- connect(d->sasl, SIGNAL(needParams(bool, bool, bool, bool)), SLOT(sasl_needParams(bool, bool, bool, bool)));
- connect(d->sasl, SIGNAL(authenticated()), SLOT(sasl_authenticated()));
- connect(d->sasl, SIGNAL(error(int)), SLOT(sasl_error(int)));
+ connect(d->sasl, TQT_SIGNAL(clientFirstStep(const TQString &, const TQByteArray *)), TQT_SLOT(sasl_clientFirstStep(const TQString &, const TQByteArray *)));
+ connect(d->sasl, TQT_SIGNAL(nextStep(const TQByteArray &)), TQT_SLOT(sasl_nextStep(const TQByteArray &)));
+ connect(d->sasl, TQT_SIGNAL(needParams(bool, bool, bool, bool)), TQT_SLOT(sasl_needParams(bool, bool, bool, bool)));
+ connect(d->sasl, TQT_SIGNAL(authenticated()), TQT_SLOT(sasl_authenticated()));
+ connect(d->sasl, TQT_SIGNAL(error(int)), TQT_SLOT(sasl_error(int)));
if(d->haveLocalAddr)
d->sasl->setLocalAddr(d->localAddr, d->localPort);
@@ -1506,7 +1506,7 @@ bool ClientStream::handleNeed()
d->sasl->setMinimumSSF(d->minimumSSF);
d->sasl->setMaximumSSF(d->maximumSSF);
- QStringList ml;
+ TQStringList ml;
if(!d->sasl_mech.isEmpty())
ml += d->sasl_mech;
else
@@ -1525,16 +1525,16 @@ bool ClientStream::handleNeed()
#ifdef XMPP_DEBUG
printf("Need SASL Next Step\n");
#endif
- QByteArray a = d->client.saslStep();
+ TQByteArray a = d->client.saslStep();
d->sasl->putStep(a);
return false;
}
case CoreProtocol::NSASLLayer: {
// SecureStream will handle the errors from this point
- disconnect(d->sasl, SIGNAL(error(int)), this, SLOT(sasl_error(int)));
+ disconnect(d->sasl, TQT_SIGNAL(error(int)), this, TQT_SLOT(sasl_error(int)));
d->ss->setLayerSASL(d->sasl, d->client.spare);
if(d->sasl_ssf > 0) {
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
securityLayerActivated(LayerSASL);
if(!self)
return false;
@@ -1580,7 +1580,7 @@ void ClientStream::doNoop()
}
}
-void ClientStream::writeDirect(const QString &s)
+void ClientStream::writeDirect(const TQString &s)
{
if(d->state == Active) {
#ifdef XMPP_DEBUG
@@ -1604,8 +1604,8 @@ void ClientStream::handleError()
}
else if(c == CoreProtocol::ErrStream) {
int x = d->client.errCond;
- QString text = d->client.errText;
- QDomElement appSpec = d->client.errAppSpec;
+ TQString text = d->client.errText;
+ TQDomElement appSpec = d->client.errAppSpec;
int connErr = -1;
int strErr = -1;
@@ -1730,31 +1730,31 @@ TD::~TD()
{
}
-void TD::msg(const QString &s)
+void TD::msg(const TQString &s)
{
if(debug_ptr)
debug_ptr->msg(s);
}
-void TD::outgoingTag(const QString &s)
+void TD::outgoingTag(const TQString &s)
{
if(debug_ptr)
debug_ptr->outgoingTag(s);
}
-void TD::incomingTag(const QString &s)
+void TD::incomingTag(const TQString &s)
{
if(debug_ptr)
debug_ptr->incomingTag(s);
}
-void TD::outgoingXml(const QDomElement &e)
+void TD::outgoingXml(const TQDomElement &e)
{
if(debug_ptr)
debug_ptr->outgoingXml(e);
}
-void TD::incomingXml(const QDomElement &e)
+void TD::incomingXml(const TQDomElement &e)
{
if(debug_ptr)
debug_ptr->incomingXml(e);
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/td.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/td.h
index b636e190..f4d560f4 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/td.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/td.h
@@ -1,7 +1,7 @@
#ifndef TESTDEBUG_H
#define TESTDEBUG_H
-#include<qdom.h>
+#include<tqdom.h>
class TD
{
@@ -9,11 +9,11 @@ public:
TD();
~TD();
- static void msg(const QString &);
- static void outgoingTag(const QString &);
- static void incomingTag(const QString &);
- static void outgoingXml(const QDomElement &);
- static void incomingXml(const QDomElement &);
+ static void msg(const TQString &);
+ static void outgoingTag(const TQString &);
+ static void incomingTag(const TQString &);
+ static void outgoingXml(const TQDomElement &);
+ static void incomingXml(const TQDomElement &);
};
#endif
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp
index 24d77598..313c6b6a 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp
@@ -20,7 +20,7 @@
#include"xmpp.h"
-#include<qtimer.h>
+#include<tqtimer.h>
#include"qca.h"
using namespace XMPP;
@@ -28,8 +28,8 @@ using namespace XMPP;
//----------------------------------------------------------------------------
// TLSHandler
//----------------------------------------------------------------------------
-TLSHandler::TLSHandler(QObject *parent)
-:QObject(parent)
+TLSHandler::TLSHandler(TQObject *parent)
+:TQObject(parent)
{
}
@@ -53,11 +53,11 @@ QCATLSHandler::QCATLSHandler(QCA::TLS *parent)
{
d = new Private;
d->tls = parent;
- connect(d->tls, SIGNAL(handshaken()), SLOT(tls_handshaken()));
- connect(d->tls, SIGNAL(readyRead()), SLOT(tls_readyRead()));
- connect(d->tls, SIGNAL(readyReadOutgoing(int)), SLOT(tls_readyReadOutgoing(int)));
- connect(d->tls, SIGNAL(closed()), SLOT(tls_closed()));
- connect(d->tls, SIGNAL(error(int)), SLOT(tls_error(int)));
+ 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)));
+ connect(d->tls, TQT_SIGNAL(closed()), TQT_SLOT(tls_closed()));
+ connect(d->tls, TQT_SIGNAL(error(int)), TQT_SLOT(tls_error(int)));
d->state = 0;
d->err = -1;
}
@@ -83,20 +83,20 @@ void QCATLSHandler::reset()
d->state = 0;
}
-void QCATLSHandler::startClient(const QString &host)
+void QCATLSHandler::startClient(const TQString &host)
{
d->state = 0;
d->err = -1;
if(!d->tls->startClient(host))
- QTimer::singleShot(0, this, SIGNAL(fail()));
+ TQTimer::singleShot(0, this, TQT_SIGNAL(fail()));
}
-void QCATLSHandler::write(const QByteArray &a)
+void QCATLSHandler::write(const TQByteArray &a)
{
d->tls->write(a);
}
-void QCATLSHandler::writeIncoming(const QByteArray &a)
+void QCATLSHandler::writeIncoming(const TQByteArray &a)
{
d->tls->writeIncoming(a);
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp
index 0ae15585..de321e7c 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp
@@ -30,10 +30,10 @@ using namespace XMPP;
// display purposes only (the element is pretty much useless for processing
// after this). We do this because QXml is a bit overzealous about outputting
// redundant namespaces.
-static QDomElement stripExtraNS(const QDomElement &e)
+static TQDomElement stripExtraNS(const TQDomElement &e)
{
// find closest parent with a namespace
- QDomNode par = e.parentNode();
+ TQDomNode par = e.parentNode();
while(!par.isNull() && par.namespaceURI().isNull())
par = par.parentNode();
bool noShowNS = false;
@@ -41,13 +41,13 @@ static QDomElement stripExtraNS(const QDomElement &e)
noShowNS = true;
// build qName (prefix:localName)
- QString qName;
+ TQString qName;
if(!e.prefix().isEmpty())
qName = e.prefix() + ':' + e.localName();
else
qName = e.tagName();
- QDomElement i;
+ TQDomElement i;
uint x;
if(noShowNS)
i = e.ownerDocument().createElement(qName);
@@ -55,21 +55,21 @@ static QDomElement stripExtraNS(const QDomElement &e)
i = e.ownerDocument().createElementNS(e.namespaceURI(), qName);
// copy attributes
- QDomNamedNodeMap al = e.attributes();
+ TQDomNamedNodeMap al = e.attributes();
for(x = 0; x < al.count(); ++x) {
- QDomAttr a = al.item(x).cloneNode().toAttr();
+ TQDomAttr a = al.item(x).cloneNode().toAttr();
// don't show xml namespace
if(a.namespaceURI() == NS_XML)
- i.setAttribute(QString("xml:") + a.name(), a.value());
+ i.setAttribute(TQString("xml:") + a.name(), a.value());
else
i.setAttributeNodeNS(a);
}
// copy children
- QDomNodeList nl = e.childNodes();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x) {
- QDomNode n = nl.item(x);
+ TQDomNode n = nl.item(x);
if(n.isElement())
i.appendChild(stripExtraNS(n.toElement()));
else
@@ -80,20 +80,20 @@ static QDomElement stripExtraNS(const QDomElement &e)
// xmlToString
//
-// This function converts a QDomElement into a QString, using stripExtraNS
+// This function converts a TQDomElement into a TQString, using stripExtraNS
// to make it pretty.
-static QString xmlToString(const QDomElement &e, const QString &fakeNS, const QString &fakeQName, bool clip)
+static TQString xmlToString(const TQDomElement &e, const TQString &fakeNS, const TQString &fakeQName, bool clip)
{
- QDomElement i = e.cloneNode().toElement();
+ TQDomElement i = e.cloneNode().toElement();
// It seems QDom 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.
- QDomElement fake = e.ownerDocument().createElementNS(fakeNS, fakeQName);
+ TQDomElement fake = e.ownerDocument().createElementNS(fakeNS, fakeQName);
fake.appendChild(i);
fake = stripExtraNS(fake);
- QString out;
+ TQString out;
{
- QTextStream ts(&out, IO_WriteOnly);
+ TQTextStream ts(&out, IO_WriteOnly);
fake.firstChild().save(ts, 0);
}
// 'clip' means to remove any unwanted (and unneeded) characters, such as a trailing newline
@@ -112,18 +112,18 @@ static QString xmlToString(const QDomElement &e, const QString &fakeNS, const QS
// text needed to open/close an XML stream, without resorting to generating
// the XML ourselves. This function uses QDom to do the generation, which
// ensures proper encoding and entity output.
-static void createRootXmlTags(const QDomElement &root, QString *xmlHeader, QString *tagOpen, QString *tagClose)
+static void createRootXmlTags(const TQDomElement &root, TQString *xmlHeader, TQString *tagOpen, TQString *tagClose)
{
- QDomElement e = root.cloneNode(false).toElement();
+ TQDomElement e = root.cloneNode(false).toElement();
// insert a dummy element to ensure open and closing tags are generated
- QDomElement dummy = e.ownerDocument().createElement("dummy");
+ TQDomElement dummy = e.ownerDocument().createElement("dummy");
e.appendChild(dummy);
// convert to xml->text
- QString str;
+ TQString str;
{
- QTextStream ts(&str, IO_WriteOnly);
+ TQTextStream ts(&str, IO_WriteOnly);
e.save(ts, 0);
}
@@ -148,7 +148,7 @@ XmlProtocol::TransferItem::TransferItem()
{
}
-XmlProtocol::TransferItem::TransferItem(const QString &_str, bool sent, bool external)
+XmlProtocol::TransferItem::TransferItem(const TQString &_str, bool sent, bool external)
{
isString = true;
isSent = sent;
@@ -156,7 +156,7 @@ XmlProtocol::TransferItem::TransferItem(const QString &_str, bool sent, bool ext
str = _str;
}
-XmlProtocol::TransferItem::TransferItem(const QDomElement &_elem, bool sent, bool external)
+XmlProtocol::TransferItem::TransferItem(const TQDomElement &_elem, bool sent, bool external)
{
isString = false;
isSent = sent;
@@ -184,30 +184,30 @@ void XmlProtocol::reset()
{
init();
- elem = QDomElement();
- tagOpen = QString();
- tagClose = QString();
+ elem = TQDomElement();
+ tagOpen = TQString();
+ tagClose = TQString();
xml.reset();
outData.resize(0);
trackQueue.clear();
transferItemList.clear();
}
-void XmlProtocol::addIncomingData(const QByteArray &a)
+void XmlProtocol::addIncomingData(const TQByteArray &a)
{
xml.appendData(a);
}
-QByteArray XmlProtocol::takeOutgoingData()
+TQByteArray XmlProtocol::takeOutgoingData()
{
- QByteArray a = outData.copy();
+ TQByteArray a = outData.copy();
outData.resize(0);
return a;
}
void XmlProtocol::outgoingDataWritten(int bytes)
{
- for(QValueList<TrackItem>::Iterator it = trackQueue.begin(); it != trackQueue.end();) {
+ for(TQValueList<TrackItem>::Iterator it = trackQueue.begin(); it != trackQueue.end();) {
TrackItem &i = *it;
// enough bytes?
@@ -302,21 +302,21 @@ bool XmlProtocol::processStep()
return baseStep(pe);
}
-QString XmlProtocol::xmlEncoding() const
+TQString XmlProtocol::xmlEncoding() const
{
return xml.encoding();
}
-QString XmlProtocol::elementToString(const QDomElement &e, bool clip)
+TQString XmlProtocol::elementToString(const TQDomElement &e, bool clip)
{
if(elem.isNull())
elem = elemDoc.importNode(docElement(), true).toElement();
// Determine the appropriate 'fakeNS' to use
- QString ns;
+ TQString ns;
// first, check root namespace
- QString pre = e.prefix();
+ TQString pre = e.prefix();
if(pre.isNull())
pre = "";
if(pre == elem.prefix()) {
@@ -324,11 +324,11 @@ QString XmlProtocol::elementToString(const QDomElement &e, bool clip)
}
else {
// scan the root attributes for 'xmlns' (oh joyous hacks)
- QDomNamedNodeMap al = elem.attributes();
+ TQDomNamedNodeMap al = elem.attributes();
uint n;
for(n = 0; n < al.count(); ++n) {
- QDomAttr a = al.item(n).toAttr();
- QString s = a.name();
+ TQDomAttr a = al.item(n).toAttr();
+ TQString s = a.name();
int x = s.find(':');
if(x != -1)
s = s.mid(x+1);
@@ -346,7 +346,7 @@ QString XmlProtocol::elementToString(const QDomElement &e, bool clip)
}
// build qName
- QString qn;
+ TQString qn;
if(!elem.prefix().isEmpty())
qn = elem.prefix() + ':';
qn += elem.localName();
@@ -366,22 +366,22 @@ void XmlProtocol::itemWritten(int, int)
// default does nothing
}
-void XmlProtocol::stringSend(const QString &)
+void XmlProtocol::stringSend(const TQString &)
{
// default does nothing
}
-void XmlProtocol::stringRecv(const QString &)
+void XmlProtocol::stringRecv(const TQString &)
{
// default does nothing
}
-void XmlProtocol::elementSend(const QDomElement &)
+void XmlProtocol::elementSend(const TQDomElement &)
{
// default does nothing
}
-void XmlProtocol::elementRecv(const QDomElement &)
+void XmlProtocol::elementRecv(const TQDomElement &)
{
// default does nothing
}
@@ -406,24 +406,24 @@ bool XmlProtocol::close()
return true;
}
-int XmlProtocol::writeString(const QString &s, int id, bool external)
+int XmlProtocol::writeString(const TQString &s, int id, bool external)
{
transferItemList += TransferItem(s, true, external);
return internalWriteString(s, TrackItem::Custom, id);
}
-int XmlProtocol::writeElement(const QDomElement &e, int id, bool external, bool clip)
+int XmlProtocol::writeElement(const TQDomElement &e, int id, bool external, bool clip)
{
if(e.isNull())
return 0;
transferItemList += TransferItem(e, true, external);
//elementSend(e);
- QString out = elementToString(e, clip);
+ TQString out = elementToString(e, clip);
return internalWriteString(out, TrackItem::Custom, id);
}
-QByteArray XmlProtocol::resetStream()
+TQByteArray XmlProtocol::resetStream()
{
// reset the state
if(incoming)
@@ -432,12 +432,12 @@ QByteArray XmlProtocol::resetStream()
state = SendOpen;
// grab unprocessed data before resetting
- QByteArray spare = xml.unprocessed();
+ TQByteArray spare = xml.unprocessed();
xml.reset();
return spare;
}
-int XmlProtocol::internalWriteData(const QByteArray &a, TrackItem::Type t, int id)
+int XmlProtocol::internalWriteData(const TQByteArray &a, TrackItem::Type t, int id)
{
TrackItem i;
i.type = t;
@@ -449,10 +449,10 @@ int XmlProtocol::internalWriteData(const QByteArray &a, TrackItem::Type t, int i
return a.size();
}
-int XmlProtocol::internalWriteString(const QString &s, TrackItem::Type t, int id)
+int XmlProtocol::internalWriteString(const TQString &s, TrackItem::Type t, int id)
{
- QCString cs = s.utf8();
- QByteArray a(cs.length());
+ TQCString cs = s.utf8();
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return internalWriteData(a, t, id);
}
@@ -462,10 +462,10 @@ void XmlProtocol::sendTagOpen()
if(elem.isNull())
elem = elemDoc.importNode(docElement(), true).toElement();
- QString xmlHeader;
+ TQString xmlHeader;
createRootXmlTags(elem, &xmlHeader, &tagOpen, &tagClose);
- QString s;
+ TQString s;
s += xmlHeader + '\n';
s += tagOpen + '\n';
@@ -509,7 +509,7 @@ bool XmlProtocol::baseStep(const Parser::Event &pe)
return true;
}
else if(state == Open) {
- QDomElement e;
+ TQDomElement e;
if(pe.type() == Parser::Event::Element)
e = pe.element();
return doStep(e);
@@ -533,7 +533,7 @@ bool XmlProtocol::baseStep(const Parser::Event &pe)
void XmlProtocol::setIncomingAsExternal()
{
- for(QValueList<TransferItem>::Iterator it = transferItemList.begin(); it != transferItemList.end(); ++it) {
+ for(TQValueList<TransferItem>::Iterator it = transferItemList.begin(); it != transferItemList.end(); ++it) {
TransferItem &i = *it;
// look for elements received
if(!i.isString && !i.isSent)
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h
index 16ff8e01..e3da8a09 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h
@@ -21,8 +21,8 @@
#ifndef XMLPROTOCOL_H
#define XMLPROTOCOL_H
-#include<qdom.h>
-#include<qvaluelist.h>
+#include<tqdom.h>
+#include<tqvaluelist.h>
#include"parser.h"
#define NS_XML "http://www.w3.org/XML/1998/namespace"
@@ -59,8 +59,8 @@ namespace XMPP
virtual void reset();
// byte I/O for the stream
- void addIncomingData(const QByteArray &);
- QByteArray takeOutgoingData();
+ void addIncomingData(const TQByteArray &);
+ TQByteArray takeOutgoingData();
void outgoingDataWritten(int);
// advance the state machine
@@ -70,47 +70,47 @@ namespace XMPP
int need, event, errorCode, notify;
inline bool isIncoming() const { return incoming; }
- QString xmlEncoding() const;
- QString elementToString(const QDomElement &e, bool clip=false);
+ TQString xmlEncoding() const;
+ TQString elementToString(const TQDomElement &e, bool clip=false);
class TransferItem
{
public:
TransferItem();
- TransferItem(const QString &str, bool sent, bool external=false);
- TransferItem(const QDomElement &elem, bool sent, bool external=false);
+ TransferItem(const TQString &str, bool sent, bool external=false);
+ TransferItem(const TQDomElement &elem, bool sent, bool external=false);
bool isSent; // else, received
bool isString; // else, is element
bool isExternal; // not owned by protocol
- QString str;
- QDomElement elem;
+ TQString str;
+ TQDomElement elem;
};
- QValueList<TransferItem> transferItemList;
+ TQValueList<TransferItem> transferItemList;
void setIncomingAsExternal();
protected:
- virtual QDomElement docElement()=0;
+ virtual TQDomElement docElement()=0;
virtual void handleDocOpen(const Parser::Event &pe)=0;
virtual bool handleError()=0;
virtual bool handleCloseFinished()=0;
virtual bool stepAdvancesParser() const=0;
virtual bool stepRequiresElement() const;
- virtual bool doStep(const QDomElement &e)=0;
+ virtual bool doStep(const TQDomElement &e)=0;
virtual void itemWritten(int id, int size);
// 'debug'
- virtual void stringSend(const QString &s);
- virtual void stringRecv(const QString &s);
- virtual void elementSend(const QDomElement &e);
- virtual void elementRecv(const QDomElement &e);
+ virtual void stringSend(const TQString &s);
+ virtual void stringRecv(const TQString &s);
+ virtual void elementSend(const TQDomElement &e);
+ virtual void elementRecv(const TQDomElement &e);
void startConnect();
void startAccept();
bool close();
- int writeString(const QString &s, int id, bool external);
- int writeElement(const QDomElement &e, int id, bool external, bool clip=false);
- QByteArray resetStream();
+ int writeString(const TQString &s, int id, bool external);
+ int writeElement(const TQDomElement &e, int id, bool external, bool clip=false);
+ TQByteArray resetStream();
private:
enum { SendOpen, RecvOpen, Open, Closing };
@@ -122,20 +122,20 @@ namespace XMPP
};
bool incoming;
- QDomDocument elemDoc;
- QDomElement elem;
- QString tagOpen, tagClose;
+ TQDomDocument elemDoc;
+ TQDomElement elem;
+ TQString tagOpen, tagClose;
int state;
bool peerClosed;
bool closeWritten;
Parser xml;
- QByteArray outData;
- QValueList<TrackItem> trackQueue;
+ TQByteArray outData;
+ TQValueList<TrackItem> trackQueue;
void init();
- int internalWriteData(const QByteArray &a, TrackItem::Type t, int id=-1);
- int internalWriteString(const QString &s, TrackItem::Type t, int id=-1);
+ int internalWriteData(const TQByteArray &a, TrackItem::Type t, int id=-1);
+ int internalWriteString(const TQString &s, TrackItem::Type t, int id=-1);
void sendTagOpen();
void sendTagClose();
bool baseStep(const Parser::Event &pe);
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp
index a5affaa0..c78875bc 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp
@@ -36,7 +36,7 @@
//!
//! 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
-//! facilities (QObject::sender(), QObject::isA(), etc), you can use a
+//! facilities (TQObject::sender(), TQObject::isA(), etc), you can use a
//! "fire and forget" approach with Tasks.
//!
//! \code
@@ -50,8 +50,8 @@
//! Session::Session()
//! {
//! client = new Client;
-//! connect(client, SIGNAL(handshaken()), SLOT(clientHandshaken()));
-//! connect(client, SIGNAL(authFinished(bool, int, const QString &)), SLOT(authFinished(bool, int, const QString &)));
+//! connect(client, TQT_SIGNAL(handshaken()), TQT_SLOT(clientHandshaken()));
+//! connect(client, TQT_SIGNAL(authFinished(bool, int, const TQString &)), TQT_SLOT(authFinished(bool, int, const TQString &)));
//! client->connectToHost("jabber.org");
//! }
//!
@@ -60,7 +60,7 @@
//! client->authDigest("jabtest", "12345", "Psi");
//! }
//!
-//! void Session::authFinished(bool success, int, const QString &err)
+//! void Session::authFinished(bool success, int, const TQString &err)
//! {
//! if(success)
//! printf("Login success!");
@@ -70,10 +70,10 @@
//! \endcode
#include<stdarg.h>
-#include<qmap.h>
-#include<qobjectlist.h>
-#include<qtimer.h>
-#include<qguardedptr.h>
+#include<tqmap.h>
+#include<tqobjectlist.h>
+#include<tqtimer.h>
+#include<tqguardedptr.h>
#include"xmpp_tasks.h"
#include"xmpp_xmlcommon.h"
#include"s5b.h"
@@ -83,10 +83,10 @@
/*#include<stdio.h>
#include<stdarg.h>
-#include<qstring.h>
-#include<qdom.h>
-#include<qobjectlist.h>
-#include<qtimer.h>
+#include<tqstring.h>
+#include<tqdom.h>
+#include<tqobjectlist.h>
+#include<tqtimer.h>
#include"xmpp_stream.h"
#include"xmpp_tasks.h"
#include"xmpp_xmlcommon.h"
@@ -122,13 +122,13 @@ public:
ClientPrivate() {}
ClientStream *stream;
- QDomDocument doc;
+ TQDomDocument doc;
int id_seed;
Task *root;
- QString host, user, pass, resource;
- QString osname, tzname, clientName, clientVersion, capsNode, capsVersion, capsExt;
+ TQString host, user, pass, resource;
+ TQString osname, tzname, clientName, clientVersion, capsNode, capsVersion, capsExt;
DiscoItem::Identity identity;
- QMap<QString,Features> extension_features;
+ TQMap<TQString,Features> extension_features;
int tzoffset;
bool active;
@@ -139,12 +139,12 @@ public:
JidLinkManager *jlman;
FileTransferManager *ftman;
bool ftEnabled;
- QValueList<GroupChat> groupChatList;
+ TQValueList<GroupChat> groupChatList;
};
-Client::Client(QObject *par)
-:QObject(par)
+Client::Client(TQObject *par)
+:TQObject(par)
{
d = new ClientPrivate;
d->tzoffset = 0;
@@ -162,10 +162,10 @@ Client::Client(QObject *par)
d->stream = 0;
d->s5bman = new S5BManager(this);
- connect(d->s5bman, SIGNAL(incomingReady()), SLOT(s5b_incomingReady()));
+ connect(d->s5bman, TQT_SIGNAL(incomingReady()), TQT_SLOT(s5b_incomingReady()));
d->ibbman = new IBBManager(this);
- connect(d->ibbman, SIGNAL(incomingReady()), SLOT(ibb_incomingReady()));
+ connect(d->ibbman, TQT_SIGNAL(incomingReady()), TQT_SLOT(ibb_incomingReady()));
d->jlman = new JidLinkManager(this);
@@ -188,19 +188,19 @@ Client::~Client()
void Client::connectToServer(ClientStream *s, const Jid &j, bool auth)
{
d->stream = s;
- //connect(d->stream, SIGNAL(connected()), SLOT(streamConnected()));
- //connect(d->stream, SIGNAL(handshaken()), SLOT(streamHandshaken()));
- connect(d->stream, SIGNAL(error(int)), SLOT(streamError(int)));
- //connect(d->stream, SIGNAL(sslCertificateReady(const QSSLCert &)), SLOT(streamSSLCertificateReady(const QSSLCert &)));
- connect(d->stream, SIGNAL(readyRead()), SLOT(streamReadyRead()));
- //connect(d->stream, SIGNAL(closeFinished()), SLOT(streamCloseFinished()));
- connect(d->stream, SIGNAL(incomingXml(const QString &)), SLOT(streamIncomingXml(const QString &)));
- connect(d->stream, SIGNAL(outgoingXml(const QString &)), SLOT(streamOutgoingXml(const QString &)));
+ //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(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 &)));
+ connect(d->stream, TQT_SIGNAL(outgoingXml(const TQString &)), TQT_SLOT(streamOutgoingXml(const TQString &)));
d->stream->connectToServer(j, auth);
}
-void Client::start(const QString &host, const QString &user, const QString &pass, const QString &_resource)
+void Client::start(const TQString &host, const TQString &user, const TQString &pass, const TQString &_resource)
{
// TODO
d->host = host;
@@ -213,14 +213,14 @@ void Client::start(const QString &host, const QString &user, const QString &pass
d->resourceList += Resource(resource(), stat);
JT_PushPresence *pp = new JT_PushPresence(rootTask());
- connect(pp, SIGNAL(subscription(const Jid &, const QString &)), SLOT(ppSubscription(const Jid &, const QString &)));
- connect(pp, SIGNAL(presence(const Jid &, const Status &)), SLOT(ppPresence(const Jid &, const Status &)));
+ 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 &)));
JT_PushMessage *pm = new JT_PushMessage(rootTask());
- connect(pm, SIGNAL(message(const Message &)), SLOT(pmMessage(const Message &)));
+ connect(pm, TQT_SIGNAL(message(const Message &)), TQT_SLOT(pmMessage(const Message &)));
JT_PushRoster *pr = new JT_PushRoster(rootTask());
- connect(pr, SIGNAL(roster(const Roster &)), SLOT(prRoster(const Roster &)));
+ connect(pr, TQT_SIGNAL(roster(const Roster &)), TQT_SLOT(prRoster(const Roster &)));
new JT_ServInfo(rootTask());
@@ -266,10 +266,10 @@ bool Client::isActive() const
return d->active;
}
-void Client::groupChatChangeNick(const QString &host, const QString &room, const QString &nick, const Status &_s)
+void Client::groupChatChangeNick(const TQString &host, const TQString &room, const TQString &nick, const Status &_s)
{
Jid jid(room + "@" + host + "/" + nick);
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
GroupChat &i = *it;
if(i.j.compare(jid, false)) {
i.j = jid;
@@ -286,10 +286,10 @@ void Client::groupChatChangeNick(const QString &host, const QString &room, const
}
}
-bool Client::groupChatJoin(const QString &host, const QString &room, const QString &nick)
+bool Client::groupChatJoin(const TQString &host, const TQString &room, const TQString &nick)
{
Jid jid(room + "@" + host + "/" + nick);
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end();) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end();) {
GroupChat &i = *it;
if(i.j.compare(jid, false)) {
// if this room is shutting down, then free it up
@@ -302,7 +302,7 @@ bool Client::groupChatJoin(const QString &host, const QString &room, const QStri
++it;
}
- debug(QString("Client: Joined: [%1]\n").arg(jid.full()));
+ debug(TQString("Client: Joined: [%1]\n").arg(jid.full()));
GroupChat i;
i.j = jid;
i.status = GroupChat::Connecting;
@@ -315,10 +315,10 @@ bool Client::groupChatJoin(const QString &host, const QString &room, const QStri
return true;
}
-bool Client::groupChatJoin(const QString &host, const QString &room, const QString &nick, const QString &password)
+bool Client::groupChatJoin(const TQString &host, const TQString &room, const TQString &nick, const TQString &password)
{
Jid jid(room + "@" + host + "/" + nick);
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end();) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end();) {
GroupChat &i = *it;
if(i.j.compare(jid, false)) {
// if this room is shutting down, then free it up
@@ -331,7 +331,7 @@ bool Client::groupChatJoin(const QString &host, const QString &room, const QStri
++it;
}
- debug(QString("Client: Joined: [%1]\n").arg(jid.full()));
+ debug(TQString("Client: Joined: [%1]\n").arg(jid.full()));
GroupChat i;
i.j = jid;
i.status = GroupChat::Connecting;
@@ -344,11 +344,11 @@ bool Client::groupChatJoin(const QString &host, const QString &room, const QStri
return true;
}
-void Client::groupChatSetStatus(const QString &host, const QString &room, const Status &_s)
+void Client::groupChatSetStatus(const TQString &host, const TQString &room, const Status &_s)
{
Jid jid(room + "@" + host);
bool found = false;
- for(QValueList<GroupChat>::ConstIterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
+ for(TQValueList<GroupChat>::ConstIterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
const GroupChat &i = *it;
if(i.j.compare(jid, false)) {
found = true;
@@ -367,17 +367,17 @@ void Client::groupChatSetStatus(const QString &host, const QString &room, const
j->go(true);
}
-void Client::groupChatLeave(const QString &host, const QString &room)
+void Client::groupChatLeave(const TQString &host, const TQString &room)
{
Jid jid(room + "@" + host);
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
GroupChat &i = *it;
if(!i.j.compare(jid, false))
continue;
i.status = GroupChat::Closing;
- debug(QString("Client: Leaving: [%1]\n").arg(i.j.full()));
+ debug(TQString("Client: Leaving: [%1]\n").arg(i.j.full()));
JT_Presence *j = new JT_Presence(rootTask());
Status s;
@@ -404,7 +404,7 @@ void Client::close(bool)
{
if(d->stream) {
if(d->active) {
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
GroupChat &i = *it;
i.status = GroupChat::Closing;
@@ -467,17 +467,17 @@ void Client::streamCloseFinished()
closeFinished();
}*/
-static QDomElement oldStyleNS(const QDomElement &e)
+static TQDomElement oldStyleNS(const TQDomElement &e)
{
// find closest parent with a namespace
- QDomNode par = e.parentNode();
+ TQDomNode par = e.parentNode();
while(!par.isNull() && par.namespaceURI().isNull())
par = par.parentNode();
bool noShowNS = false;
if(!par.isNull() && par.namespaceURI() == e.namespaceURI())
noShowNS = true;
- QDomElement i;
+ TQDomElement i;
uint x;
//if(noShowNS)
i = e.ownerDocument().createElement(e.tagName());
@@ -485,7 +485,7 @@ static QDomElement oldStyleNS(const QDomElement &e)
// i = e.ownerDocument().createElementNS(e.namespaceURI(), e.tagName());
// copy attributes
- QDomNamedNodeMap al = e.attributes();
+ TQDomNamedNodeMap al = e.attributes();
for(x = 0; x < al.count(); ++x)
i.setAttributeNode(al.item(x).cloneNode().toAttr());
@@ -493,9 +493,9 @@ static QDomElement oldStyleNS(const QDomElement &e)
i.setAttribute("xmlns", e.namespaceURI());
// copy children
- QDomNodeList nl = e.childNodes();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x) {
- QDomNode n = nl.item(x);
+ TQDomNode n = nl.item(x);
if(n.isElement())
i.appendChild(oldStyleNS(n.toElement()));
else
@@ -507,44 +507,44 @@ static QDomElement oldStyleNS(const QDomElement &e)
void Client::streamReadyRead()
{
// HACK HACK HACK
- QGuardedPtr<ClientStream> pstream = d->stream;
+ TQGuardedPtr<ClientStream> pstream = d->stream;
while(pstream && d->stream->stanzaAvailable()) {
Stanza s = d->stream->read();
- QString out = s.toString();
- debug(QString("Client: incoming: [\n%1]\n").arg(out));
+ TQString out = s.toString();
+ debug(TQString("Client: incoming: [\n%1]\n").arg(out));
xmlIncoming(out);
- QDomElement x = oldStyleNS(s.element());
+ TQDomElement x = oldStyleNS(s.element());
distribute(x);
}
}
-void Client::streamIncomingXml(const QString &s)
+void Client::streamIncomingXml(const TQString &s)
{
- QString str = s;
+ TQString str = s;
if(str.at(str.length()-1) != '\n')
str += '\n';
xmlIncoming(str);
}
-void Client::streamOutgoingXml(const QString &s)
+void Client::streamOutgoingXml(const TQString &s)
{
- QString str = s;
+ TQString str = s;
if(str.at(str.length()-1) != '\n')
str += '\n';
xmlOutgoing(str);
}
-void Client::debug(const QString &str)
+void Client::debug(const TQString &str)
{
debugText(str);
}
-QString Client::genUniqueId()
+TQString Client::genUniqueId()
{
- QString s;
+ TQString s;
s.sprintf("a%x", d->id_seed);
d->id_seed += 0x10;
return s;
@@ -555,12 +555,12 @@ Task *Client::rootTask()
return d->root;
}
-QDomDocument *Client::doc() const
+TQDomDocument *Client::doc() const
{
return &d->doc;
}
-void Client::distribute(const QDomElement &x)
+void Client::distribute(const TQDomElement &x)
{
if(x.hasAttribute("from")) {
Jid j(x.attribute("from"));
@@ -575,41 +575,41 @@ void Client::distribute(const QDomElement &x)
}
}
-static QDomElement addCorrectNS(const QDomElement &e)
+static TQDomElement addCorrectNS(const TQDomElement &e)
{
uint x;
// grab child nodes
- /*QDomDocumentFragment frag = e.ownerDocument().createDocumentFragment();
- QDomNodeList nl = e.childNodes();
+ /*TQDomDocumentFragment frag = e.ownerDocument().createDocumentFragment();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x)
frag.appendChild(nl.item(x).cloneNode());*/
// find closest xmlns
- QDomNode n = e;
+ TQDomNode n = e;
while(!n.isNull() && !n.toElement().hasAttribute("xmlns"))
n = n.parentNode();
- QString ns;
+ TQString ns;
if(n.isNull() || !n.toElement().hasAttribute("xmlns"))
ns = "jabber:client";
else
ns = n.toElement().attribute("xmlns");
// make a new node
- QDomElement i = e.ownerDocument().createElementNS(ns, e.tagName());
+ TQDomElement i = e.ownerDocument().createElementNS(ns, e.tagName());
// copy attributes
- QDomNamedNodeMap al = e.attributes();
+ TQDomNamedNodeMap al = e.attributes();
for(x = 0; x < al.count(); ++x) {
- QDomAttr a = al.item(x).toAttr();
+ TQDomAttr a = al.item(x).toAttr();
if(a.name() != "xmlns")
i.setAttributeNodeNS(a.cloneNode().toAttr());
}
// copy children
- QDomNodeList nl = e.childNodes();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x) {
- QDomNode n = nl.item(x);
+ TQDomNode n = nl.item(x);
if(n.isElement())
i.appendChild(addCorrectNS(n.toElement()));
else
@@ -620,40 +620,40 @@ static QDomElement addCorrectNS(const QDomElement &e)
return i;
}
-void Client::send(const QDomElement &x)
+void Client::send(const TQDomElement &x)
{
if(!d->stream)
return;
- //QString out;
- //QTextStream ts(&out, IO_WriteOnly);
+ //TQString out;
+ //TQTextStream ts(&out, IO_WriteOnly);
//x.save(ts, 0);
- //QString out = Stream::xmlToString(x);
- //debug(QString("Client: outgoing: [\n%1]\n").arg(out));
+ //TQString out = Stream::xmlToString(x);
+ //debug(TQString("Client: outgoing: [\n%1]\n").arg(out));
//xmlOutgoing(out);
- QDomElement e = addCorrectNS(x);
+ TQDomElement e = addCorrectNS(x);
Stanza s = d->stream->createStanza(e);
if(s.isNull()) {
//printf("bad stanza??\n");
return;
}
- QString out = s.toString();
- debug(QString("Client: outgoing: [\n%1]\n").arg(out));
+ TQString out = s.toString();
+ debug(TQString("Client: outgoing: [\n%1]\n").arg(out));
xmlOutgoing(out);
//printf("x[%s] x2[%s] s[%s]\n", Stream::xmlToString(x).latin1(), Stream::xmlToString(e).latin1(), s.toString().latin1());
d->stream->write(s);
}
-void Client::send(const QString &str)
+void Client::send(const TQString &str)
{
if(!d->stream)
return;
- debug(QString("Client: outgoing: [\n%1]\n").arg(str));
+ debug(TQString("Client: outgoing: [\n%1]\n").arg(str));
xmlOutgoing(str);
static_cast<ClientStream*>(d->stream)->writeDirect(str);
}
@@ -673,29 +673,29 @@ const ResourceList & Client::resourceList() const
return d->resourceList;
}
-QString Client::host() const
+TQString Client::host() const
{
return d->host;
}
-QString Client::user() const
+TQString Client::user() const
{
return d->user;
}
-QString Client::pass() const
+TQString Client::pass() const
{
return d->pass;
}
-QString Client::resource() const
+TQString Client::resource() const
{
return d->resource;
}
Jid Client::jid() const
{
- QString s;
+ TQString s;
if(!d->user.isEmpty())
s += d->user + '@';
s += d->host;
@@ -707,7 +707,7 @@ Jid Client::jid() const
return Jid(s);
}
-void Client::ppSubscription(const Jid &j, const QString &s)
+void Client::ppSubscription(const Jid &j, const TQString &s)
{
subscription(j, s);
}
@@ -715,17 +715,17 @@ void Client::ppSubscription(const Jid &j, const QString &s)
void Client::ppPresence(const Jid &j, const Status &s)
{
if(s.isAvailable())
- debug(QString("Client: %1 is available.\n").arg(j.full()));
+ debug(TQString("Client: %1 is available.\n").arg(j.full()));
else
- debug(QString("Client: %1 is unavailable.\n").arg(j.full()));
+ debug(TQString("Client: %1 is unavailable.\n").arg(j.full()));
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
GroupChat &i = *it;
if(i.j.compare(j, false)) {
bool us = (i.j.resource() == j.resource() || j.resource().isEmpty()) ? true: false;
- debug(QString("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").arg(i.j.full()).arg(j.full()).arg(us));
switch(i.status) {
case GroupChat::Connecting:
if(us && s.hasError()) {
@@ -796,7 +796,7 @@ void Client::updateSelfPresence(const Jid &j, const Status &s)
// unavailable? remove the resource
if(!s.isAvailable()) {
if(found) {
- debug(QString("Client: Removing self resource: name=[%1]\n").arg(j.resource()));
+ debug(TQString("Client: Removing self resource: name=[%1]\n").arg(j.resource()));
(*rit).setStatus(s);
resourceUnavailable(j, *rit);
d->resourceList.remove(rit);
@@ -808,12 +808,12 @@ void Client::updateSelfPresence(const Jid &j, const Status &s)
if(!found) {
r = Resource(j.resource(), s);
d->resourceList += r;
- debug(QString("Client: Adding self resource: name=[%1]\n").arg(j.resource()));
+ debug(TQString("Client: Adding self resource: name=[%1]\n").arg(j.resource()));
}
else {
(*rit).setStatus(s);
r = *rit;
- debug(QString("Client: Updating self resource: name=[%1]\n").arg(j.resource()));
+ debug(TQString("Client: Updating self resource: name=[%1]\n").arg(j.resource()));
}
resourceAvailable(j, r);
@@ -829,7 +829,7 @@ void Client::updatePresence(LiveRosterItem *i, const Jid &j, const Status &s)
if(!s.isAvailable()) {
if(found) {
(*rit).setStatus(s);
- debug(QString("Client: Removing resource from [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource()));
+ debug(TQString("Client: Removing resource from [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource()));
resourceUnavailable(j, *rit);
i->resourceList().remove(rit);
i->setLastUnavailableStatus(s);
@@ -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(QString("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").arg(i->jid().full()).arg(j.resource()));
}
else {
(*rit).setStatus(s);
r = *rit;
- debug(QString("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").arg(i->jid().full()).arg(j.resource()));
}
resourceAvailable(j, r);
@@ -855,10 +855,10 @@ void Client::updatePresence(LiveRosterItem *i, const Jid &j, const Status &s)
void Client::pmMessage(const Message &m)
{
- debug(QString("Client: Message from %1\n").arg(m.from().full()));
+ debug(TQString("Client: Message from %1\n").arg(m.from().full()));
if(m.type() == "groupchat") {
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
const GroupChat &i = *it;
if(!i.j.compare(m.from(), false))
@@ -883,7 +883,7 @@ void Client::rosterRequest()
return;
JT_Roster *r = new JT_Roster(rootTask());
- connect(r, SIGNAL(finished()), SLOT(slotRosterRequestFinished()));
+ connect(r, TQT_SIGNAL(finished()), TQT_SLOT(slotRosterRequestFinished()));
r->get();
d->roster.flagAllForDelete(); // mod_groups patch
r->go(true);
@@ -927,7 +927,7 @@ void Client::importRoster(const Roster &r)
void Client::importRosterItem(const RosterItem &item)
{
- QString substr;
+ TQString substr;
switch(item.subscription().type()) {
case Subscription::Both:
substr = "<-->"; break;
@@ -942,10 +942,10 @@ void Client::importRosterItem(const RosterItem &item)
substr = "----"; break;
}
- QString dstr, str;
+ TQString dstr, str;
str.sprintf(" %s %-32s", substr.latin1(), item.jid().full().latin1());
if(!item.name().isEmpty())
- str += QString(" [") + item.name() + "]";
+ str += TQString(" [") + item.name() + "]";
str += '\n';
// Remove
@@ -986,7 +986,7 @@ void Client::sendMessage(const Message &m)
j->go(true);
}
-void Client::sendSubscription(const Jid &jid, const QString &type)
+void Client::sendSubscription(const Jid &jid, const TQString &type)
{
JT_Presence *j = new JT_Presence(rootTask());
j->sub(jid, type);
@@ -1006,12 +1006,12 @@ void Client::setPresence(const Status &s)
//r.setStatus(s);
}
-QString Client::OSName() const
+TQString Client::OSName() const
{
return d->osname;
}
-QString Client::timeZone() const
+TQString Client::timeZone() const
{
return d->tzname;
}
@@ -1021,58 +1021,58 @@ int Client::timeZoneOffset() const
return d->tzoffset;
}
-QString Client::clientName() const
+TQString Client::clientName() const
{
return d->clientName;
}
-QString Client::clientVersion() const
+TQString Client::clientVersion() const
{
return d->clientVersion;
}
-QString Client::capsNode() const
+TQString Client::capsNode() const
{
return d->capsNode;
}
-QString Client::capsVersion() const
+TQString Client::capsVersion() const
{
return d->capsVersion;
}
-QString Client::capsExt() const
+TQString Client::capsExt() const
{
return d->capsExt;
}
-void Client::setOSName(const QString &name)
+void Client::setOSName(const TQString &name)
{
d->osname = name;
}
-void Client::setTimeZone(const QString &name, int offset)
+void Client::setTimeZone(const TQString &name, int offset)
{
d->tzname = name;
d->tzoffset = offset;
}
-void Client::setClientName(const QString &s)
+void Client::setClientName(const TQString &s)
{
d->clientName = s;
}
-void Client::setClientVersion(const QString &s)
+void Client::setClientVersion(const TQString &s)
{
d->clientVersion = s;
}
-void Client::setCapsNode(const QString &s)
+void Client::setCapsNode(const TQString &s)
{
d->capsNode = s;
}
-void Client::setCapsVersion(const QString &s)
+void Client::setCapsVersion(const TQString &s)
{
d->capsVersion = s;
}
@@ -1087,7 +1087,7 @@ void Client::setIdentity(DiscoItem::Identity identity)
d->identity = identity;
}
-void Client::addExtension(const QString& ext, const Features& features)
+void Client::addExtension(const TQString& ext, const Features& features)
{
if (!ext.isEmpty()) {
d->extension_features[ext] = features;
@@ -1095,7 +1095,7 @@ void Client::addExtension(const QString& ext, const Features& features)
}
}
-void Client::removeExtension(const QString& ext)
+void Client::removeExtension(const TQString& ext)
{
if (d->extension_features.contains(ext)) {
d->extension_features.remove(ext);
@@ -1103,12 +1103,12 @@ void Client::removeExtension(const QString& ext)
}
}
-QStringList Client::extensions() const
+TQStringList Client::extensions() const
{
return d->extension_features.keys();
}
-const Features& Client::extension(const QString& ext) const
+const Features& Client::extension(const TQString& ext) const
{
return d->extension_features[ext];
}
@@ -1146,32 +1146,32 @@ class Task::TaskPrivate
public:
TaskPrivate() {}
- QString id;
+ TQString id;
bool success;
int statusCode;
- QString statusString;
+ TQString statusString;
Client *client;
bool insig, deleteme, autoDelete;
bool done;
};
Task::Task(Task *parent)
-:QObject(parent)
+:TQObject(parent)
{
init();
d->client = parent->client();
d->id = client()->genUniqueId();
- connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected()));
+ connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected()));
}
Task::Task(Client *parent, bool)
-:QObject(0)
+:TQObject(0)
{
init();
d->client = parent;
- connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected()));
+ connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected()));
}
Task::~Task()
@@ -1191,7 +1191,7 @@ void Task::init()
Task *Task::parent() const
{
- return (Task *)QObject::parent();
+ return (Task *)TQObject::parent();
}
Client *Task::client() const
@@ -1199,12 +1199,12 @@ Client *Task::client() const
return d->client;
}
-QDomDocument *Task::doc() const
+TQDomDocument *Task::doc() const
{
return client()->doc();
}
-QString Task::id() const
+TQString Task::id() const
{
return d->id;
}
@@ -1219,7 +1219,7 @@ int Task::statusCode() const
return d->statusCode;
}
-const QString & Task::statusString() const
+const TQString & Task::statusString() const
{
return d->statusString;
}
@@ -1231,17 +1231,17 @@ void Task::go(bool autoDelete)
onGo();
}
-bool Task::take(const QDomElement &x)
+bool Task::take(const TQDomElement &x)
{
- const QObjectList *p = children();
+ const TQObjectList *p = children();
if(!p)
return false;
// pass along the xml
- QObjectListIt it(*p);
+ TQObjectListIt it(*p);
Task *t;
for(; it.current(); ++it) {
- QObject *obj = it.current();
+ TQObject *obj = it.current();
if(!obj->inherits("XMPP::Task"))
continue;
@@ -1275,16 +1275,16 @@ void Task::onDisconnect()
d->statusString = tr("Disconnected");
// delay this so that tasks that react don't block the shutdown
- QTimer::singleShot(0, this, SLOT(done()));
+ TQTimer::singleShot(0, this, TQT_SLOT(done()));
}
}
-void Task::send(const QDomElement &x)
+void Task::send(const TQDomElement &x)
{
client()->send(x);
}
-void Task::setSuccess(int code, const QString &str)
+void Task::setSuccess(int code, const TQString &str)
{
if(!d->done) {
d->success = true;
@@ -1294,7 +1294,7 @@ void Task::setSuccess(int code, const QString &str)
}
}
-void Task::setError(const QDomElement &e)
+void Task::setError(const TQDomElement &e)
{
if(!d->done) {
d->success = false;
@@ -1303,7 +1303,7 @@ void Task::setError(const QDomElement &e)
}
}
-void Task::setError(int code, const QString &str)
+void Task::setError(int code, const TQString &str)
{
if(!d->done) {
d->success = false;
@@ -1338,7 +1338,7 @@ void Task::clientDisconnected()
void Task::debug(const char *fmt, ...)
{
char *buf;
- QString str;
+ TQString str;
int size = 1024;
int r;
@@ -1350,7 +1350,7 @@ void Task::debug(const char *fmt, ...)
va_end(ap);
if(r != -1)
- str = QString(buf);
+ str = TQString(buf);
delete [] buf;
@@ -1360,12 +1360,12 @@ void Task::debug(const char *fmt, ...)
debug(str);
}
-void Task::debug(const QString &str)
+void Task::debug(const TQString &str)
{
- client()->debug(QString("%1: ").arg(className()) + str);
+ client()->debug(TQString("%1: ").arg(className()) + str);
}
-bool Task::iqVerify(const QDomElement &x, const Jid &to, const QString &id, const QString &xmlns)
+bool Task::iqVerify(const TQDomElement &x, const Jid &to, const TQString &id, const TQString &xmlns)
{
if(x.tagName() != "iq")
return false;
@@ -1485,7 +1485,7 @@ void LiveRosterItem::setFlagForDelete(bool b)
// LiveRoster
//---------------------------------------------------------------------------
LiveRoster::LiveRoster()
-:QValueList<LiveRosterItem>()
+:TQValueList<LiveRosterItem>()
{
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp
index 512839c3..f2fcf7c9 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp
@@ -20,25 +20,25 @@
#include"im.h"
#include "protocol.h"
-#include<qmap.h>
-#include<qapplication.h>
+#include<tqmap.h>
+#include<tqapplication.h>
#define NS_XML "http://www.w3.org/XML/1998/namespace"
-static QDomElement textTag(QDomDocument *doc, const QString &name, const QString &content)
+static TQDomElement textTag(TQDomDocument *doc, const TQString &name, const TQString &content)
{
- QDomElement tag = doc->createElement(name);
- QDomText text = doc->createTextNode(content);
+ TQDomElement tag = doc->createElement(name);
+ TQDomText text = doc->createTextNode(content);
tag.appendChild(text);
return tag;
}
-static QString tagContent(const QDomElement &e)
+static TQString tagContent(const TQDomElement &e)
{
// look for some tag content
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomText i = n.toText();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomText i = n.toText();
if(i.isNull())
continue;
return i.data();
@@ -47,10 +47,10 @@ static QString tagContent(const QDomElement &e)
return "";
}
-static QDateTime stamp2TS(const QString &ts)
+static TQDateTime stamp2TS(const TQString &ts)
{
if(ts.length() != 17)
- return QDateTime();
+ return TQDateTime();
int year = ts.mid(0,4).toInt();
int month = ts.mid(4,2).toInt();
@@ -60,22 +60,22 @@ static QDateTime stamp2TS(const QString &ts)
int min = ts.mid(12,2).toInt();
int sec = ts.mid(15,2).toInt();
- QDate xd;
+ TQDate xd;
xd.setYMD(year, month, day);
if(!xd.isValid())
- return QDateTime();
+ return TQDateTime();
- QTime xt;
+ TQTime xt;
xt.setHMS(hour, min, sec);
if(!xt.isValid())
- return QDateTime();
+ return TQDateTime();
- return QDateTime(xd, xt);
+ return TQDateTime(xd, xt);
}
-/*static QString TS2stamp(const QDateTime &d)
+/*static TQString TS2stamp(const TQDateTime &d)
{
- QString str;
+ TQString str;
str.sprintf("%04d%02d%02dT%02d:%02d:%02d",
d.date().year(),
@@ -97,17 +97,17 @@ namespace XMPP
class Url::Private
{
public:
- QString url;
- QString desc;
+ TQString url;
+ TQString desc;
};
//! \brief Construct Url object with a given URL and Description.
//!
//! This function will construct a Url object.
-//! \param QString - url (default: empty string)
-//! \param QString - description of url (default: empty string)
+//! \param TQString - url (default: empty string)
+//! \param TQString - description of url (default: empty string)
//! \sa setUrl() setDesc()
-Url::Url(const QString &url, const QString &desc)
+Url::Url(const TQString &url, const TQString &desc)
{
d = new Private;
d->url = url;
@@ -140,7 +140,7 @@ Url::~Url()
//! \brief Get url information.
//!
//! Returns url information.
-QString Url::url() const
+TQString Url::url() const
{
return d->url;
}
@@ -148,7 +148,7 @@ QString Url::url() const
//! \brief Get Description information.
//!
//! Returns desction of the URL.
-QString Url::desc() const
+TQString Url::desc() const
{
return d->desc;
}
@@ -157,7 +157,7 @@ QString Url::desc() const
//!
//! Set url information.
//! \param url - url string (eg: http://psi.affinix.com/)
-void Url::setUrl(const QString &url)
+void Url::setUrl(const TQString &url)
{
d->url = url;
}
@@ -166,7 +166,7 @@ void Url::setUrl(const QString &url)
//!
//! Set description of the url.
//! \param desc - description of url
-void Url::setDesc(const QString &desc)
+void Url::setDesc(const TQString &desc)
{
d->desc = desc;
}
@@ -178,19 +178,19 @@ class Message::Private
{
public:
Jid to, from;
- QString id, type, lang;
+ TQString id, type, lang;
StringMap subject, body, xHTMLBody;
- QString thread;
+ TQString thread;
Stanza::Error error;
// extensions
- QDateTime timeStamp;
+ TQDateTime timeStamp;
UrlList urlList;
- QValueList<MsgEvent> eventList;
- QString eventId;
- QString xencrypted, invite;
+ TQValueList<MsgEvent> eventList;
+ TQString eventId;
+ TQString xencrypted, invite;
bool spooled, wasEncrypted;
};
@@ -247,24 +247,24 @@ Jid Message::from() const
return d->from;
}
-QString Message::id() const
+TQString Message::id() const
{
return d->id;
}
//! \brief Return type information
-QString Message::type() const
+TQString Message::type() const
{
return d->type;
}
-QString Message::lang() const
+TQString Message::lang() const
{
return d->lang;
}
//! \brief Return subject information.
-QString Message::subject(const QString &lang) const
+TQString Message::subject(const TQString &lang) const
{
return d->subject[lang];
}
@@ -275,17 +275,17 @@ QString Message::subject(const QString &lang) const
//! 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.
-QString Message::body(const QString &lang) const
+TQString Message::body(const TQString &lang) const
{
return d->body[lang];
}
-QString Message::xHTMLBody(const QString &lang) const
+TQString Message::xHTMLBody(const TQString &lang) const
{
return d->xHTMLBody[lang];
}
-QString Message::thread() const
+TQString Message::thread() const
{
return d->thread;
}
@@ -310,7 +310,7 @@ void Message::setFrom(const Jid &j)
//d->flag = false;
}
-void Message::setId(const QString &s)
+void Message::setId(const TQString &s)
{
d->id = s;
}
@@ -318,13 +318,13 @@ void Message::setId(const QString &s)
//! \brief Set Type of message
//!
//! \param type - type of message your going to send
-void Message::setType(const QString &s)
+void Message::setType(const TQString &s)
{
d->type = s;
//d->flag = false;
}
-void Message::setLang(const QString &s)
+void Message::setLang(const TQString &s)
{
d->lang = s;
}
@@ -332,7 +332,7 @@ void Message::setLang(const QString &s)
//! \brief Set subject
//!
//! \param subject - Subject information
-void Message::setSubject(const QString &s, const QString &lang)
+void Message::setSubject(const TQString &s, const TQString &lang)
{
d->subject[lang] = s;
//d->flag = false;
@@ -343,20 +343,20 @@ void Message::setSubject(const QString &s, const QString &lang)
//! \param body - body information
//! \param rich - set richtext if true and set plaintext if false.
//! \note Richtext support will be implemented in the future... Sorry.
-void Message::setBody(const QString &s, const QString &lang)
+void Message::setBody(const TQString &s, const TQString &lang)
{
d->body[lang] = s;
}
-void Message::setXHTMLBody(const QString &s, const QString &lang, const QString &attr)
+void Message::setXHTMLBody(const TQString &s, const TQString &lang, const TQString &attr)
{
//ugly but needed if s is not a node but a list of leaf
- QString content = "<body xmlns='" + QString(NS_XHTML) + "' "+attr+" >\n" + s +"\n</body>";
+ TQString content = "<body xmlns='" + TQString(NS_XHTML) + "' "+attr+" >\n" + s +"\n</body>";
d->xHTMLBody[lang] = content;
}
-void Message::setThread(const QString &s)
+void Message::setThread(const TQString &s)
{
d->thread = s;
}
@@ -366,12 +366,12 @@ void Message::setError(const Stanza::Error &err)
d->error = err;
}
-QDateTime Message::timeStamp() const
+TQDateTime Message::timeStamp() const
{
return d->timeStamp;
}
-void Message::setTimeStamp(const QDateTime &ts)
+void Message::setTimeStamp(const TQDateTime &ts)
{
d->timeStamp = ts;
}
@@ -404,12 +404,12 @@ void Message::setUrlList(const UrlList &list)
d->urlList = list;
}
-QString Message::eventId() const
+TQString Message::eventId() const
{
return d->eventId;
}
-void Message::setEventId(const QString& id)
+void Message::setEventId(const TQString& id)
{
d->eventId = id;
}
@@ -433,22 +433,22 @@ void Message::addEvent(MsgEvent e)
}
}
-QString Message::xencrypted() const
+TQString Message::xencrypted() const
{
return d->xencrypted;
}
-void Message::setXEncrypted(const QString &s)
+void Message::setXEncrypted(const TQString &s)
{
d->xencrypted = s;
}
-QString Message::invite() const
+TQString Message::invite() const
{
return d->invite;
}
-void Message::setInvite(const QString &s)
+void Message::setInvite(const TQString &s)
{
d->invite = s;
}
@@ -485,29 +485,29 @@ Stanza Message::toStanza(Stream *stream) const
StringMap::ConstIterator it;
for(it = d->subject.begin(); it != d->subject.end(); ++it) {
- const QString &str = it.data();
+ const TQString &str = it.data();
if(!str.isEmpty()) {
- QDomElement e = s.createTextElement(s.baseNS(), "subject", str);
+ TQDomElement e = s.createTextElement(s.baseNS(), "subject", str);
if(!it.key().isEmpty())
e.setAttributeNS(NS_XML, "xml:lang", it.key());
s.appendChild(e);
}
}
for(it = d->body.begin(); it != d->body.end(); ++it) {
- const QString &str = it.data();
+ const TQString &str = it.data();
if(!str.isEmpty()) {
- QDomElement e = s.createTextElement(s.baseNS(), "body", str);
+ TQDomElement e = s.createTextElement(s.baseNS(), "body", str);
if(!it.key().isEmpty())
e.setAttributeNS(NS_XML, "xml:lang", it.key());
s.appendChild(e);
}
}
if ( !d->xHTMLBody.isEmpty()) {
- QDomElement parent = s.createElement(s.xhtmlImNS(), "html");
+ TQDomElement parent = s.createElement(s.xhtmlImNS(), "html");
for(it = d->xHTMLBody.begin(); it != d->xHTMLBody.end(); ++it) {
- const QString &str = it.data();
+ const TQString &str = it.data();
if(!str.isEmpty()) {
- QDomElement child = s.createXHTMLElement(str);
+ TQDomElement child = s.createXHTMLElement(str);
if(!it.key().isEmpty())
child.setAttributeNS(NS_XML, "xml:lang", it.key());
parent.appendChild(child);
@@ -520,14 +520,14 @@ Stanza Message::toStanza(Stream *stream) const
// timestamp
/*if(!d->timeStamp.isNull()) {
- QDomElement e = s.createElement("jabber:x:delay", "x");
+ TQDomElement e = s.createElement("jabber:x:delay", "x");
e.setAttribute("stamp", TS2stamp(d->timeStamp));
s.appendChild(e);
}*/
// urls
- for(QValueList<Url>::ConstIterator uit = d->urlList.begin(); uit != d->urlList.end(); ++uit) {
- QDomElement x = s.createElement("jabber:x:oob", "x");
+ for(TQValueList<Url>::ConstIterator uit = d->urlList.begin(); uit != d->urlList.end(); ++uit) {
+ TQDomElement x = s.createElement("jabber:x:oob", "x");
x.appendChild(s.createTextElement("jabber:x:oob", "url", (*uit).url()));
if(!(*uit).desc().isEmpty())
x.appendChild(s.createTextElement("jabber:x:oob", "desc", (*uit).desc()));
@@ -536,7 +536,7 @@ Stanza Message::toStanza(Stream *stream) const
// events
if (!d->eventList.isEmpty()) {
- QDomElement x = s.createElement("jabber:x:event", "x");
+ TQDomElement x = s.createElement("jabber:x:event", "x");
if (d->body.isEmpty()) {
if (d->eventId.isEmpty())
@@ -548,7 +548,7 @@ Stanza Message::toStanza(Stream *stream) const
s.appendChild( s.createElement(NS_CHATSTATES , "active" ) );
bool need_x_event=false;
- for(QValueList<MsgEvent>::ConstIterator ev = d->eventList.begin(); ev != d->eventList.end(); ++ev) {
+ for(TQValueList<MsgEvent>::ConstIterator ev = d->eventList.begin(); ev != d->eventList.end(); ++ev) {
switch (*ev) {
case OfflineEvent:
x.appendChild(s.createElement("jabber:x:event", "offline"));
@@ -594,7 +594,7 @@ Stanza Message::toStanza(Stream *stream) const
// invite
if(!d->invite.isEmpty()) {
- QDomElement e = s.createElement("jabber:x:conference", "x");
+ TQDomElement e = s.createElement("jabber:x:conference", "x");
e.setAttribute("jid", d->invite);
s.appendChild(e);
}
@@ -615,24 +615,24 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset)
d->subject.clear();
d->body.clear();
- d->thread = QString();
+ d->thread = TQString();
d->eventList.clear();
- QDomElement root = s.element();
+ TQDomElement root = s.element();
- QDomNodeList nl = root.childNodes();
+ TQDomNodeList nl = root.childNodes();
uint n;
for(n = 0; n < nl.count(); ++n) {
- QDomNode i = nl.item(n);
+ TQDomNode i = nl.item(n);
if(i.isElement()) {
- QDomElement e = i.toElement();
+ TQDomElement e = i.toElement();
if(e.namespaceURI() == s.baseNS()) {
if(e.tagName() == "subject") {
- QString lang = e.attributeNS(NS_XML, "lang", "");
+ TQString lang = e.attributeNS(NS_XML, "lang", "");
d->subject[lang] = e.text();
}
else if(e.tagName() == "body") {
- QString lang = e.attributeNS(NS_XML, "lang", "");
+ TQString lang = e.attributeNS(NS_XML, "lang", "");
d->body[lang] = e.text();
}
else if(e.tagName() == "thread")
@@ -640,13 +640,13 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset)
}
else if (e.namespaceURI() == s.xhtmlImNS()) {
if (e.tagName() == "html") {
- QDomNodeList htmlNL= e.childNodes();
+ TQDomNodeList htmlNL= e.childNodes();
for (unsigned int x = 0; x < htmlNL.count(); x++) {
- QDomElement i = htmlNL.item(x).toElement();
+ TQDomElement i = htmlNL.item(x).toElement();
if (i.tagName() == "body") {
- QDomDocument RichText;
- QString lang = i.attributeNS(NS_XML, "lang", "");
+ TQDomDocument RichText;
+ TQString lang = i.attributeNS(NS_XML, "lang", "");
RichText.appendChild(i);
d-> xHTMLBody[lang] = RichText.toString();
}
@@ -690,14 +690,14 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset)
d->error = s.error();
// timestamp
- QDomElement t = root.elementsByTagNameNS("jabber:x:delay", "x").item(0).toElement();
+ TQDomElement t = root.elementsByTagNameNS("jabber:x:delay", "x").item(0).toElement();
if(!t.isNull()) {
d->timeStamp = stamp2TS(t.attribute("stamp"));
d->timeStamp = d->timeStamp.addSecs(timeZoneOffset * 3600);
d->spooled = true;
}
else {
- d->timeStamp = QDateTime::currentDateTime();
+ d->timeStamp = TQDateTime::currentDateTime();
d->spooled = false;
}
@@ -705,7 +705,7 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset)
d->urlList.clear();
nl = root.elementsByTagNameNS("jabber:x:oob", "x");
for(n = 0; n < nl.count(); ++n) {
- QDomElement t = nl.item(n).toElement();
+ TQDomElement t = nl.item(n).toElement();
Url u;
u.setUrl(t.elementsByTagName("url").item(0).toElement().text());
u.setDesc(t.elementsByTagName("desc").item(0).toElement().text());
@@ -717,7 +717,7 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset)
if (nl.count()) {
nl = nl.item(0).childNodes();
for(n = 0; n < nl.count(); ++n) {
- QString evtag = nl.item(n).toElement().tagName();
+ TQString evtag = nl.item(n).toElement().tagName();
if (evtag == "id") {
d->eventId = nl.item(n).toElement().text();
}
@@ -739,14 +739,14 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset)
if(!t.isNull())
d->xencrypted = t.text();
else
- d->xencrypted = QString();
+ d->xencrypted = TQString();
// invite
t = root.elementsByTagNameNS("jabber:x:conference", "x").item(0).toElement();
if(!t.isNull())
d->invite = t.attribute("jid");
else
- d->invite = QString();
+ d->invite = TQString();
return true;
}
@@ -764,7 +764,7 @@ int Subscription::type() const
return value;
}
-QString Subscription::toString() const
+TQString Subscription::toString() const
{
switch(value) {
case Remove:
@@ -781,7 +781,7 @@ QString Subscription::toString() const
}
}
-bool Subscription::fromString(const QString &s)
+bool Subscription::fromString(const TQString &s)
{
if(s == "remove")
value = Remove;
@@ -803,13 +803,13 @@ bool Subscription::fromString(const QString &s)
//---------------------------------------------------------------------------
// Status
//---------------------------------------------------------------------------
-Status::Status(const QString &show, const QString &status, int priority, bool available)
+Status::Status(const TQString &show, const TQString &status, int priority, bool available)
{
v_isAvailable = available;
v_show = show;
v_status = status;
v_priority = priority;
- v_timeStamp = QDateTime::currentDateTime();
+ v_timeStamp = TQDateTime::currentDateTime();
v_isInvisible = false;
ecode = -1;
}
@@ -823,7 +823,7 @@ bool Status::hasError() const
return (ecode != -1);
}
-void Status::setError(int code, const QString &str)
+void Status::setError(int code, const TQString &str)
{
ecode = code;
estr = str;
@@ -844,47 +844,47 @@ void Status::setPriority(int x)
v_priority = x;
}
-void Status::setShow(const QString & _show)
+void Status::setShow(const TQString & _show)
{
v_show = _show;
}
-void Status::setStatus(const QString & _status)
+void Status::setStatus(const TQString & _status)
{
v_status = _status;
}
-void Status::setTimeStamp(const QDateTime & _timestamp)
+void Status::setTimeStamp(const TQDateTime & _timestamp)
{
v_timeStamp = _timestamp;
}
-void Status::setKeyID(const QString &key)
+void Status::setKeyID(const TQString &key)
{
v_key = key;
}
-void Status::setXSigned(const QString &s)
+void Status::setXSigned(const TQString &s)
{
v_xsigned = s;
}
-void Status::setSongTitle(const QString & _songtitle)
+void Status::setSongTitle(const TQString & _songtitle)
{
v_songTitle = _songtitle;
}
-void Status::setCapsNode(const QString & _capsNode)
+void Status::setCapsNode(const TQString & _capsNode)
{
v_capsNode = _capsNode;
}
-void Status::setCapsVersion(const QString & _capsVersion)
+void Status::setCapsVersion(const TQString & _capsVersion)
{
v_capsVersion = _capsVersion;
}
-void Status::setCapsExt(const QString & _capsExt)
+void Status::setCapsExt(const TQString & _capsExt)
{
v_capsExt = _capsExt;
}
@@ -912,46 +912,46 @@ int Status::priority() const
return v_priority;
}
-const QString & Status::show() const
+const TQString & Status::show() const
{
return v_show;
}
-const QString & Status::status() const
+const TQString & Status::status() const
{
return v_status;
}
-QDateTime Status::timeStamp() const
+TQDateTime Status::timeStamp() const
{
return v_timeStamp;
}
-const QString & Status::keyID() const
+const TQString & Status::keyID() const
{
return v_key;
}
-const QString & Status::xsigned() const
+const TQString & Status::xsigned() const
{
return v_xsigned;
}
-const QString & Status::songTitle() const
+const TQString & Status::songTitle() const
{
return v_songTitle;
}
-const QString & Status::capsNode() const
+const TQString & Status::capsNode() const
{
return v_capsNode;
}
-const QString & Status::capsVersion() const
+const TQString & Status::capsVersion() const
{
return v_capsVersion;
}
-const QString & Status::capsExt() const
+const TQString & Status::capsExt() const
{
return v_capsExt;
}
@@ -961,7 +961,7 @@ int Status::errorCode() const
return ecode;
}
-const QString & Status::errorString() const
+const TQString & Status::errorString() const
{
return estr;
}
@@ -970,7 +970,7 @@ const QString & Status::errorString() const
//---------------------------------------------------------------------------
// Resource
//---------------------------------------------------------------------------
-Resource::Resource(const QString &name, const Status &stat)
+Resource::Resource(const TQString &name, const Status &stat)
{
v_name = name;
v_status = stat;
@@ -980,7 +980,7 @@ Resource::~Resource()
{
}
-const QString & Resource::name() const
+const TQString & Resource::name() const
{
return v_name;
}
@@ -995,7 +995,7 @@ const Status & Resource::status() const
return v_status;
}
-void Resource::setName(const QString & _name)
+void Resource::setName(const TQString & _name)
{
v_name = _name;
}
@@ -1010,7 +1010,7 @@ void Resource::setStatus(const Status & _status)
// ResourceList
//---------------------------------------------------------------------------
ResourceList::ResourceList()
-:QValueList<Resource>()
+:TQValueList<Resource>()
{
}
@@ -1018,7 +1018,7 @@ ResourceList::~ResourceList()
{
}
-ResourceList::Iterator ResourceList::find(const QString & _find)
+ResourceList::Iterator ResourceList::find(const TQString & _find)
{
for(ResourceList::Iterator it = begin(); it != end(); ++it) {
if((*it).name() == _find)
@@ -1040,7 +1040,7 @@ ResourceList::Iterator ResourceList::priority()
return highest;
}
-ResourceList::ConstIterator ResourceList::find(const QString & _find) const
+ResourceList::ConstIterator ResourceList::find(const TQString & _find) const
{
for(ResourceList::ConstIterator it = begin(); it != end(); ++it) {
if((*it).name() == _find)
@@ -1080,12 +1080,12 @@ const Jid & RosterItem::jid() const
return v_jid;
}
-const QString & RosterItem::name() const
+const TQString & RosterItem::name() const
{
return v_name;
}
-const QStringList & RosterItem::groups() const
+const TQStringList & RosterItem::groups() const
{
return v_groups;
}
@@ -1095,7 +1095,7 @@ const Subscription & RosterItem::subscription() const
return v_subscription;
}
-const QString & RosterItem::ask() const
+const TQString & RosterItem::ask() const
{
return v_ask;
}
@@ -1105,9 +1105,9 @@ bool RosterItem::isPush() const
return v_push;
}
-bool RosterItem::inGroup(const QString &g) const
+bool RosterItem::inGroup(const TQString &g) const
{
- for(QStringList::ConstIterator it = v_groups.begin(); it != v_groups.end(); ++it) {
+ for(TQStringList::ConstIterator it = v_groups.begin(); it != v_groups.end(); ++it) {
if(*it == g)
return true;
}
@@ -1119,12 +1119,12 @@ void RosterItem::setJid(const Jid &_jid)
v_jid = _jid;
}
-void RosterItem::setName(const QString &_name)
+void RosterItem::setName(const TQString &_name)
{
v_name = _name;
}
-void RosterItem::setGroups(const QStringList &_groups)
+void RosterItem::setGroups(const TQStringList &_groups)
{
v_groups = _groups;
}
@@ -1134,7 +1134,7 @@ void RosterItem::setSubscription(const Subscription &type)
v_subscription = type;
}
-void RosterItem::setAsk(const QString &_ask)
+void RosterItem::setAsk(const TQString &_ask)
{
v_ask = _ask;
}
@@ -1144,7 +1144,7 @@ void RosterItem::setIsPush(bool b)
v_push = b;
}
-bool RosterItem::addGroup(const QString &g)
+bool RosterItem::addGroup(const TQString &g)
{
if(inGroup(g))
return false;
@@ -1153,9 +1153,9 @@ bool RosterItem::addGroup(const QString &g)
return true;
}
-bool RosterItem::removeGroup(const QString &g)
+bool RosterItem::removeGroup(const TQString &g)
{
- for(QStringList::Iterator it = v_groups.begin(); it != v_groups.end(); ++it) {
+ for(TQStringList::Iterator it = v_groups.begin(); it != v_groups.end(); ++it) {
if(*it == g) {
v_groups.remove(it);
return true;
@@ -1165,40 +1165,40 @@ bool RosterItem::removeGroup(const QString &g)
return false;
}
-QDomElement RosterItem::toXml(QDomDocument *doc) const
+TQDomElement RosterItem::toXml(TQDomDocument *doc) const
{
- QDomElement item = doc->createElement("item");
+ TQDomElement item = doc->createElement("item");
item.setAttribute("jid", v_jid.full());
item.setAttribute("name", v_name);
item.setAttribute("subscription", v_subscription.toString());
if(!v_ask.isEmpty())
item.setAttribute("ask", v_ask);
- for(QStringList::ConstIterator it = v_groups.begin(); it != v_groups.end(); ++it)
+ for(TQStringList::ConstIterator it = v_groups.begin(); it != v_groups.end(); ++it)
item.appendChild(textTag(doc, "group", *it));
return item;
}
-bool RosterItem::fromXml(const QDomElement &item)
+bool RosterItem::fromXml(const TQDomElement &item)
{
if(item.tagName() != "item")
return false;
Jid j(item.attribute("jid"));
if(!j.isValid())
return false;
- QString na = item.attribute("name");
+ TQString na = item.attribute("name");
Subscription s;
if(!s.fromString(item.attribute("subscription")) )
return false;
- QStringList g;
- for(QDomNode n = item.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQStringList g;
+ for(TQDomNode n = item.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == "group")
g += tagContent(i);
}
- QString a = item.attribute("ask");
+ TQString a = item.attribute("ask");
v_jid = j;
v_name = na;
@@ -1214,7 +1214,7 @@ bool RosterItem::fromXml(const QDomElement &item)
// Roster
//---------------------------------------------------------------------------
Roster::Roster()
-:QValueList<RosterItem>()
+:TQValueList<RosterItem>()
{
}
@@ -1246,7 +1246,7 @@ Roster::ConstIterator Roster::find(const Jid &j) const
//---------------------------------------------------------------------------
// FormField
//---------------------------------------------------------------------------
-FormField::FormField(const QString &type, const QString &value)
+FormField::FormField(const TQString &type, const TQString &value)
{
v_type = misc;
if(!type.isEmpty()) {
@@ -1266,29 +1266,29 @@ int FormField::type() const
return v_type;
}
-QString FormField::realName() const
+TQString FormField::realName() const
{
return typeToTagName(v_type);
}
-QString FormField::fieldName() const
+TQString FormField::fieldName() const
{
switch(v_type) {
- case username: return QObject::tr("Username");
- case nick: return QObject::tr("Nickname");
- case password: return QObject::tr("Password");
- case name: return QObject::tr("Name");
- case first: return QObject::tr("First Name");
- case last: return QObject::tr("Last Name");
- case email: return QObject::tr("E-mail");
- case address: return QObject::tr("Address");
- case city: return QObject::tr("City");
- case state: return QObject::tr("State");
- case zip: return QObject::tr("Zipcode");
- case phone: return QObject::tr("Phone");
- case url: return QObject::tr("URL");
- case date: return QObject::tr("Date");
- case misc: return QObject::tr("Misc");
+ case username: return TQObject::tr("Username");
+ case nick: return TQObject::tr("Nickname");
+ case password: return TQObject::tr("Password");
+ case name: return TQObject::tr("Name");
+ case first: return TQObject::tr("First Name");
+ case last: return TQObject::tr("Last Name");
+ case email: return TQObject::tr("E-mail");
+ case address: return TQObject::tr("Address");
+ case city: return TQObject::tr("City");
+ case state: return TQObject::tr("State");
+ case zip: return TQObject::tr("Zipcode");
+ case phone: return TQObject::tr("Phone");
+ case url: return TQObject::tr("URL");
+ case date: return TQObject::tr("Date");
+ case misc: return TQObject::tr("Misc");
default: return "";
};
}
@@ -1298,7 +1298,7 @@ bool FormField::isSecret() const
return (type() == password);
}
-const QString & FormField::value() const
+const TQString & FormField::value() const
{
return v_value;
}
@@ -1308,7 +1308,7 @@ void FormField::setType(int x)
v_type = x;
}
-bool FormField::setType(const QString &in)
+bool FormField::setType(const TQString &in)
{
int x = tagNameToType(in);
if(x == -1)
@@ -1318,12 +1318,12 @@ bool FormField::setType(const QString &in)
return true;
}
-void FormField::setValue(const QString &in)
+void FormField::setValue(const TQString &in)
{
v_value = in;
}
-int FormField::tagNameToType(const QString &in) const
+int FormField::tagNameToType(const TQString &in) const
{
if(!in.compare("username")) return username;
if(!in.compare("nick")) return nick;
@@ -1344,7 +1344,7 @@ int FormField::tagNameToType(const QString &in) const
return -1;
}
-QString FormField::typeToTagName(int type) const
+TQString FormField::typeToTagName(int type) const
{
switch(type) {
case username: return "username";
@@ -1371,7 +1371,7 @@ QString FormField::typeToTagName(int type) const
// Form
//---------------------------------------------------------------------------
Form::Form(const Jid &j)
-:QValueList<FormField>()
+:TQValueList<FormField>()
{
setJid(j);
}
@@ -1385,12 +1385,12 @@ Jid Form::jid() const
return v_jid;
}
-QString Form::instructions() const
+TQString Form::instructions() const
{
return v_instructions;
}
-QString Form::key() const
+TQString Form::key() const
{
return v_key;
}
@@ -1400,12 +1400,12 @@ void Form::setJid(const Jid &j)
v_jid = j;
}
-void Form::setInstructions(const QString &s)
+void Form::setInstructions(const TQString &s)
{
v_instructions = s;
}
-void Form::setKey(const QString &s)
+void Form::setKey(const TQString &s)
{
v_key = s;
}
@@ -1428,22 +1428,22 @@ const Jid & SearchResult::jid() const
return v_jid;
}
-const QString & SearchResult::nick() const
+const TQString & SearchResult::nick() const
{
return v_nick;
}
-const QString & SearchResult::first() const
+const TQString & SearchResult::first() const
{
return v_first;
}
-const QString & SearchResult::last() const
+const TQString & SearchResult::last() const
{
return v_last;
}
-const QString & SearchResult::email() const
+const TQString & SearchResult::email() const
{
return v_email;
}
@@ -1453,22 +1453,22 @@ void SearchResult::setJid(const Jid &jid)
v_jid = jid;
}
-void SearchResult::setNick(const QString &nick)
+void SearchResult::setNick(const TQString &nick)
{
v_nick = nick;
}
-void SearchResult::setFirst(const QString &first)
+void SearchResult::setFirst(const TQString &first)
{
v_first = first;
}
-void SearchResult::setLast(const QString &last)
+void SearchResult::setLast(const TQString &last)
{
v_last = last;
}
-void SearchResult::setEmail(const QString &email)
+void SearchResult::setEmail(const TQString &email)
{
v_email = email;
}
@@ -1481,14 +1481,14 @@ Features::Features()
{
}
-Features::Features(const QStringList &l)
+Features::Features(const TQStringList &l)
{
setList(l);
}
-Features::Features(const QString &str)
+Features::Features(const TQString &str)
{
- QStringList l;
+ TQStringList l;
l << str;
setList(l);
@@ -1498,19 +1498,19 @@ Features::~Features()
{
}
-QStringList Features::list() const
+TQStringList Features::list() const
{
return _list;
}
-void Features::setList(const QStringList &l)
+void Features::setList(const TQStringList &l)
{
_list = l;
}
-bool Features::test(const QStringList &ns) const
+bool Features::test(const TQStringList &ns) const
{
- QStringList::ConstIterator it = ns.begin();
+ TQStringList::ConstIterator it = ns.begin();
for ( ; it != ns.end(); ++it)
if ( _list.find( *it ) != _list.end() )
return true;
@@ -1521,7 +1521,7 @@ bool Features::test(const QStringList &ns) const
#define FID_REGISTER "jabber:iq:register"
bool Features::canRegister() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_REGISTER;
return test(ns);
@@ -1530,7 +1530,7 @@ bool Features::canRegister() const
#define FID_SEARCH "jabber:iq:search"
bool Features::canSearch() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_SEARCH;
return test(ns);
@@ -1539,7 +1539,7 @@ bool Features::canSearch() const
#define FID_XHTML "http://jabber.org/protocol/xhtml-im"
bool Features::canXHTML() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_XHTML;
@@ -1549,7 +1549,7 @@ bool Features::canXHTML() const
#define FID_GROUPCHAT "jabber:iq:conference"
bool Features::canGroupchat() const
{
- QStringList ns;
+ TQStringList ns;
ns << "http://jabber.org/protocol/muc";
ns << FID_GROUPCHAT;
@@ -1559,7 +1559,7 @@ bool Features::canGroupchat() const
#define FID_VOICE "http://www.google.com/xmpp/protocol/voice/v1"
bool Features::canVoice() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_VOICE;
return test(ns);
@@ -1568,7 +1568,7 @@ bool Features::canVoice() const
#define FID_GATEWAY "jabber:iq:gateway"
bool Features::isGateway() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_GATEWAY;
return test(ns);
@@ -1577,7 +1577,7 @@ bool Features::isGateway() const
#define FID_DISCO "http://jabber.org/protocol/disco"
bool Features::canDisco() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_DISCO;
ns << "http://jabber.org/protocol/disco#info";
ns << "http://jabber.org/protocol/disco#items";
@@ -1588,7 +1588,7 @@ bool Features::canDisco() const
#define FID_VCARD "vcard-temp"
bool Features::haveVCard() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_VCARD;
return test(ns);
@@ -1602,7 +1602,7 @@ class Features::FeatureName : public QObject
Q_OBJECT
public:
FeatureName()
- : QObject(qApp)
+ : TQObject(qApp)
{
id2s[FID_Invalid] = tr("ERROR: Incorrect usage of Features class");
id2s[FID_None] = tr("None");
@@ -1617,7 +1617,7 @@ public:
id2s[FID_Add] = tr("Add to roster");
// compute reverse map
- //QMap<QString, long>::Iterator it = id2s.begin();
+ //TQMap<TQString, long>::Iterator it = id2s.begin();
//for ( ; it != id2s.end(); ++it)
// s2id[it.data()] = it.key();
@@ -1632,9 +1632,9 @@ public:
id2f[FID_Add] = FID_ADD;
}
- //QMap<QString, long> s2id;
- QMap<long, QString> id2s;
- QMap<long, QString> id2f;
+ //TQMap<TQString, long> s2id;
+ TQMap<long, TQString> id2s;
+ TQMap<long, TQString> id2f;
};
static Features::FeatureName *featureName = 0;
@@ -1661,13 +1661,13 @@ long Features::id() const
return FID_None;
}
-long Features::id(const QString &feature)
+long Features::id(const TQString &feature)
{
Features f(feature);
return f.id();
}
-QString Features::feature(long id)
+TQString Features::feature(long id)
{
if ( !featureName )
featureName = new FeatureName();
@@ -1675,7 +1675,7 @@ QString Features::feature(long id)
return featureName->id2f[id];
}
-QString Features::name(long id)
+TQString Features::name(long id)
{
if ( !featureName )
featureName = new FeatureName();
@@ -1683,12 +1683,12 @@ QString Features::name(long id)
return featureName->id2s[id];
}
-QString Features::name() const
+TQString Features::name() const
{
return name(id());
}
-QString Features::name(const QString &feature)
+TQString Features::name(const TQString &feature)
{
Features f(feature);
return f.name(f.id());
@@ -1706,8 +1706,8 @@ public:
}
Jid jid;
- QString name;
- QString node;
+ TQString name;
+ TQString node;
Action action;
Features features;
@@ -1789,22 +1789,22 @@ void DiscoItem::setJid(const Jid &j)
d->jid = j;
}
-const QString &DiscoItem::name() const
+const TQString &DiscoItem::name() const
{
return d->name;
}
-void DiscoItem::setName(const QString &n)
+void DiscoItem::setName(const TQString &n)
{
d->name = n;
}
-const QString &DiscoItem::node() const
+const TQString &DiscoItem::node() const
{
return d->node;
}
-void DiscoItem::setNode(const QString &n)
+void DiscoItem::setNode(const TQString &n)
{
d->node = n;
}
@@ -1843,7 +1843,7 @@ void DiscoItem::setIdentities(const Identities &i)
}
-DiscoItem::Action DiscoItem::string2action(QString s)
+DiscoItem::Action DiscoItem::string2action(TQString s)
{
Action a;
@@ -1857,16 +1857,16 @@ DiscoItem::Action DiscoItem::string2action(QString s)
return a;
}
-QString DiscoItem::action2string(Action a)
+TQString DiscoItem::action2string(Action a)
{
- QString s;
+ TQString s;
if ( a == Update )
s = "update";
else if ( a == Remove )
s = "remove";
else
- s = QString::null;
+ s = TQString::null;
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 4c937dd0..95f61e69 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp
@@ -27,23 +27,23 @@
//#include"xmpp_types.h"
#include"xmpp_vcard.h"
-#include<qregexp.h>
-#include<qvaluelist.h>
+#include<tqregexp.h>
+#include<tqvaluelist.h>
using namespace XMPP;
-static QString lineEncode(QString str)
+static TQString lineEncode(TQString str)
{
- str.replace(QRegExp("\\\\"), "\\\\"); // backslash to double-backslash
- str.replace(QRegExp("\\|"), "\\p"); // pipe to \p
- str.replace(QRegExp("\n"), "\\n"); // newline to \n
+ str.replace(TQRegExp("\\\\"), "\\\\"); // backslash to double-backslash
+ str.replace(TQRegExp("\\|"), "\\p"); // pipe to \p
+ str.replace(TQRegExp("\n"), "\\n"); // newline to \n
return str;
}
-static QString lineDecode(const QString &str)
+static TQString lineDecode(const TQString &str)
{
- QString ret;
+ TQString ret;
for(unsigned int n = 0; n < str.length(); ++n) {
if(str.at(n) == '\\') {
@@ -66,12 +66,12 @@ static QString lineDecode(const QString &str)
return ret;
}
-static Roster xmlReadRoster(const QDomElement &q, bool push)
+static Roster xmlReadRoster(const TQDomElement &q, bool push)
{
Roster r;
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
@@ -115,24 +115,24 @@ JT_Register::~JT_Register()
delete d;
}
-void JT_Register::reg(const QString &user, const QString &pass)
+void JT_Register::reg(const TQString &user, const TQString &pass)
{
d->type = 0;
to = client()->host();
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:register");
iq.appendChild(query);
query.appendChild(textTag(doc(), "username", user));
query.appendChild(textTag(doc(), "password", pass));
}
-void JT_Register::changepw(const QString &pass)
+void JT_Register::changepw(const TQString &pass)
{
d->type = 1;
to = client()->host();
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:register");
iq.appendChild(query);
query.appendChild(textTag(doc(), "username", client()->user()));
@@ -144,7 +144,7 @@ void JT_Register::unreg(const Jid &j)
d->type = 2;
to = j.isEmpty() ? client()->host() : j.full();
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:register");
iq.appendChild(query);
@@ -160,7 +160,7 @@ void JT_Register::getForm(const Jid &j)
d->type = 3;
to = j;
iq = createIQ(doc(), "get", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:register");
iq.appendChild(query);
}
@@ -170,7 +170,7 @@ void JT_Register::setForm(const Form &form)
d->type = 4;
to = form.jid();
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:register");
iq.appendChild(query);
@@ -195,7 +195,7 @@ void JT_Register::onGo()
send(iq);
}
-bool JT_Register::take(const QDomElement &x)
+bool JT_Register::take(const TQDomElement &x)
{
if(!iqVerify(x, to, id()))
return false;
@@ -206,9 +206,9 @@ bool JT_Register::take(const QDomElement &x)
d->form.clear();
d->form.setJid(from);
- QDomElement q = queryTag(x);
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQDomElement q = queryTag(x);
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
@@ -270,7 +270,7 @@ void JT_UnRegister::onGo()
d->jt_reg = new JT_Register(this);
d->jt_reg->getForm(d->j);
- connect(d->jt_reg, SIGNAL(finished()), SLOT(getFormFinished()));
+ connect(d->jt_reg, TQT_SIGNAL(finished()), TQT_SLOT(getFormFinished()));
d->jt_reg->go(false);
}
@@ -279,7 +279,7 @@ void JT_UnRegister::getFormFinished()
disconnect(d->jt_reg, 0, this, 0);
d->jt_reg->unreg(d->j);
- connect(d->jt_reg, SIGNAL(finished()), SLOT(unregFinished()));
+ connect(d->jt_reg, TQT_SIGNAL(finished()), TQT_SLOT(unregFinished()));
d->jt_reg->go(false);
}
@@ -303,7 +303,7 @@ public:
Private() {}
Roster roster;
- QValueList<QDomElement> itemList;
+ TQValueList<TQDomElement> itemList;
};
JT_Roster::JT_Roster(Task *parent)
@@ -323,20 +323,20 @@ void JT_Roster::get()
type = 0;
//to = client()->host();
iq = createIQ(doc(), "get", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:roster");
iq.appendChild(query);
}
-void JT_Roster::set(const Jid &jid, const QString &name, const QStringList &groups)
+void JT_Roster::set(const Jid &jid, const TQString &name, const TQStringList &groups)
{
type = 1;
//to = client()->host();
- QDomElement item = doc()->createElement("item");
+ TQDomElement item = doc()->createElement("item");
item.setAttribute("jid", jid.full());
if(!name.isEmpty())
item.setAttribute("name", name);
- for(QStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it)
+ for(TQStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it)
item.appendChild(textTag(doc(), "group", *it));
d->itemList += item;
}
@@ -345,7 +345,7 @@ void JT_Roster::remove(const Jid &jid)
{
type = 1;
//to = client()->host();
- QDomElement item = doc()->createElement("item");
+ TQDomElement item = doc()->createElement("item");
item.setAttribute("jid", jid.full());
item.setAttribute("subscription", "remove");
d->itemList += item;
@@ -358,10 +358,10 @@ void JT_Roster::onGo()
else if(type == 1) {
//to = client()->host();
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:roster");
iq.appendChild(query);
- for(QValueList<QDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it)
+ for(TQValueList<TQDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it)
query.appendChild(*it);
send(iq);
}
@@ -372,25 +372,25 @@ const Roster & JT_Roster::roster() const
return d->roster;
}
-QString JT_Roster::toString() const
+TQString JT_Roster::toString() const
{
if(type != 1)
return "";
- QDomElement i = doc()->createElement("request");
+ TQDomElement i = doc()->createElement("request");
i.setAttribute("type", "JT_Roster");
- for(QValueList<QDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it)
+ for(TQValueList<TQDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it)
i.appendChild(*it);
return lineEncode(Stream::xmlToString(i));
return "";
}
-bool JT_Roster::fromString(const QString &str)
+bool JT_Roster::fromString(const TQString &str)
{
- QDomDocument *dd = new QDomDocument;
+ TQDomDocument *dd = new QDomDocument;
if(!dd->setContent(lineDecode(str).utf8()))
return false;
- QDomElement e = doc()->importNode(dd->documentElement(), true).toElement();
+ TQDomElement e = doc()->importNode(dd->documentElement(), true).toElement();
delete dd;
if(e.tagName() != "request" || e.attribute("type") != "JT_Roster")
@@ -398,8 +398,8 @@ bool JT_Roster::fromString(const QString &str)
type = 1;
d->itemList.clear();
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
d->itemList += i;
@@ -408,7 +408,7 @@ bool JT_Roster::fromString(const QString &str)
return true;
}
-bool JT_Roster::take(const QDomElement &x)
+bool JT_Roster::take(const TQDomElement &x)
{
if(!iqVerify(x, client()->host(), id()))
return false;
@@ -416,7 +416,7 @@ bool JT_Roster::take(const QDomElement &x)
// get
if(type == 0) {
if(x.attribute("type") == "result") {
- QDomElement q = queryTag(x);
+ TQDomElement q = queryTag(x);
d->roster = xmlReadRoster(q, false);
setSuccess();
}
@@ -457,7 +457,7 @@ JT_PushRoster::~JT_PushRoster()
{
}
-bool JT_PushRoster::take(const QDomElement &e)
+bool JT_PushRoster::take(const TQDomElement &e)
{
// must be an iq-set tag
if(e.tagName() != "iq" || e.attribute("type") != "set")
@@ -504,21 +504,21 @@ void JT_Presence::pres(const Status &s)
if(!s.status().isEmpty())
tag.appendChild(textTag(doc(), "status", s.status()));
- tag.appendChild( textTag(doc(), "priority", QString("%1").arg(s.priority()) ) );
+ tag.appendChild( textTag(doc(), "priority", TQString("%1").arg(s.priority()) ) );
if(!s.keyID().isEmpty()) {
- QDomElement x = textTag(doc(), "x", s.keyID());
+ TQDomElement x = textTag(doc(), "x", s.keyID());
x.setAttribute("xmlns", "http://jabber.org/protocol/e2e");
tag.appendChild(x);
}
if(!s.xsigned().isEmpty()) {
- QDomElement x = textTag(doc(), "x", s.xsigned());
+ TQDomElement x = textTag(doc(), "x", s.xsigned());
x.setAttribute("xmlns", "jabber:x:signed");
tag.appendChild(x);
}
if(!s.capsNode().isEmpty() && !s.capsVersion().isEmpty()) {
- QDomElement c = doc()->createElement("c");
+ TQDomElement c = doc()->createElement("c");
c.setAttribute("xmlns","http://jabber.org/protocol/caps");
c.setAttribute("node",s.capsNode());
c.setAttribute("ver",s.capsVersion());
@@ -535,7 +535,7 @@ void JT_Presence::pres(const Jid &to, const Status &s)
tag.setAttribute("to", to.full());
}
-void JT_Presence::sub(const Jid &to, const QString &subType)
+void JT_Presence::sub(const Jid &to, const TQString &subType)
{
type = 1;
@@ -563,7 +563,7 @@ JT_PushPresence::~JT_PushPresence()
{
}
-bool JT_PushPresence::take(const QDomElement &e)
+bool JT_PushPresence::take(const TQDomElement &e)
{
if(e.tagName() != "presence")
return false;
@@ -572,12 +572,12 @@ bool JT_PushPresence::take(const QDomElement &e)
Status p;
if(e.hasAttribute("type")) {
- QString type = e.attribute("type");
+ TQString type = e.attribute("type");
if(type == "unavailable") {
p.setIsAvailable(false);
}
else if(type == "error") {
- QString str = "";
+ TQString str = "";
int code = 0;
getErrorFromElement(e, &code, &str);
p.setError(code, str);
@@ -588,7 +588,7 @@ bool JT_PushPresence::take(const QDomElement &e)
}
}
- QDomElement tag;
+ TQDomElement tag;
bool found;
tag = findSubTag(e, "status", &found);
@@ -601,23 +601,23 @@ bool JT_PushPresence::take(const QDomElement &e)
if(found)
p.setPriority(tagContent(tag).toInt());
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == "x" && i.attribute("xmlns") == "jabber:x:delay") {
if(i.hasAttribute("stamp")) {
- QDateTime dt;
+ TQDateTime dt;
if(stamp2TS(i.attribute("stamp"), &dt))
dt = dt.addSecs(client()->timeZoneOffset() * 3600);
p.setTimeStamp(dt);
}
}
else if(i.tagName() == "x" && i.attribute("xmlns") == "gabber:x:music:info") {
- QDomElement t;
+ TQDomElement t;
bool found;
- QString title, state;
+ TQString title, state;
t = findSubTag(i, "title", &found);
if(found)
@@ -651,17 +651,17 @@ bool JT_PushPresence::take(const QDomElement &e)
//----------------------------------------------------------------------------
// JT_Message
//----------------------------------------------------------------------------
-static QDomElement oldStyleNS(const QDomElement &e)
+static TQDomElement oldStyleNS(const TQDomElement &e)
{
// find closest parent with a namespace
- QDomNode par = e.parentNode();
+ TQDomNode par = e.parentNode();
while(!par.isNull() && par.namespaceURI().isNull())
par = par.parentNode();
bool noShowNS = false;
if(!par.isNull() && par.namespaceURI() == e.namespaceURI())
noShowNS = true;
- QDomElement i;
+ TQDomElement i;
uint x;
//if(noShowNS)
i = e.ownerDocument().createElement(e.tagName());
@@ -669,7 +669,7 @@ static QDomElement oldStyleNS(const QDomElement &e)
// i = e.ownerDocument().createElementNS(e.namespaceURI(), e.tagName());
// copy attributes
- QDomNamedNodeMap al = e.attributes();
+ TQDomNamedNodeMap al = e.attributes();
for(x = 0; x < al.count(); ++x)
i.setAttributeNode(al.item(x).cloneNode().toAttr());
@@ -677,9 +677,9 @@ static QDomElement oldStyleNS(const QDomElement &e)
i.setAttribute("xmlns", e.namespaceURI());
// copy children
- QDomNodeList nl = e.childNodes();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x) {
- QDomNode n = nl.item(x);
+ TQDomNode n = nl.item(x);
if(n.isElement())
i.appendChild(oldStyleNS(n.toElement()));
else
@@ -702,7 +702,7 @@ JT_Message::~JT_Message()
void JT_Message::onGo()
{
Stanza s = m.toStanza(&(client()->stream()));
- QDomElement e = oldStyleNS(s.element());
+ TQDomElement e = oldStyleNS(s.element());
send(e);
setSuccess();
}
@@ -711,41 +711,41 @@ void JT_Message::onGo()
//----------------------------------------------------------------------------
// JT_PushMessage
//----------------------------------------------------------------------------
-static QDomElement addCorrectNS(const QDomElement &e)
+static TQDomElement addCorrectNS(const TQDomElement &e)
{
uint x;
// grab child nodes
- /*QDomDocumentFragment frag = e.ownerDocument().createDocumentFragment();
- QDomNodeList nl = e.childNodes();
+ /*TQDomDocumentFragment frag = e.ownerDocument().createDocumentFragment();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x)
frag.appendChild(nl.item(x).cloneNode());*/
// find closest xmlns
- QDomNode n = e;
+ TQDomNode n = e;
while(!n.isNull() && !n.toElement().hasAttribute("xmlns"))
n = n.parentNode();
- QString ns;
+ TQString ns;
if(n.isNull() || !n.toElement().hasAttribute("xmlns"))
ns = "jabber:client";
else
ns = n.toElement().attribute("xmlns");
// make a new node
- QDomElement i = e.ownerDocument().createElementNS(ns, e.tagName());
+ TQDomElement i = e.ownerDocument().createElementNS(ns, e.tagName());
// copy attributes
- QDomNamedNodeMap al = e.attributes();
+ TQDomNamedNodeMap al = e.attributes();
for(x = 0; x < al.count(); ++x) {
- QDomAttr a = al.item(x).toAttr();
+ TQDomAttr a = al.item(x).toAttr();
if(a.name() != "xmlns")
i.setAttributeNodeNS(al.item(x).cloneNode().toAttr());
}
// copy children
- QDomNodeList nl = e.childNodes();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x) {
- QDomNode n = nl.item(x);
+ TQDomNode n = nl.item(x);
if(n.isElement())
i.appendChild(addCorrectNS(n.toElement()));
else
@@ -765,7 +765,7 @@ JT_PushMessage::~JT_PushMessage()
{
}
-bool JT_PushMessage::take(const QDomElement &e)
+bool JT_PushMessage::take(const TQDomElement &e)
{
if(e.tagName() != "message")
return false;
@@ -796,7 +796,7 @@ public:
Private() {}
int seconds;
- QString message;
+ TQString message;
};
JT_GetLastActivity::JT_GetLastActivity(Task *parent)
@@ -814,7 +814,7 @@ void JT_GetLastActivity::get(const Jid &j)
{
jid = j;
iq = createIQ(doc(), "get", jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:last");
iq.appendChild(query);
}
@@ -824,7 +824,7 @@ int JT_GetLastActivity::seconds() const
return d->seconds;
}
-const QString &JT_GetLastActivity::message() const
+const TQString &JT_GetLastActivity::message() const
{
return d->message;
}
@@ -834,13 +834,13 @@ void JT_GetLastActivity::onGo()
send(iq);
}
-bool JT_GetLastActivity::take(const QDomElement &x)
+bool JT_GetLastActivity::take(const TQDomElement &x)
{
if(!iqVerify(x, jid, id()))
return false;
if(x.attribute("type") == "result") {
- QDomElement q = queryTag(x);
+ TQDomElement q = queryTag(x);
d->message = q.text();
bool ok;
@@ -869,7 +869,7 @@ void JT_GetServices::get(const Jid &j)
jid = j;
iq = createIQ(doc(), "get", jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:agents");
iq.appendChild(query);
}
@@ -884,17 +884,17 @@ void JT_GetServices::onGo()
send(iq);
}
-bool JT_GetServices::take(const QDomElement &x)
+bool JT_GetServices::take(const TQDomElement &x)
{
if(!iqVerify(x, jid, id()))
return false;
if(x.attribute("type") == "result") {
- QDomElement q = queryTag(x);
+ TQDomElement q = queryTag(x);
// agents
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
@@ -903,7 +903,7 @@ bool JT_GetServices::take(const QDomElement &x)
a.setJid(Jid(i.attribute("jid")));
- QDomElement tag;
+ TQDomElement tag;
bool found;
tag = findSubTag(i, "name", &found);
@@ -911,7 +911,7 @@ bool JT_GetServices::take(const QDomElement &x)
a.setName(tagContent(tag));
// determine which namespaces does item support
- QStringList ns;
+ TQStringList ns;
tag = findSubTag(i, "register", &found);
if(found)
@@ -950,7 +950,7 @@ class JT_VCard::Private
public:
Private() {}
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
VCard vcard;
};
@@ -972,7 +972,7 @@ void JT_VCard::get(const Jid &_jid)
type = 0;
d->jid = _jid;
d->iq = createIQ(doc(), "get", d->jid.full(), id());
- QDomElement v = doc()->createElement("vCard");
+ TQDomElement v = doc()->createElement("vCard");
v.setAttribute("xmlns", "vcard-temp");
v.setAttribute("version", "2.0");
v.setAttribute("prodid", "-//HandGen//NONSGML vGen v1.0//EN");
@@ -1003,7 +1003,7 @@ void JT_VCard::onGo()
send(d->iq);
}
-bool JT_VCard::take(const QDomElement &x)
+bool JT_VCard::take(const TQDomElement &x)
{
Jid to = d->jid;
if (to.userHost() == client()->jid().userHost())
@@ -1013,8 +1013,8 @@ bool JT_VCard::take(const QDomElement &x)
if(x.attribute("type") == "result") {
if(type == 0) {
- for(QDomNode n = x.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement q = n.toElement();
+ for(TQDomNode n = x.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement q = n.toElement();
if(q.isNull())
continue;
@@ -1052,7 +1052,7 @@ public:
Jid jid;
Form form;
- QValueList<SearchResult> resultList;
+ TQValueList<SearchResult> resultList;
};
JT_Search::JT_Search(Task *parent)
@@ -1072,7 +1072,7 @@ void JT_Search::get(const Jid &jid)
type = 0;
d->jid = jid;
iq = createIQ(doc(), "get", d->jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:search");
iq.appendChild(query);
}
@@ -1082,7 +1082,7 @@ void JT_Search::set(const Form &form)
type = 1;
d->jid = form.jid();
iq = createIQ(doc(), "set", d->jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:search");
iq.appendChild(query);
@@ -1102,7 +1102,7 @@ const Form & JT_Search::form() const
return d->form;
}
-const QValueList<SearchResult> & JT_Search::results() const
+const TQValueList<SearchResult> & JT_Search::results() const
{
return d->resultList;
}
@@ -1112,7 +1112,7 @@ void JT_Search::onGo()
send(iq);
}
-bool JT_Search::take(const QDomElement &x)
+bool JT_Search::take(const TQDomElement &x)
{
if(!iqVerify(x, d->jid, id()))
return false;
@@ -1123,9 +1123,9 @@ bool JT_Search::take(const QDomElement &x)
d->form.clear();
d->form.setJid(from);
- QDomElement q = queryTag(x);
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQDomElement q = queryTag(x);
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
@@ -1145,16 +1145,16 @@ bool JT_Search::take(const QDomElement &x)
else {
d->resultList.clear();
- QDomElement q = queryTag(x);
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQDomElement q = queryTag(x);
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == "item") {
SearchResult r(Jid(i.attribute("jid")));
- QDomElement tag;
+ TQDomElement tag;
bool found;
tag = findSubTag(i, "nick", &found);
@@ -1196,7 +1196,7 @@ void JT_ClientVersion::get(const Jid &jid)
{
j = jid;
iq = createIQ(doc(), "get", j.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:version");
iq.appendChild(query);
}
@@ -1206,15 +1206,15 @@ void JT_ClientVersion::onGo()
send(iq);
}
-bool JT_ClientVersion::take(const QDomElement &x)
+bool JT_ClientVersion::take(const TQDomElement &x)
{
if(!iqVerify(x, j, id()))
return false;
if(x.attribute("type") == "result") {
bool found;
- QDomElement q = queryTag(x);
- QDomElement tag;
+ TQDomElement q = queryTag(x);
+ TQDomElement tag;
tag = findSubTag(q, "name", &found);
if(found)
v_name = tagContent(tag);
@@ -1239,17 +1239,17 @@ const Jid & JT_ClientVersion::jid() const
return j;
}
-const QString & JT_ClientVersion::name() const
+const TQString & JT_ClientVersion::name() const
{
return v_name;
}
-const QString & JT_ClientVersion::version() const
+const TQString & JT_ClientVersion::version() const
{
return v_ver;
}
-const QString & JT_ClientVersion::os() const
+const TQString & JT_ClientVersion::os() const
{
return v_os;
}
@@ -1263,7 +1263,7 @@ const QString & JT_ClientVersion::os() const
{
j = _j;
iq = createIQ("get", j.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:time");
iq.appendChild(query);
}
@@ -1273,15 +1273,15 @@ void JT_ClientTime::go()
send(iq);
}
-bool JT_ClientTime::take(const QDomElement &x)
+bool JT_ClientTime::take(const TQDomElement &x)
{
if(x.attribute("id") != id())
return FALSE;
if(x.attribute("type") == "result") {
bool found;
- QDomElement q = queryTag(x);
- QDomElement tag;
+ TQDomElement q = queryTag(x);
+ TQDomElement tag;
tag = findSubTag(q, "utc", &found);
if(found)
stamp2TS(tagContent(tag), &utc);
@@ -1316,15 +1316,15 @@ JT_ServInfo::~JT_ServInfo()
{
}
-bool JT_ServInfo::take(const QDomElement &e)
+bool JT_ServInfo::take(const TQDomElement &e)
{
if(e.tagName() != "iq" || e.attribute("type") != "get")
return false;
- QString ns = queryNS(e);
+ TQString ns = queryNS(e);
if(ns == "jabber:iq:version") {
- QDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
- QDomElement query = doc()->createElement("query");
+ TQDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:version");
iq.appendChild(query);
query.appendChild(textTag(doc(), "name", client()->clientName()));
@@ -1334,29 +1334,29 @@ bool JT_ServInfo::take(const QDomElement &e)
return true;
}
//else if(ns == "jabber:iq:time") {
- // QDomElement iq = createIQ("result", e.attribute("from"), e.attribute("id"));
- // QDomElement query = doc()->createElement("query");
+ // TQDomElement iq = createIQ("result", e.attribute("from"), e.attribute("id"));
+ // TQDomElement query = doc()->createElement("query");
// query.setAttribute("xmlns", "jabber:iq:time");
// iq.appendChild(query);
- // QDateTime local = QDateTime::currentDateTime();
- // QDateTime utc = local.addSecs(-getTZOffset() * 3600);
- // QString str = getTZString();
+ // TQDateTime local = TQDateTime::currentDateTime();
+ // TQDateTime utc = local.addSecs(-getTZOffset() * 3600);
+ // TQString str = getTZString();
// query.appendChild(textTag("utc", TS2stamp(utc)));
// query.appendChild(textTag("tz", str));
- // query.appendChild(textTag("display", QString("%1 %2").arg(local.toString()).arg(str)));
+ // query.appendChild(textTag("display", TQString("%1 %2").arg(local.toString()).arg(str)));
// send(iq);
// return TRUE;
//}
else if(ns == "http://jabber.org/protocol/disco#info") {
// Find out the node
- QString node;
+ TQString node;
bool found;
- QDomElement q = findSubTag(e, "query", &found);
+ TQDomElement q = findSubTag(e, "query", &found);
if(found) // NOTE: Should always be true, since a NS was found above
node = q.attribute("node");
- QDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
- QDomElement query = doc()->createElement("query");
+ TQDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/disco#info");
if (!node.isEmpty())
query.setAttribute("node", node);
@@ -1364,7 +1364,7 @@ bool JT_ServInfo::take(const QDomElement &e)
// Identity
DiscoItem::Identity identity = client()->identity();
- QDomElement id = doc()->createElement("identity");
+ TQDomElement id = doc()->createElement("identity");
if (!identity.category.isEmpty() && !identity.type.isEmpty()) {
id.setAttribute("category",identity.category);
id.setAttribute("type",identity.type);
@@ -1379,7 +1379,7 @@ bool JT_ServInfo::take(const QDomElement &e)
}
query.appendChild(id);
- QDomElement feature;
+ TQDomElement feature;
if (node.isEmpty() || node == client()->capsNode() + "#" + client()->capsVersion()) {
// Standard features
feature = doc()->createElement("feature");
@@ -1404,10 +1404,10 @@ bool JT_ServInfo::take(const QDomElement &e)
if (node.isEmpty()) {
// Extended features
- QStringList exts = client()->extensions();
- for (QStringList::ConstIterator i = exts.begin(); i != exts.end(); ++i) {
- const QStringList& l = client()->extension(*i).list();
- for ( QStringList::ConstIterator j = l.begin(); j != l.end(); ++j ) {
+ TQStringList exts = client()->extensions();
+ for (TQStringList::ConstIterator i = exts.begin(); i != exts.end(); ++i) {
+ const TQStringList& l = client()->extension(*i).list();
+ for ( TQStringList::ConstIterator j = l.begin(); j != l.end(); ++j ) {
feature = doc()->createElement("feature");
feature.setAttribute("var", *j);
query.appendChild(feature);
@@ -1416,10 +1416,10 @@ bool JT_ServInfo::take(const QDomElement &e)
}
}
else if (node.startsWith(client()->capsNode() + "#")) {
- QString ext = node.right(node.length()-client()->capsNode().length()-1);
+ TQString ext = node.right(node.length()-client()->capsNode().length()-1);
if (client()->extensions().contains(ext)) {
- const QStringList& l = client()->extension(ext).list();
- for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+ const TQStringList& l = client()->extension(ext).list();
+ for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
feature = doc()->createElement("feature");
feature.setAttribute("var", *it);
query.appendChild(feature);
@@ -1455,18 +1455,18 @@ void JT_Gateway::get(const Jid &jid)
type = 0;
v_jid = jid;
iq = createIQ(doc(), "get", v_jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:gateway");
iq.appendChild(query);
}
-void JT_Gateway::set(const Jid &jid, const QString &prompt)
+void JT_Gateway::set(const Jid &jid, const TQString &prompt)
{
type = 1;
v_jid = jid;
v_prompt = prompt;
iq = createIQ(doc(), "set", v_jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:gateway");
iq.appendChild(query);
query.appendChild(textTag(doc(), "prompt", v_prompt));
@@ -1482,26 +1482,26 @@ Jid JT_Gateway::jid() const
return v_jid;
}
-QString JT_Gateway::desc() const
+TQString JT_Gateway::desc() const
{
return v_desc;
}
-QString JT_Gateway::prompt() const
+TQString JT_Gateway::prompt() const
{
return v_prompt;
}
-bool JT_Gateway::take(const QDomElement &x)
+bool JT_Gateway::take(const TQDomElement &x)
{
if(!iqVerify(x, v_jid, id()))
return false;
if(x.attribute("type") == "result") {
if(type == 0) {
- QDomElement query = queryTag(x);
+ TQDomElement query = queryTag(x);
bool found;
- QDomElement tag;
+ TQDomElement tag;
tag = findSubTag(query, "desc", &found);
if(found)
v_desc = tagContent(tag);
@@ -1510,9 +1510,9 @@ bool JT_Gateway::take(const QDomElement &x)
v_prompt = tagContent(tag);
}
else {
- QDomElement query = queryTag(x);
+ TQDomElement query = queryTag(x);
bool found;
- QDomElement tag;
+ TQDomElement tag;
tag = findSubTag(query, "prompt", &found);
if(found)
v_prompt = tagContent(tag);
@@ -1533,7 +1533,7 @@ bool JT_Gateway::take(const QDomElement &x)
class JT_Browse::Private
{
public:
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
AgentList agentList;
AgentItem root;
@@ -1556,7 +1556,7 @@ void JT_Browse::get (const Jid &j)
d->jid = j;
d->iq = createIQ(doc(), "get", d->jid.full(), id());
- QDomElement query = doc()->createElement("item");
+ TQDomElement query = doc()->createElement("item");
query.setAttribute("xmlns", "jabber:iq:browse");
d->iq.appendChild(query);
}
@@ -1576,7 +1576,7 @@ void JT_Browse::onGo ()
send(d->iq);
}
-AgentItem JT_Browse::browseHelper (const QDomElement &i)
+AgentItem JT_Browse::browseHelper (const TQDomElement &i)
{
AgentItem a;
@@ -1598,9 +1598,9 @@ AgentItem JT_Browse::browseHelper (const QDomElement &i)
a.setType ( i.attribute("type") );
- QStringList ns;
- for(QDomNode n = i.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQStringList ns;
+ for(TQDomNode n = i.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
@@ -1618,21 +1618,21 @@ AgentItem JT_Browse::browseHelper (const QDomElement &i)
return a;
}
-bool JT_Browse::take(const QDomElement &x)
+bool JT_Browse::take(const TQDomElement &x)
{
if(!iqVerify(x, d->jid, id()))
return false;
if(x.attribute("type") == "result") {
- for(QDomNode n = x.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = x.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
d->root = browseHelper (i);
- for(QDomNode nn = i.firstChild(); !nn.isNull(); nn = nn.nextSibling()) {
- QDomElement e = nn.toElement();
+ for(TQDomNode nn = i.firstChild(); !nn.isNull(); nn = nn.nextSibling()) {
+ TQDomElement e = nn.toElement();
if ( e.isNull() )
continue;
if ( e.tagName() == "ns" )
@@ -1659,7 +1659,7 @@ class JT_DiscoItems::Private
public:
Private() { }
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
DiscoList items;
};
@@ -1680,13 +1680,13 @@ void JT_DiscoItems::get(const DiscoItem &item)
get(item.jid(), item.node());
}
-void JT_DiscoItems::get (const Jid &j, const QString &node)
+void JT_DiscoItems::get (const Jid &j, const TQString &node)
{
d->items.clear();
d->jid = j;
d->iq = createIQ(doc(), "get", d->jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/disco#items");
if ( !node.isEmpty() )
@@ -1705,16 +1705,16 @@ void JT_DiscoItems::onGo ()
send(d->iq);
}
-bool JT_DiscoItems::take(const QDomElement &x)
+bool JT_DiscoItems::take(const TQDomElement &x)
{
if(!iqVerify(x, d->jid, id()))
return false;
if(x.attribute("type") == "result") {
- QDomElement q = queryTag(x);
+ TQDomElement q = queryTag(x);
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement e = n.toElement();
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement e = n.toElement();
if( e.isNull() )
continue;
@@ -1747,9 +1747,9 @@ class JT_DiscoInfo::Private
public:
Private() { }
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
- QString node;
+ TQString node;
DiscoItem item;
};
@@ -1772,21 +1772,21 @@ void JT_DiscoInfo::get(const DiscoItem &item)
get(item.jid(), item.node(), id);
}
-void JT_DiscoInfo::get (const Jid &j, const QString &node, DiscoItem::Identity ident)
+void JT_DiscoInfo::get (const Jid &j, const TQString &node, DiscoItem::Identity ident)
{
d->item = DiscoItem(); // clear item
d->jid = j;
d->node = node;
d->iq = createIQ(doc(), "get", d->jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/disco#info");
if ( !node.isEmpty() )
query.setAttribute("node", node);
if ( !ident.category.isEmpty() && !ident.type.isEmpty() ) {
- QDomElement i = doc()->createElement("item");
+ TQDomElement i = doc()->createElement("item");
i.setAttribute("category", ident.category);
i.setAttribute("type", ident.type);
@@ -1816,7 +1816,7 @@ const Jid& JT_DiscoInfo::jid() const
* Is here because sometimes the responder does not include this information
* in the reply.
*/
-const QString& JT_DiscoInfo::node() const
+const TQString& JT_DiscoInfo::node() const
{
return d->node;
}
@@ -1833,24 +1833,24 @@ void JT_DiscoInfo::onGo ()
send(d->iq);
}
-bool JT_DiscoInfo::take(const QDomElement &x)
+bool JT_DiscoInfo::take(const TQDomElement &x)
{
if(!iqVerify(x, d->jid, id()))
return false;
if(x.attribute("type") == "result") {
- QDomElement q = queryTag(x);
+ TQDomElement q = queryTag(x);
DiscoItem item;
item.setJid( d->jid );
item.setNode( q.attribute("node") );
- QStringList features;
+ TQStringList features;
DiscoItem::Identities identities;
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement e = n.toElement();
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement e = n.toElement();
if( e.isNull() )
continue;
@@ -1890,7 +1890,7 @@ class JT_DiscoPublish::Private
public:
Private() { }
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
DiscoList list;
};
@@ -1912,7 +1912,7 @@ void JT_DiscoPublish::set(const Jid &j, const DiscoList &list)
d->jid = j;
d->iq = createIQ(doc(), "set", d->jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/disco#items");
// FIXME: unsure about this
@@ -1921,7 +1921,7 @@ void JT_DiscoPublish::set(const Jid &j, const DiscoList &list)
DiscoList::ConstIterator it = list.begin();
for ( ; it != list.end(); ++it) {
- QDomElement w = doc()->createElement("item");
+ TQDomElement w = doc()->createElement("item");
w.setAttribute("jid", (*it).jid().full());
if ( !(*it).name().isEmpty() )
@@ -1941,7 +1941,7 @@ void JT_DiscoPublish::onGo ()
send(d->iq);
}
-bool JT_DiscoPublish::take(const QDomElement &x)
+bool JT_DiscoPublish::take(const TQDomElement &x)
{
if(!iqVerify(x, d->jid, id()))
return false;
@@ -1988,21 +1988,21 @@ void JT_MucPresence::pres(const Status &s)
if(!s.status().isEmpty())
tag.appendChild(textTag(doc(), "status", s.status()));
- tag.appendChild( textTag(doc(), "priority", QString("%1").arg(s.priority()) ) );
+ tag.appendChild( textTag(doc(), "priority", TQString("%1").arg(s.priority()) ) );
if(!s.keyID().isEmpty()) {
- QDomElement x = textTag(doc(), "x", s.keyID());
+ TQDomElement x = textTag(doc(), "x", s.keyID());
x.setAttribute("xmlns", "http://jabber.org/protocol/e2e");
tag.appendChild(x);
}
if(!s.xsigned().isEmpty()) {
- QDomElement x = textTag(doc(), "x", s.xsigned());
+ TQDomElement x = textTag(doc(), "x", s.xsigned());
x.setAttribute("xmlns", "jabber:x:signed");
tag.appendChild(x);
}
if(!s.capsNode().isEmpty() && !s.capsVersion().isEmpty()) {
- QDomElement c = doc()->createElement("c");
+ TQDomElement c = doc()->createElement("c");
c.setAttribute("xmlns","http://jabber.org/protocol/caps");
c.setAttribute("node",s.capsNode());
c.setAttribute("ver",s.capsVersion());
@@ -2013,11 +2013,11 @@ void JT_MucPresence::pres(const Status &s)
}
}
-void JT_MucPresence::pres(const Jid &to, const Status &s, const QString &password)
+void JT_MucPresence::pres(const Jid &to, const Status &s, const TQString &password)
{
pres(s);
tag.setAttribute("to", to.full());
- QDomElement x = textTag(doc(), "x", s.xsigned());
+ TQDomElement x = textTag(doc(), "x", s.xsigned());
x.setAttribute("xmlns", "http://jabber.org/protocol/muc");
x.appendChild( textTag(doc(), "password", password.latin1()) );
tag.appendChild(x);
@@ -2038,8 +2038,8 @@ class JT_PrivateStorage::Private
public:
Private() : type(-1) {}
- QDomElement iq;
- QDomElement elem;
+ TQDomElement iq;
+ TQDomElement elem;
int type;
};
@@ -2054,27 +2054,27 @@ JT_PrivateStorage::~JT_PrivateStorage()
delete d;
}
-void JT_PrivateStorage::get(const QString& tag, const QString& xmlns)
+void JT_PrivateStorage::get(const TQString& tag, const TQString& xmlns)
{
d->type = 0;
- d->iq = createIQ(doc(), "get" , QString() , id() );
- QDomElement query = doc()->createElement("query");
+ d->iq = createIQ(doc(), "get" , TQString() , id() );
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:private");
d->iq.appendChild(query);
- QDomElement s = doc()->createElement(tag);
+ TQDomElement s = doc()->createElement(tag);
if(!xmlns.isEmpty())
s.setAttribute("xmlns", xmlns);
query.appendChild(s);
}
-void JT_PrivateStorage::set(const QDomElement& element)
+void JT_PrivateStorage::set(const TQDomElement& element)
{
d->type = 1;
d->elem=element;
- QDomNode n=doc()->importNode(element,true);
+ TQDomNode n=doc()->importNode(element,true);
- d->iq = createIQ(doc(), "set" , QString() , id() );
- QDomElement query = doc()->createElement("query");
+ d->iq = createIQ(doc(), "set" , TQString() , id() );
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:private");
d->iq.appendChild(query);
query.appendChild(n);
@@ -2085,17 +2085,17 @@ void JT_PrivateStorage::onGo()
send(d->iq);
}
-bool JT_PrivateStorage::take(const QDomElement &x)
+bool JT_PrivateStorage::take(const TQDomElement &x)
{
- QString to = client()->host();
+ TQString to = client()->host();
if(!iqVerify(x, to, id()))
return false;
if(x.attribute("type") == "result") {
if(d->type == 0) {
- QDomElement q = queryTag(x);
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQDomElement q = queryTag(x);
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
d->elem=i;
@@ -2113,7 +2113,7 @@ bool JT_PrivateStorage::take(const QDomElement &x)
}
-QDomElement JT_PrivateStorage::element( )
+TQDomElement JT_PrivateStorage::element( )
{
return d->elem;
}
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 bf1cc44d..c8085013 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h
@@ -21,8 +21,8 @@
#ifndef JABBER_TASKS_H
#define JABBER_TASKS_H
-#include<qstring.h>
-#include<qdom.h>
+#include<tqstring.h>
+#include<tqdom.h>
#include"im.h"
#include"xmpp_vcard.h"
@@ -39,8 +39,8 @@ namespace XMPP
JT_Register(Task *parent);
~JT_Register();
- void reg(const QString &user, const QString &pass);
- void changepw(const QString &pass);
+ void reg(const TQString &user, const TQString &pass);
+ void changepw(const TQString &pass);
void unreg(const Jid &j="");
const Form & form() const;
@@ -48,10 +48,10 @@ namespace XMPP
void setForm(const Form &);
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
- QDomElement iq;
+ TQDomElement iq;
Jid to;
class Private;
@@ -86,20 +86,20 @@ namespace XMPP
~JT_Roster();
void get();
- void set(const Jid &, const QString &name, const QStringList &groups);
+ void set(const Jid &, const TQString &name, const TQStringList &groups);
void remove(const Jid &);
const Roster & roster() const;
- QString toString() const;
- bool fromString(const QString &);
+ TQString toString() const;
+ bool fromString(const TQString &);
void onGo();
- bool take(const QDomElement &x);
+ bool take(const TQDomElement &x);
private:
int type;
- QDomElement iq;
+ TQDomElement iq;
Jid to;
class Private;
@@ -113,7 +113,7 @@ namespace XMPP
JT_PushRoster(Task *parent);
~JT_PushRoster();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
signals:
void roster(const Roster &);
@@ -132,12 +132,12 @@ namespace XMPP
void pres(const Status &);
void pres(const Jid &, const Status &);
- void sub(const Jid &, const QString &subType);
+ void sub(const Jid &, const TQString &subType);
void onGo();
private:
- QDomElement tag;
+ TQDomElement tag;
int type;
class Private;
@@ -151,11 +151,11 @@ namespace XMPP
JT_PushPresence(Task *parent);
~JT_PushPresence();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
signals:
void presence(const Jid &, const Status &);
- void subscription(const Jid &, const QString &);
+ void subscription(const Jid &, const TQString &);
private:
class Private;
@@ -185,7 +185,7 @@ namespace XMPP
JT_PushMessage(Task *parent);
~JT_PushMessage();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
signals:
void message(const Message &);
@@ -205,16 +205,16 @@ namespace XMPP
void get(const Jid &);
int seconds() const;
- const QString &message() const;
+ const TQString &message() const;
void onGo();
- bool take(const QDomElement &x);
+ bool take(const TQDomElement &x);
private:
class Private;
Private *d;
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
};
@@ -229,13 +229,13 @@ namespace XMPP
const AgentList & agents() const;
void onGo();
- bool take(const QDomElement &x);
+ bool take(const TQDomElement &x);
private:
class Private;
Private *d;
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
AgentList agentList;
};
@@ -254,7 +254,7 @@ namespace XMPP
const VCard & vcard() const;
void onGo();
- bool take(const QDomElement &x);
+ bool take(const TQDomElement &x);
private:
int type;
@@ -271,16 +271,16 @@ namespace XMPP
~JT_Search();
const Form & form() const;
- const QValueList<SearchResult> & results() const;
+ const TQValueList<SearchResult> & results() const;
void get(const Jid &);
void set(const Form &);
void onGo();
- bool take(const QDomElement &x);
+ bool take(const TQDomElement &x);
private:
- QDomElement iq;
+ TQDomElement iq;
int type;
class Private;
@@ -295,18 +295,18 @@ namespace XMPP
void get(const Jid &);
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
const Jid & jid() const;
- const QString & name() const;
- const QString & version() const;
- const QString & os() const;
+ const TQString & name() const;
+ const TQString & version() const;
+ const TQString & os() const;
private:
- QDomElement iq;
+ TQDomElement iq;
Jid j;
- QString v_name, v_ver, v_os;
+ TQString v_name, v_ver, v_os;
};
/*
class JT_ClientTime : public Task
@@ -316,14 +316,14 @@ namespace XMPP
JT_ClientTime(Task *, const Jid &);
void go();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
Jid j;
- QDateTime utc;
- QString timezone, display;
+ TQDateTime utc;
+ TQString timezone, display;
private:
- QDomElement iq;
+ TQDomElement iq;
};
*/
class JT_ServInfo : public Task
@@ -333,7 +333,7 @@ namespace XMPP
JT_ServInfo(Task *);
~JT_ServInfo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
};
class JT_Gateway : public Task
@@ -343,20 +343,20 @@ namespace XMPP
JT_Gateway(Task *);
void get(const Jid &);
- void set(const Jid &, const QString &prompt);
+ void set(const Jid &, const TQString &prompt);
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
Jid jid() const;
- QString desc() const;
- QString prompt() const;
+ TQString desc() const;
+ TQString prompt() const;
private:
- QDomElement iq;
+ TQDomElement iq;
int type;
Jid v_jid;
- QString v_prompt, v_desc;
+ TQString v_prompt, v_desc;
};
class JT_Browse : public Task
@@ -372,13 +372,13 @@ namespace XMPP
const AgentItem & root() const;
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
class Private;
Private *d;
- AgentItem browseHelper (const QDomElement &i);
+ AgentItem browseHelper (const TQDomElement &i);
};
class JT_DiscoItems : public Task
@@ -388,13 +388,13 @@ namespace XMPP
JT_DiscoItems(Task *);
~JT_DiscoItems();
- void get(const Jid &, const QString &node = QString::null);
+ void get(const Jid &, const TQString &node = TQString::null);
void get(const DiscoItem &);
const DiscoList &items() const;
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
class Private;
@@ -408,15 +408,15 @@ namespace XMPP
JT_DiscoInfo(Task *);
~JT_DiscoInfo();
- void get(const Jid &, const QString &node = QString::null, const DiscoItem::Identity = DiscoItem::Identity());
+ void get(const Jid &, const TQString &node = TQString::null, const DiscoItem::Identity = DiscoItem::Identity());
void get(const DiscoItem &);
const DiscoItem &item() const;
const Jid& jid() const;
- const QString& node() const;
+ const TQString& node() const;
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
class Private;
@@ -433,7 +433,7 @@ namespace XMPP
void set(const Jid &, const DiscoList &);
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
class Private;
@@ -448,12 +448,12 @@ namespace XMPP
~JT_MucPresence();
void pres(const Status &);
- void pres(const Jid &, const Status &, const QString &password);
+ void pres(const Jid &, const Status &, const TQString &password);
void onGo();
private:
- QDomElement tag;
+ TQDomElement tag;
int type;
class Private;
@@ -467,13 +467,13 @@ namespace XMPP
JT_PrivateStorage(Task *parent);
~JT_PrivateStorage();
- void set(const QDomElement &);
- void get(const QString &tag, const QString& xmlns);
+ void set(const TQDomElement &);
+ void get(const TQString &tag, const TQString& xmlns);
- QDomElement element();
+ TQDomElement element();
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
class Private;
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 e79d9b9f..5f5214fd 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp
@@ -22,30 +22,30 @@
#include "base64.h"
-#include <qdom.h>
-#include <qdatetime.h>
+#include <tqdom.h>
+#include <tqdatetime.h>
-#include <qimage.h> // needed for image format recognition
-#include <qbuffer.h>
+#include <tqimage.h> // needed for image format recognition
+#include <tqbuffer.h>
// Justin's XML helper functions
-static QDomElement textTag(QDomDocument *doc, const QString &name, const QString &content)
+static TQDomElement textTag(TQDomDocument *doc, const TQString &name, const TQString &content)
{
- QDomElement tag = doc->createElement(name);
- QDomText text = doc->createTextNode(content);
+ TQDomElement tag = doc->createElement(name);
+ TQDomText text = doc->createTextNode(content);
tag.appendChild(text);
return tag;
}
-static QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found)
+static TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found)
{
if(found)
*found = FALSE;
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName().upper() == name.upper()) { // mblsha: ignore case when searching
@@ -55,33 +55,33 @@ static QDomElement findSubTag(const QDomElement &e, const QString &name, bool *f
}
}
- QDomElement tmp;
+ TQDomElement tmp;
return tmp;
}
// mblsha's own functions
-static QDomElement emptyTag(QDomDocument *doc, const QString &name)
+static TQDomElement emptyTag(TQDomDocument *doc, const TQString &name)
{
- QDomElement tag = doc->createElement(name);
+ TQDomElement tag = doc->createElement(name);
return tag;
}
-static bool hasSubTag(const QDomElement &e, const QString &name)
+static bool hasSubTag(const TQDomElement &e, const TQString &name)
{
bool found;
findSubTag(e, name, &found);
return found;
}
-static QString subTagText(const QDomElement &e, const QString &name)
+static TQString subTagText(const TQDomElement &e, const TQString &name)
{
bool found;
- QDomElement i = findSubTag(e, name, &found);
+ TQDomElement i = findSubTag(e, name, &found);
if ( found )
return i.text().stripWhiteSpace();
- return QString::null;
+ return TQString::null;
}
using namespace XMPP;
@@ -89,11 +89,11 @@ using namespace XMPP;
//----------------------------------------------------------------------------
// VCard
//----------------------------------------------------------------------------
-static QString image2type(const QByteArray &ba)
+static TQString image2type(const TQByteArray &ba)
{
- QBuffer buf(ba);
+ TQBuffer buf(ba);
buf.open(IO_ReadOnly);
- QString format = QImageIO::imageFormat( &buf );
+ TQString format = TQImageIO::imageFormat( &buf );
// TODO: add more formats
if ( format == "PNG" || format == "PsiPNG" )
@@ -117,9 +117,9 @@ static QString image2type(const QByteArray &ba)
}
// Long lines of encoded binary data SHOULD BE folded to 75 characters using the folding method defined in [MIME-DIR].
-static QString foldString(const QString &s)
+static TQString foldString(const TQString &s)
{
- QString ret;
+ TQString ret;
for (int i = 0; i < (int)s.length(); i++) {
if ( !(i % 75) )
@@ -136,47 +136,47 @@ public:
Private();
~Private();
- QString version;
- QString fullName;
- QString familyName, givenName, middleName, prefixName, suffixName;
- QString nickName;
+ TQString version;
+ TQString fullName;
+ TQString familyName, givenName, middleName, prefixName, suffixName;
+ TQString nickName;
- QByteArray photo;
- QString photoURI;
+ TQByteArray photo;
+ TQString photoURI;
- QString bday;
+ TQString bday;
AddressList addressList;
LabelList labelList;
PhoneList phoneList;
EmailList emailList;
- QString jid;
- QString mailer;
- QString timezone;
+ TQString jid;
+ TQString mailer;
+ TQString timezone;
Geo geo;
- QString title;
- QString role;
+ TQString title;
+ TQString role;
- QByteArray logo;
- QString logoURI;
+ TQByteArray logo;
+ TQString logoURI;
VCard *agent;
- QString agentURI;
+ TQString agentURI;
Org org;
- QStringList categories;
- QString note;
- QString prodId;
- QString rev;
- QString sortString;
-
- QByteArray sound;
- QString soundURI, soundPhonetic;
-
- QString uid;
- QString url;
- QString desc;
+ TQStringList categories;
+ TQString note;
+ TQString prodId;
+ TQString rev;
+ TQString sortString;
+
+ TQByteArray sound;
+ TQString soundURI, soundPhonetic;
+
+ TQString uid;
+ TQString url;
+ TQString desc;
PrivacyClass privacyClass;
- QByteArray key;
+ TQByteArray key;
bool isEmpty();
};
@@ -263,9 +263,9 @@ VCard::~VCard()
delete d;
}
-QDomElement VCard::toXml(QDomDocument *doc) const
+TQDomElement VCard::toXml(TQDomDocument *doc) const
{
- QDomElement v = doc->createElement("vCard");
+ TQDomElement v = doc->createElement("vCard");
v.setAttribute("version", "2.0");
v.setAttribute("prodid", "-//HandGen//NONSGML vGen v1.0//EN");
v.setAttribute("xmlns", "vcard-temp");
@@ -277,7 +277,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
if ( !d->familyName.isEmpty() || !d->givenName.isEmpty() || !d->middleName.isEmpty() ||
!d->prefixName.isEmpty() || !d->suffixName.isEmpty() ) {
- QDomElement w = doc->createElement("N");
+ TQDomElement w = doc->createElement("N");
if ( !d->familyName.isEmpty() )
w.appendChild( textTag(doc, "FAMILY", d->familyName) );
@@ -297,7 +297,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
v.appendChild( textTag(doc, "NICKNAME", d->nickName) );
if ( !d->photo.isEmpty() || !d->photoURI.isEmpty() ) {
- QDomElement w = doc->createElement("PHOTO");
+ TQDomElement w = doc->createElement("PHOTO");
if ( !d->photo.isEmpty() ) {
w.appendChild( textTag(doc, "TYPE", image2type(d->photo)) );
@@ -315,7 +315,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
if ( !d->addressList.isEmpty() ) {
AddressList::Iterator it = d->addressList.begin();
for ( ; it != d->addressList.end(); ++it ) {
- QDomElement w = doc->createElement("ADR");
+ TQDomElement w = doc->createElement("ADR");
Address a = *it;
if ( a.home )
@@ -355,7 +355,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
if ( !d->labelList.isEmpty() ) {
LabelList::Iterator it = d->labelList.begin();
for ( ; it != d->labelList.end(); ++it ) {
- QDomElement w = doc->createElement("LABEL");
+ TQDomElement w = doc->createElement("LABEL");
Label l = *it;
if ( l.home )
@@ -374,7 +374,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
w.appendChild( emptyTag(doc, "PREF") );
if ( !l.lines.isEmpty() ) {
- QStringList::Iterator it = l.lines.begin();
+ TQStringList::Iterator it = l.lines.begin();
for ( ; it != l.lines.end(); ++it )
w.appendChild( textTag(doc, "LINE", *it) );
}
@@ -386,7 +386,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
if ( !d->phoneList.isEmpty() ) {
PhoneList::Iterator it = d->phoneList.begin();
for ( ; it != d->phoneList.end(); ++it ) {
- QDomElement w = doc->createElement("TEL");
+ TQDomElement w = doc->createElement("TEL");
Phone p = *it;
if ( p.home )
@@ -426,7 +426,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
if ( !d->emailList.isEmpty() ) {
EmailList::Iterator it = d->emailList.begin();
for ( ; it != d->emailList.end(); ++it ) {
- QDomElement w = doc->createElement("EMAIL");
+ TQDomElement w = doc->createElement("EMAIL");
Email e = *it;
if ( e.home )
@@ -453,7 +453,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
v.appendChild( textTag(doc, "TZ", d->timezone) );
if ( !d->geo.lat.isEmpty() || !d->geo.lon.isEmpty() ) {
- QDomElement w = doc->createElement("GEO");
+ TQDomElement w = doc->createElement("GEO");
if ( !d->geo.lat.isEmpty() )
w.appendChild( textTag(doc, "LAT", d->geo.lat) );
@@ -469,7 +469,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
v.appendChild( textTag(doc, "ROLE", d->role) );
if ( !d->logo.isEmpty() || !d->logoURI.isEmpty() ) {
- QDomElement w = doc->createElement("LOGO");
+ TQDomElement w = doc->createElement("LOGO");
if ( !d->logo.isEmpty() ) {
w.appendChild( textTag(doc, "TYPE", image2type(d->logo)) );
@@ -482,7 +482,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
}
if ( !d->agentURI.isEmpty() || (d->agent && d->agent->isEmpty()) ) {
- QDomElement w = doc->createElement("AGENT");
+ TQDomElement w = doc->createElement("AGENT");
if ( d->agent && !d->agent->isEmpty() )
w.appendChild( d->agent->toXml(doc) );
@@ -493,13 +493,13 @@ QDomElement VCard::toXml(QDomDocument *doc) const
}
if ( !d->org.name.isEmpty() || !d->org.unit.isEmpty() ) {
- QDomElement w = doc->createElement("ORG");
+ TQDomElement w = doc->createElement("ORG");
if ( !d->org.name.isEmpty() )
w.appendChild( textTag(doc, "ORGNAME", d->org.name) );
if ( !d->org.unit.isEmpty() ) {
- QStringList::Iterator it = d->org.unit.begin();
+ TQStringList::Iterator it = d->org.unit.begin();
for ( ; it != d->org.unit.end(); ++it )
w.appendChild( textTag(doc, "ORGUNIT", *it) );
}
@@ -508,9 +508,9 @@ QDomElement VCard::toXml(QDomDocument *doc) const
}
if ( !d->categories.isEmpty() ) {
- QDomElement w = doc->createElement("CATEGORIES");
+ TQDomElement w = doc->createElement("CATEGORIES");
- QStringList::Iterator it = d->categories.begin();
+ TQStringList::Iterator it = d->categories.begin();
for ( ; it != d->categories.end(); ++it )
w.appendChild( textTag(doc, "KEYWORD", *it) );
@@ -527,7 +527,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
v.appendChild( textTag(doc, "SORT-STRING", d->sortString) );
if ( !d->sound.isEmpty() || !d->soundURI.isEmpty() || !d->soundPhonetic.isEmpty() ) {
- QDomElement w = doc->createElement("SOUND");
+ TQDomElement w = doc->createElement("SOUND");
if ( !d->sound.isEmpty() )
w.appendChild( textTag(doc, "BINVAL", foldString( Base64::arrayToString(d->sound)) ) );
@@ -547,7 +547,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
v.appendChild( textTag(doc, "DESC", d->desc) );
if ( d->privacyClass != pcNone ) {
- QDomElement w = doc->createElement("CLASS");
+ TQDomElement w = doc->createElement("CLASS");
if ( d->privacyClass == pcPublic )
w.appendChild( emptyTag(doc, "PUBLIC") );
@@ -560,11 +560,11 @@ QDomElement VCard::toXml(QDomDocument *doc) const
}
if ( !d->key.isEmpty() ) {
- QDomElement w = doc->createElement("KEY");
+ TQDomElement w = doc->createElement("KEY");
// TODO: Justin, please check out this code
w.appendChild( textTag(doc, "TYPE", "text/plain")); // FIXME
- w.appendChild( textTag(doc, "CRED", QString::fromUtf8(d->key)) ); // FIXME
+ w.appendChild( textTag(doc, "CRED", TQString::fromUtf8(d->key)) ); // FIXME
v.appendChild(w);
}
@@ -572,21 +572,21 @@ QDomElement VCard::toXml(QDomDocument *doc) const
return v;
}
-bool VCard::fromXml(const QDomElement &q)
+bool VCard::fromXml(const TQDomElement &q)
{
if ( q.tagName().upper() != "VCARD" )
return false;
- QDomNode n = q.firstChild();
+ TQDomNode n = q.firstChild();
for ( ; !n.isNull(); n = n.nextSibling() ) {
- QDomElement i = n.toElement();
+ TQDomElement i = n.toElement();
if ( i.isNull() )
continue;
- QString tag = i.tagName().upper();
+ TQString tag = i.tagName().upper();
bool found;
- QDomElement e;
+ TQDomElement e;
if ( tag == "VERSION" )
d->version = i.text().stripWhiteSpace();
@@ -647,9 +647,9 @@ bool VCard::fromXml(const QDomElement &q)
l.intl = hasSubTag(i, "INTL");
l.pref = hasSubTag(i, "PREF");
- QDomNode nn = i.firstChild();
+ TQDomNode nn = i.firstChild();
for ( ; !nn.isNull(); nn = nn.nextSibling() ) {
- QDomElement ii = nn.toElement();
+ TQDomElement ii = nn.toElement();
if ( ii.isNull() )
continue;
@@ -734,9 +734,9 @@ bool VCard::fromXml(const QDomElement &q)
else if ( tag == "ORG" ) {
d->org.name = subTagText(i, "ORGNAME");
- QDomNode nn = i.firstChild();
+ TQDomNode nn = i.firstChild();
for ( ; !nn.isNull(); nn = nn.nextSibling() ) {
- QDomElement ii = nn.toElement();
+ TQDomElement ii = nn.toElement();
if ( ii.isNull() )
continue;
@@ -745,9 +745,9 @@ bool VCard::fromXml(const QDomElement &q)
}
}
else if ( tag == "CATEGORIES") {
- QDomNode nn = i.firstChild();
+ TQDomNode nn = i.firstChild();
for ( ; !nn.isNull(); nn = nn.nextSibling() ) {
- QDomElement ee = nn.toElement();
+ TQDomElement ee = nn.toElement();
if ( ee.isNull() )
continue;
@@ -785,7 +785,7 @@ bool VCard::fromXml(const QDomElement &q)
else if ( tag == "KEY" ) {
// TODO: Justin, please check out this code
e = findSubTag(i, "TYPE", &found);
- QString type = "text/plain";
+ TQString type = "text/plain";
if ( found )
type = e.text().stripWhiteSpace();
@@ -838,122 +838,122 @@ VCard::Org::Org()
// vCard properties...
-const QString &VCard::version() const
+const TQString &VCard::version() const
{
return d->version;
}
-void VCard::setVersion(const QString &v)
+void VCard::setVersion(const TQString &v)
{
d->version = v;
}
-const QString &VCard::fullName() const
+const TQString &VCard::fullName() const
{
return d->fullName;
}
-void VCard::setFullName(const QString &n)
+void VCard::setFullName(const TQString &n)
{
d->fullName = n;
}
-const QString &VCard::familyName() const
+const TQString &VCard::familyName() const
{
return d->familyName;
}
-void VCard::setFamilyName(const QString &n)
+void VCard::setFamilyName(const TQString &n)
{
d->familyName = n;
}
-const QString &VCard::givenName() const
+const TQString &VCard::givenName() const
{
return d->givenName;
}
-void VCard::setGivenName(const QString &n)
+void VCard::setGivenName(const TQString &n)
{
d->givenName = n;
}
-const QString &VCard::middleName() const
+const TQString &VCard::middleName() const
{
return d->middleName;
}
-void VCard::setMiddleName(const QString &n)
+void VCard::setMiddleName(const TQString &n)
{
d->middleName = n;
}
-const QString &VCard::prefixName() const
+const TQString &VCard::prefixName() const
{
return d->prefixName;
}
-void VCard::setPrefixName(const QString &p)
+void VCard::setPrefixName(const TQString &p)
{
d->prefixName = p;
}
-const QString &VCard::suffixName() const
+const TQString &VCard::suffixName() const
{
return d->suffixName;
}
-void VCard::setSuffixName(const QString &s)
+void VCard::setSuffixName(const TQString &s)
{
d->suffixName = s;
}
-const QString &VCard::nickName() const
+const TQString &VCard::nickName() const
{
return d->nickName;
}
-void VCard::setNickName(const QString &n)
+void VCard::setNickName(const TQString &n)
{
d->nickName = n;
}
-const QByteArray &VCard::photo() const
+const TQByteArray &VCard::photo() const
{
return d->photo;
}
-void VCard::setPhoto(const QByteArray &i)
+void VCard::setPhoto(const TQByteArray &i)
{
d->photo = i;
}
-const QString &VCard::photoURI() const
+const TQString &VCard::photoURI() const
{
return d->photoURI;
}
-void VCard::setPhotoURI(const QString &p)
+void VCard::setPhotoURI(const TQString &p)
{
d->photoURI = p;
}
-const QDate VCard::bday() const
+const TQDate VCard::bday() const
{
- return QDate::fromString(d->bday);
+ return TQDate::fromString(d->bday);
}
-void VCard::setBday(const QDate &date)
+void VCard::setBday(const TQDate &date)
{
d->bday = date.toString();
}
-const QString &VCard::bdayStr() const
+const TQString &VCard::bdayStr() const
{
return d->bday;
}
-void VCard::setBdayStr(const QString &date)
+void VCard::setBdayStr(const TQString &date)
{
d->bday = date;
}
@@ -998,32 +998,32 @@ void VCard::setEmailList(const VCard::EmailList &e)
d->emailList = e;
}
-const QString &VCard::jid() const
+const TQString &VCard::jid() const
{
return d->jid;
}
-void VCard::setJid(const QString &j)
+void VCard::setJid(const TQString &j)
{
d->jid = j;
}
-const QString &VCard::mailer() const
+const TQString &VCard::mailer() const
{
return d->mailer;
}
-void VCard::setMailer(const QString &m)
+void VCard::setMailer(const TQString &m)
{
d->mailer = m;
}
-const QString &VCard::timezone() const
+const TQString &VCard::timezone() const
{
return d->timezone;
}
-void VCard::setTimezone(const QString &t)
+void VCard::setTimezone(const TQString &t)
{
d->timezone = t;
}
@@ -1038,42 +1038,42 @@ void VCard::setGeo(const VCard::Geo &g)
d->geo = g;
}
-const QString &VCard::title() const
+const TQString &VCard::title() const
{
return d->title;
}
-void VCard::setTitle(const QString &t)
+void VCard::setTitle(const TQString &t)
{
d->title = t;
}
-const QString &VCard::role() const
+const TQString &VCard::role() const
{
return d->role;
}
-void VCard::setRole(const QString &r)
+void VCard::setRole(const TQString &r)
{
d->role = r;
}
-const QByteArray &VCard::logo() const
+const TQByteArray &VCard::logo() const
{
return d->logo;
}
-void VCard::setLogo(const QByteArray &i)
+void VCard::setLogo(const TQByteArray &i)
{
d->logo = i;
}
-const QString &VCard::logoURI() const
+const TQString &VCard::logoURI() const
{
return d->logoURI;
}
-void VCard::setLogoURI(const QString &l)
+void VCard::setLogoURI(const TQString &l)
{
d->logoURI = l;
}
@@ -1090,12 +1090,12 @@ void VCard::setAgent(const VCard &v)
*(d->agent) = v;
}
-const QString VCard::agentURI() const
+const TQString VCard::agentURI() const
{
return d->agentURI;
}
-void VCard::setAgentURI(const QString &a)
+void VCard::setAgentURI(const TQString &a)
{
d->agentURI = a;
}
@@ -1110,112 +1110,112 @@ void VCard::setOrg(const VCard::Org &o)
d->org = o;
}
-const QStringList &VCard::categories() const
+const TQStringList &VCard::categories() const
{
return d->categories;
}
-void VCard::setCategories(const QStringList &c)
+void VCard::setCategories(const TQStringList &c)
{
d->categories = c;
}
-const QString &VCard::note() const
+const TQString &VCard::note() const
{
return d->note;
}
-void VCard::setNote(const QString &n)
+void VCard::setNote(const TQString &n)
{
d->note = n;
}
-const QString &VCard::prodId() const
+const TQString &VCard::prodId() const
{
return d->prodId;
}
-void VCard::setProdId(const QString &p)
+void VCard::setProdId(const TQString &p)
{
d->prodId = p;
}
-const QString &VCard::rev() const
+const TQString &VCard::rev() const
{
return d->rev;
}
-void VCard::setRev(const QString &r)
+void VCard::setRev(const TQString &r)
{
d->rev = r;
}
-const QString &VCard::sortString() const
+const TQString &VCard::sortString() const
{
return d->sortString;
}
-void VCard::setSortString(const QString &s)
+void VCard::setSortString(const TQString &s)
{
d->sortString = s;
}
-const QByteArray &VCard::sound() const
+const TQByteArray &VCard::sound() const
{
return d->sound;
}
-void VCard::setSound(const QByteArray &s)
+void VCard::setSound(const TQByteArray &s)
{
d->sound = s;
}
-const QString &VCard::soundURI() const
+const TQString &VCard::soundURI() const
{
return d->soundURI;
}
-void VCard::setSoundURI(const QString &s)
+void VCard::setSoundURI(const TQString &s)
{
d->soundURI = s;
}
-const QString &VCard::soundPhonetic() const
+const TQString &VCard::soundPhonetic() const
{
return d->soundPhonetic;
}
-void VCard::setSoundPhonetic(const QString &s)
+void VCard::setSoundPhonetic(const TQString &s)
{
d->soundPhonetic = s;
}
-const QString &VCard::uid() const
+const TQString &VCard::uid() const
{
return d->uid;
}
-void VCard::setUid(const QString &u)
+void VCard::setUid(const TQString &u)
{
d->uid = u;
}
-const QString &VCard::url() const
+const TQString &VCard::url() const
{
return d->url;
}
-void VCard::setUrl(const QString &u)
+void VCard::setUrl(const TQString &u)
{
d->url = u;
}
-const QString &VCard::desc() const
+const TQString &VCard::desc() const
{
return d->desc;
}
-void VCard::setDesc(const QString &desc)
+void VCard::setDesc(const TQString &desc)
{
d->desc = desc;
}
@@ -1230,12 +1230,12 @@ void VCard::setPrivacyClass(const VCard::PrivacyClass &c)
d->privacyClass = c;
}
-const QByteArray &VCard::key() const
+const TQByteArray &VCard::key() const
{
return d->key;
}
-void VCard::setKey(const QByteArray &k)
+void VCard::setKey(const TQByteArray &k)
{
d->key = k;
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h
index 4a097251..885e08a9 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h
@@ -21,12 +21,12 @@
#ifndef JABBER_VCARD_H
#define JABBER_VCARD_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
-#include <qvaluelist.h>
-#include <qdom.h>
+#include <tqvaluelist.h>
+#include <tqdom.h>
class QDate;
@@ -40,49 +40,49 @@ namespace XMPP
VCard & operator=(const VCard &);
~VCard();
- QDomElement toXml(QDomDocument *) const;
- bool fromXml(const QDomElement &);
+ TQDomElement toXml(TQDomDocument *) const;
+ bool fromXml(const TQDomElement &);
bool isEmpty() const;
- const QString &version() const;
- void setVersion(const QString &);
+ const TQString &version() const;
+ void setVersion(const TQString &);
- const QString &fullName() const;
- void setFullName(const QString &);
+ const TQString &fullName() const;
+ void setFullName(const TQString &);
- const QString &familyName() const;
- void setFamilyName(const QString &);
+ const TQString &familyName() const;
+ void setFamilyName(const TQString &);
- const QString &givenName() const;
- void setGivenName(const QString &);
+ const TQString &givenName() const;
+ void setGivenName(const TQString &);
- const QString &middleName() const;
- void setMiddleName(const QString &);
+ const TQString &middleName() const;
+ void setMiddleName(const TQString &);
- const QString &prefixName() const;
- void setPrefixName(const QString &);
+ const TQString &prefixName() const;
+ void setPrefixName(const TQString &);
- const QString &suffixName() const;
- void setSuffixName(const QString &);
+ const TQString &suffixName() const;
+ void setSuffixName(const TQString &);
- const QString &nickName() const;
- void setNickName(const QString &);
+ const TQString &nickName() const;
+ void setNickName(const TQString &);
- const QByteArray &photo() const;
- void setPhoto(const QByteArray &);
+ const TQByteArray &photo() const;
+ void setPhoto(const TQByteArray &);
- const QString &photoURI() const;
- void setPhotoURI(const QString &);
+ const TQString &photoURI() const;
+ void setPhotoURI(const TQString &);
- const QDate bday() const;
- void setBday(const QDate &);
+ const TQDate bday() const;
+ void setBday(const TQDate &);
- const QString &bdayStr() const;
- void setBdayStr(const QString &);
+ const TQString &bdayStr() const;
+ void setBdayStr(const TQString &);
class Address {
@@ -99,15 +99,15 @@ namespace XMPP
bool pref;
- QString pobox;
- QString extaddr;
- QString street;
- QString locality;
- QString region;
- QString pcode;
- QString country;
+ TQString pobox;
+ TQString extaddr;
+ TQString street;
+ TQString locality;
+ TQString region;
+ TQString pcode;
+ TQString country;
};
- typedef QValueList<Address> AddressList;
+ typedef TQValueList<Address> AddressList;
const AddressList &addressList() const;
void setAddressList(const AddressList &);
@@ -125,9 +125,9 @@ namespace XMPP
bool pref;
- QStringList lines;
+ TQStringList lines;
};
- typedef QValueList<Label> LabelList;
+ typedef TQValueList<Label> LabelList;
const LabelList &labelList() const;
void setLabelList(const LabelList &);
@@ -150,9 +150,9 @@ namespace XMPP
bool pcs;
bool pref;
- QString number;
+ TQString number;
};
- typedef QValueList<Phone> PhoneList;
+ typedef TQValueList<Phone> PhoneList;
const PhoneList &phoneList() const;
void setPhoneList(const PhoneList &);
@@ -166,100 +166,100 @@ namespace XMPP
bool internet;
bool x400;
- QString userid;
+ TQString userid;
};
- typedef QValueList<Email> EmailList;
+ typedef TQValueList<Email> EmailList;
const EmailList &emailList() const;
void setEmailList(const EmailList &);
- const QString &jid() const;
- void setJid(const QString &);
+ const TQString &jid() const;
+ void setJid(const TQString &);
- const QString &mailer() const;
- void setMailer(const QString &);
+ const TQString &mailer() const;
+ void setMailer(const TQString &);
- const QString &timezone() const;
- void setTimezone(const QString &);
+ const TQString &timezone() const;
+ void setTimezone(const TQString &);
class Geo {
public:
Geo();
- QString lat;
- QString lon;
+ TQString lat;
+ TQString lon;
};
const Geo &geo() const;
void setGeo(const Geo &);
- const QString &title() const;
- void setTitle(const QString &);
+ const TQString &title() const;
+ void setTitle(const TQString &);
- const QString &role() const;
- void setRole(const QString &);
+ const TQString &role() const;
+ void setRole(const TQString &);
- const QByteArray &logo() const;
- void setLogo(const QByteArray &);
+ const TQByteArray &logo() const;
+ void setLogo(const TQByteArray &);
- const QString &logoURI() const;
- void setLogoURI(const QString &);
+ const TQString &logoURI() const;
+ void setLogoURI(const TQString &);
const VCard *agent() const;
void setAgent(const VCard &);
- const QString agentURI() const;
- void setAgentURI(const QString &);
+ const TQString agentURI() const;
+ void setAgentURI(const TQString &);
class Org {
public:
Org();
- QString name;
- QStringList unit;
+ TQString name;
+ TQStringList unit;
};
const Org &org() const;
void setOrg(const Org &);
- const QStringList &categories() const;
- void setCategories(const QStringList &);
+ const TQStringList &categories() const;
+ void setCategories(const TQStringList &);
- const QString &note() const;
- void setNote(const QString &);
+ const TQString &note() const;
+ void setNote(const TQString &);
- const QString &prodId() const; // it must equal to "Psi" ;-)
- void setProdId(const QString &);
+ const TQString &prodId() const; // it must equal to "Psi" ;-)
+ void setProdId(const TQString &);
- const QString &rev() const;
- void setRev(const QString &);
+ const TQString &rev() const;
+ void setRev(const TQString &);
- const QString &sortString() const;
- void setSortString(const QString &);
+ const TQString &sortString() const;
+ void setSortString(const TQString &);
- const QByteArray &sound() const;
- void setSound(const QByteArray &);
+ const TQByteArray &sound() const;
+ void setSound(const TQByteArray &);
- const QString &soundURI() const;
- void setSoundURI(const QString &);
+ const TQString &soundURI() const;
+ void setSoundURI(const TQString &);
- const QString &soundPhonetic() const;
- void setSoundPhonetic(const QString &);
+ const TQString &soundPhonetic() const;
+ void setSoundPhonetic(const TQString &);
- const QString &uid() const;
- void setUid(const QString &);
+ const TQString &uid() const;
+ void setUid(const TQString &);
- const QString &url() const;
- void setUrl(const QString &);
+ const TQString &url() const;
+ void setUrl(const TQString &);
- const QString &desc() const;
- void setDesc(const QString &);
+ const TQString &desc() const;
+ void setDesc(const TQString &);
enum PrivacyClass {
@@ -272,8 +272,8 @@ namespace XMPP
void setPrivacyClass(const PrivacyClass &);
- const QByteArray &key() const;
- void setKey(const QByteArray &);
+ const TQByteArray &key() const;
+ void setKey(const TQByteArray &);
private:
class Private;
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 e22fc12d..d7b5c82d 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp
@@ -20,17 +20,17 @@
#include"xmpp_xmlcommon.h"
-#include <qstring.h>
-#include <qdom.h>
-#include <qdatetime.h>
-#include <qsize.h>
-#include <qrect.h>
-#include <qstringlist.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqdom.h>
+#include <tqdatetime.h>
+#include <tqsize.h>
+#include <tqrect.h>
+#include <tqstringlist.h>
+#include <tqcolor.h>
#include"im.h"
-bool stamp2TS(const QString &ts, QDateTime *d)
+bool stamp2TS(const TQString &ts, TQDateTime *d)
{
if(ts.length() != 17)
return false;
@@ -43,12 +43,12 @@ bool stamp2TS(const QString &ts, QDateTime *d)
int min = ts.mid(12,2).toInt();
int sec = ts.mid(15,2).toInt();
- QDate xd;
+ TQDate xd;
xd.setYMD(year, month, day);
if(!xd.isValid())
return false;
- QTime xt;
+ TQTime xt;
xt.setHMS(hour, min, sec);
if(!xt.isValid())
return false;
@@ -59,9 +59,9 @@ bool stamp2TS(const QString &ts, QDateTime *d)
return true;
}
-QString TS2stamp(const QDateTime &d)
+TQString TS2stamp(const TQDateTime &d)
{
- QString str;
+ TQString str;
str.sprintf("%04d%02d%02dT%02d:%02d:%02d",
d.date().year(),
@@ -74,20 +74,20 @@ QString TS2stamp(const QDateTime &d)
return str;
}
-QDomElement textTag(QDomDocument *doc, const QString &name, const QString &content)
+TQDomElement textTag(TQDomDocument *doc, const TQString &name, const TQString &content)
{
- QDomElement tag = doc->createElement(name);
- QDomText text = doc->createTextNode(content);
+ TQDomElement tag = doc->createElement(name);
+ TQDomText text = doc->createTextNode(content);
tag.appendChild(text);
return tag;
}
-QString tagContent(const QDomElement &e)
+TQString tagContent(const TQDomElement &e)
{
// look for some tag content
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomText i = n.toText();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomText i = n.toText();
if(i.isNull())
continue;
return i.data();
@@ -96,13 +96,13 @@ QString tagContent(const QDomElement &e)
return "";
}
-QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found)
+TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found)
{
if(found)
*found = false;
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == name) {
@@ -112,13 +112,13 @@ QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found)
}
}
- QDomElement tmp;
+ TQDomElement tmp;
return tmp;
}
-QDomElement createIQ(QDomDocument *doc, const QString &type, const QString &to, const QString &id)
+TQDomElement createIQ(TQDomDocument *doc, const TQString &type, const TQString &to, const TQString &id)
{
- QDomElement iq = doc->createElement("iq");
+ TQDomElement iq = doc->createElement("iq");
if(!type.isEmpty())
iq.setAttribute("type", type);
if(!to.isEmpty())
@@ -129,27 +129,27 @@ QDomElement createIQ(QDomDocument *doc, const QString &type, const QString &to,
return iq;
}
-QDomElement queryTag(const QDomElement &e)
+TQDomElement queryTag(const TQDomElement &e)
{
bool found;
- QDomElement q = findSubTag(e, "query", &found);
+ TQDomElement q = findSubTag(e, "query", &found);
return q;
}
-QString queryNS(const QDomElement &e)
+TQString queryNS(const TQDomElement &e)
{
bool found;
- QDomElement q = findSubTag(e, "query", &found);
+ TQDomElement q = findSubTag(e, "query", &found);
if(found)
return q.attribute("xmlns");
return "";
}
-void getErrorFromElement(const QDomElement &e, int *code, QString *str)
+void getErrorFromElement(const TQDomElement &e, int *code, TQString *str)
{
bool found;
- QDomElement tag = findSubTag(e, "error", &found);
+ TQDomElement tag = findSubTag(e, "error", &found);
if(!found)
return;
@@ -165,94 +165,94 @@ void getErrorFromElement(const QDomElement &e, int *code, QString *str)
namespace XMLHelper {
-QDomElement emptyTag(QDomDocument *doc, const QString &name)
+TQDomElement emptyTag(TQDomDocument *doc, const TQString &name)
{
- QDomElement tag = doc->createElement(name);
+ TQDomElement tag = doc->createElement(name);
return tag;
}
-bool hasSubTag(const QDomElement &e, const QString &name)
+bool hasSubTag(const TQDomElement &e, const TQString &name)
{
bool found;
findSubTag(e, name, &found);
return found;
}
-QString subTagText(const QDomElement &e, const QString &name)
+TQString subTagText(const TQDomElement &e, const TQString &name)
{
bool found;
- QDomElement i = findSubTag(e, name, &found);
+ TQDomElement i = findSubTag(e, name, &found);
if ( found )
return i.text();
- return QString::null;
+ return TQString::null;
}
-QDomElement textTag(QDomDocument &doc, const QString &name, const QString &content)
+TQDomElement textTag(TQDomDocument &doc, const TQString &name, const TQString &content)
{
- QDomElement tag = doc.createElement(name);
- QDomText text = doc.createTextNode(content);
+ TQDomElement tag = doc.createElement(name);
+ TQDomText text = doc.createTextNode(content);
tag.appendChild(text);
return tag;
}
-QDomElement textTag(QDomDocument &doc, const QString &name, int content)
+TQDomElement textTag(TQDomDocument &doc, const TQString &name, int content)
{
- QDomElement tag = doc.createElement(name);
- QDomText text = doc.createTextNode(QString::number(content));
+ TQDomElement tag = doc.createElement(name);
+ TQDomText text = doc.createTextNode(TQString::number(content));
tag.appendChild(text);
return tag;
}
-QDomElement textTag(QDomDocument &doc, const QString &name, bool content)
+TQDomElement textTag(TQDomDocument &doc, const TQString &name, bool content)
{
- QDomElement tag = doc.createElement(name);
- QDomText text = doc.createTextNode(content ? "true" : "false");
+ TQDomElement tag = doc.createElement(name);
+ TQDomText text = doc.createTextNode(content ? "true" : "false");
tag.appendChild(text);
return tag;
}
-QDomElement textTag(QDomDocument &doc, const QString &name, QSize &s)
+TQDomElement textTag(TQDomDocument &doc, const TQString &name, TQSize &s)
{
- QString str;
+ TQString str;
str.sprintf("%d,%d", s.width(), s.height());
- QDomElement tag = doc.createElement(name);
- QDomText text = doc.createTextNode(str);
+ TQDomElement tag = doc.createElement(name);
+ TQDomText text = doc.createTextNode(str);
tag.appendChild(text);
return tag;
}
-QDomElement textTag(QDomDocument &doc, const QString &name, QRect &r)
+TQDomElement textTag(TQDomDocument &doc, const TQString &name, TQRect &r)
{
- QString str;
+ TQString str;
str.sprintf("%d,%d,%d,%d", r.x(), r.y(), r.width(), r.height());
- QDomElement tag = doc.createElement(name);
- QDomText text = doc.createTextNode(str);
+ TQDomElement tag = doc.createElement(name);
+ TQDomText text = doc.createTextNode(str);
tag.appendChild(text);
return tag;
}
-QDomElement stringListToXml(QDomDocument &doc, const QString &name, const QStringList &l)
+TQDomElement stringListToXml(TQDomDocument &doc, const TQString &name, const TQStringList &l)
{
- QDomElement tag = doc.createElement(name);
- for(QStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
+ TQDomElement tag = doc.createElement(name);
+ for(TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
tag.appendChild(textTag(doc, "item", *it));
return tag;
}
-/*QString tagContent(const QDomElement &e)
+/*TQString tagContent(const TQDomElement &e)
{
// look for some tag content
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomText i = n.toText();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomText i = n.toText();
if(i.isNull())
continue;
return i.data();
@@ -261,13 +261,13 @@ QDomElement stringListToXml(QDomDocument &doc, const QString &name, const QStrin
return "";
}*/
-/*QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found)
+/*TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found)
{
if(found)
*found = FALSE;
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == name) {
@@ -277,62 +277,62 @@ QDomElement stringListToXml(QDomDocument &doc, const QString &name, const QStrin
}
}
- QDomElement tmp;
+ TQDomElement tmp;
return tmp;
}*/
-void readEntry(const QDomElement &e, const QString &name, QString *v)
+void readEntry(const TQDomElement &e, const TQString &name, TQString *v)
{
bool found = FALSE;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
*v = tagContent(tag);
}
-void readNumEntry(const QDomElement &e, const QString &name, int *v)
+void readNumEntry(const TQDomElement &e, const TQString &name, int *v)
{
bool found = FALSE;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
*v = tagContent(tag).toInt();
}
-void readBoolEntry(const QDomElement &e, const QString &name, bool *v)
+void readBoolEntry(const TQDomElement &e, const TQString &name, bool *v)
{
bool found = FALSE;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
*v = (tagContent(tag) == "true") ? TRUE: FALSE;
}
-void readSizeEntry(const QDomElement &e, const QString &name, QSize *v)
+void readSizeEntry(const TQDomElement &e, const TQString &name, TQSize *v)
{
bool found = FALSE;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
- QStringList list = QStringList::split(',', tagContent(tag));
+ TQStringList list = TQStringList::split(',', tagContent(tag));
if(list.count() != 2)
return;
- QSize s;
+ TQSize s;
s.setWidth(list[0].toInt());
s.setHeight(list[1].toInt());
*v = s;
}
-void readRectEntry(const QDomElement &e, const QString &name, QRect *v)
+void readRectEntry(const TQDomElement &e, const TQString &name, TQRect *v)
{
bool found = FALSE;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
- QStringList list = QStringList::split(',', tagContent(tag));
+ TQStringList list = TQStringList::split(',', tagContent(tag));
if(list.count() != 4)
return;
- QRect r;
+ TQRect r;
r.setX(list[0].toInt());
r.setY(list[1].toInt());
r.setWidth(list[2].toInt());
@@ -340,27 +340,27 @@ void readRectEntry(const QDomElement &e, const QString &name, QRect *v)
*v = r;
}
-void readColorEntry(const QDomElement &e, const QString &name, QColor *v)
+void readColorEntry(const TQDomElement &e, const TQString &name, TQColor *v)
{
bool found = FALSE;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
- QColor c;
+ TQColor c;
c.setNamedColor(tagContent(tag));
if(c.isValid())
*v = c;
}
-void xmlToStringList(const QDomElement &e, const QString &name, QStringList *v)
+void xmlToStringList(const TQDomElement &e, const TQString &name, TQStringList *v)
{
bool found = false;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
- QStringList list;
- for(QDomNode n = tag.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQStringList list;
+ for(TQDomNode n = tag.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == "item")
@@ -369,15 +369,15 @@ void xmlToStringList(const QDomElement &e, const QString &name, QStringList *v)
*v = list;
}
-void setBoolAttribute(QDomElement e, const QString &name, bool b)
+void setBoolAttribute(TQDomElement e, const TQString &name, bool b)
{
e.setAttribute(name, b ? "true" : "false");
}
-void readBoolAttribute(QDomElement e, const QString &name, bool *v)
+void readBoolAttribute(TQDomElement e, const TQString &name, bool *v)
{
if(e.hasAttribute(name)) {
- QString s = e.attribute(name);
+ TQString s = e.attribute(name);
*v = (s == "true") ? TRUE: FALSE;
}
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h
index c3f089c7..926395e9 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h
@@ -21,7 +21,7 @@
#ifndef JABBER_XMLCOMMON_H
#define JABBER_XMLCOMMON_H
-#include<qdom.h>
+#include<tqdom.h>
class QDateTime;
class QRect;
@@ -29,43 +29,43 @@ class QSize;
class QColor;
class QStringList;
-bool stamp2TS(const QString &ts, QDateTime *d);
-QString TS2stamp(const QDateTime &d);
-QDomElement textTag(QDomDocument *doc, const QString &name, const QString &content);
-QString tagContent(const QDomElement &e);
-QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found);
-QDomElement createIQ(QDomDocument *doc, const QString &type, const QString &to, const QString &id);
-QDomElement queryTag(const QDomElement &e);
-QString queryNS(const QDomElement &e);
-void getErrorFromElement(const QDomElement &e, int *code, QString *str);
+bool stamp2TS(const TQString &ts, TQDateTime *d);
+TQString TS2stamp(const TQDateTime &d);
+TQDomElement textTag(TQDomDocument *doc, const TQString &name, const TQString &content);
+TQString tagContent(const TQDomElement &e);
+TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found);
+TQDomElement createIQ(TQDomDocument *doc, const TQString &type, const TQString &to, const TQString &id);
+TQDomElement queryTag(const TQDomElement &e);
+TQString queryNS(const TQDomElement &e);
+void getErrorFromElement(const TQDomElement &e, int *code, TQString *str);
namespace XMLHelper {
- //QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found);
- bool hasSubTag(const QDomElement &e, const QString &name);
+ //TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found);
+ bool hasSubTag(const TQDomElement &e, const TQString &name);
- QDomElement emptyTag(QDomDocument *doc, const QString &name);
- QString subTagText(const QDomElement &e, const QString &name);
+ TQDomElement emptyTag(TQDomDocument *doc, const TQString &name);
+ TQString subTagText(const TQDomElement &e, const TQString &name);
- QDomElement textTag(QDomDocument &doc, const QString &name, const QString &content);
- QDomElement textTag(QDomDocument &doc, const QString &name, int content);
- QDomElement textTag(QDomDocument &doc, const QString &name, bool content);
- QDomElement textTag(QDomDocument &doc, const QString &name, QSize &s);
- QDomElement textTag(QDomDocument &doc, const QString &name, QRect &r);
- QDomElement stringListToXml(QDomDocument &doc, const QString &name, const QStringList &l);
+ TQDomElement textTag(TQDomDocument &doc, const TQString &name, const TQString &content);
+ TQDomElement textTag(TQDomDocument &doc, const TQString &name, int content);
+ TQDomElement textTag(TQDomDocument &doc, const TQString &name, bool content);
+ TQDomElement textTag(TQDomDocument &doc, const TQString &name, TQSize &s);
+ TQDomElement textTag(TQDomDocument &doc, const TQString &name, TQRect &r);
+ TQDomElement stringListToXml(TQDomDocument &doc, const TQString &name, const TQStringList &l);
- void readEntry(const QDomElement &e, const QString &name, QString *v);
- void readNumEntry(const QDomElement &e, const QString &name, int *v);
- void readBoolEntry(const QDomElement &e, const QString &name, bool *v);
- void readSizeEntry(const QDomElement &e, const QString &name, QSize *v);
- void readRectEntry(const QDomElement &e, const QString &name, QRect *v);
- void readColorEntry(const QDomElement &e, const QString &name, QColor *v);
+ void readEntry(const TQDomElement &e, const TQString &name, TQString *v);
+ void readNumEntry(const TQDomElement &e, const TQString &name, int *v);
+ void readBoolEntry(const TQDomElement &e, const TQString &name, bool *v);
+ void readSizeEntry(const TQDomElement &e, const TQString &name, TQSize *v);
+ void readRectEntry(const TQDomElement &e, const TQString &name, TQRect *v);
+ void readColorEntry(const TQDomElement &e, const TQString &name, TQColor *v);
- void xmlToStringList(const QDomElement &e, const QString &name, QStringList *v);
+ void xmlToStringList(const TQDomElement &e, const TQString &name, TQStringList *v);
- void setBoolAttribute(QDomElement e, const QString &name, bool b);
- void readBoolAttribute(QDomElement e, const QString &name, bool *v);
+ void setBoolAttribute(TQDomElement e, const TQString &name, bool b);
+ void readBoolAttribute(TQDomElement e, const TQString &name, bool *v);
- //QString tagContent(const QDomElement &e); // obsolete;
+ //TQString tagContent(const TQDomElement &e); // obsolete;
}
#endif
diff --git a/kopete/protocols/jabber/libiris/qca/src/qca.cpp b/kopete/protocols/jabber/libiris/qca/src/qca.cpp
index 51f8533b..4a197527 100644
--- a/kopete/protocols/jabber/libiris/qca/src/qca.cpp
+++ b/kopete/protocols/jabber/libiris/qca/src/qca.cpp
@@ -20,15 +20,15 @@
#include"qca.h"
-#include<qptrlist.h>
-#include<qdir.h>
-#include<qfileinfo.h>
-#include<qstringlist.h>
-#include<qlibrary.h>
-#include<qtimer.h>
-#include<qhostaddress.h>
-#include<qapplication.h>
-#include<qguardedptr.h>
+#include<tqptrlist.h>
+#include<tqdir.h>
+#include<tqfileinfo.h>
+#include<tqstringlist.h>
+#include<tqlibrary.h>
+#include<tqtimer.h>
+#include<tqhostaddress.h>
+#include<tqapplication.h>
+#include<tqguardedptr.h>
#include<stdlib.h>
#include"qcaprovider.h"
@@ -46,11 +46,11 @@ class ProviderItem
{
public:
QCAProvider *p;
- QString fname;
+ TQString fname;
- static ProviderItem *load(const QString &fname)
+ static ProviderItem *load(const TQString &fname)
{
- QLibrary *lib = new QLibrary(fname);
+ TQLibrary *lib = new TQLibrary(fname);
if(!lib->load()) {
delete lib;
return 0;
@@ -92,10 +92,10 @@ public:
}
private:
- QLibrary *lib;
+ TQLibrary *lib;
bool init_done;
- ProviderItem(QLibrary *_lib, QCAProvider *_p)
+ ProviderItem(TQLibrary *_lib, QCAProvider *_p)
{
lib = _lib;
p = _p;
@@ -103,12 +103,12 @@ private:
}
};
-static QPtrList<ProviderItem> providerList;
+static TQPtrList<ProviderItem> providerList;
static bool qca_init = false;
-static bool plugin_have(const QString &fname)
+static bool plugin_have(const TQString &fname)
{
- QPtrListIterator<ProviderItem> it(providerList);
+ TQPtrListIterator<ProviderItem> it(providerList);
for(ProviderItem *i; (i = it.current()); ++it) {
if(i->fname == fname)
return true;
@@ -118,21 +118,21 @@ static bool plugin_have(const QString &fname)
static void plugin_scan()
{
- QStringList dirs = QApplication::libraryPaths();
- for(QStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) {
- QDir libpath(*it);
- QDir dir(libpath.filePath("crypto"));
+ TQStringList dirs = TQApplication::libraryPaths();
+ for(TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) {
+ TQDir libpath(*it);
+ TQDir dir(libpath.filePath("crypto"));
if(!dir.exists())
continue;
- QStringList list = dir.entryList();
- for(QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
- QFileInfo fi(dir.filePath(*it));
+ TQStringList list = dir.entryList();
+ for(TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ TQFileInfo fi(dir.filePath(*it));
if(fi.isDir())
continue;
if(fi.extension() != PLUGIN_EXT)
continue;
- QString fname = fi.filePath();
+ TQString fname = fi.filePath();
// don't load the same plugin again!
if(plugin_have(fname))
@@ -166,26 +166,26 @@ static void plugin_unloadall()
static int plugin_caps()
{
int caps = 0;
- QPtrListIterator<ProviderItem> it(providerList);
+ TQPtrListIterator<ProviderItem> it(providerList);
for(ProviderItem *i; (i = it.current()); ++it)
caps |= i->p->capabilities();
return caps;
}
-QString QCA::arrayToHex(const QByteArray &a)
+TQString QCA::arrayToHex(const TQByteArray &a)
{
- QString out;
+ TQString out;
for(int n = 0; n < (int)a.size(); ++n) {
- QString str;
+ TQString str;
str.sprintf("%02x", (uchar)a[n]);
out.append(str);
}
return out;
}
-QByteArray QCA::hexToArray(const QString &str)
+TQByteArray QCA::hexToArray(const TQString &str)
{
- QByteArray out(str.length() / 2);
+ TQByteArray out(str.length() / 2);
int at = 0;
for(int n = 0; n + 1 < (int)str.length(); n += 2) {
uchar a = str[n];
@@ -239,7 +239,7 @@ static void *getContext(int cap)
if(!QCA::isSupported(cap))
return 0;
- QPtrListIterator<ProviderItem> it(providerList);
+ TQPtrListIterator<ProviderItem> it(providerList);
for(ProviderItem *i; (i = it.current()); ++it) {
if(i->p->capabilities() & cap) {
i->ensureInit();
@@ -303,14 +303,14 @@ void Hash::clear()
d->reset();
}
-void Hash::update(const QByteArray &a)
+void Hash::update(const TQByteArray &a)
{
d->c->update(a.data(), a.size());
}
-QByteArray Hash::final()
+TQByteArray Hash::final()
{
- QByteArray buf;
+ TQByteArray buf;
d->c->final(&buf);
return buf;
}
@@ -343,11 +343,11 @@ public:
QCA_CipherContext *c;
int dir;
int mode;
- QByteArray key, iv;
+ TQByteArray key, iv;
bool err;
};
-Cipher::Cipher(QCA_CipherContext *c, int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+Cipher::Cipher(QCA_CipherContext *c, int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
{
d = new Private;
d->c = c;
@@ -377,27 +377,27 @@ Cipher::~Cipher()
delete d;
}
-QByteArray Cipher::dyn_generateKey(int size) const
+TQByteArray Cipher::dyn_generateKey(int size) const
{
- QByteArray buf;
+ TQByteArray buf;
if(size != -1)
buf.resize(size);
else
buf.resize(d->c->keySize());
if(!d->c->generateKey(buf.data(), size))
- return QByteArray();
+ return TQByteArray();
return buf;
}
-QByteArray Cipher::dyn_generateIV() const
+TQByteArray Cipher::dyn_generateIV() const
{
- QByteArray buf(d->c->blockSize());
+ TQByteArray buf(d->c->blockSize());
if(!d->c->generateIV(buf.data()))
- return QByteArray();
+ return TQByteArray();
return buf;
}
-void Cipher::reset(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+void Cipher::reset(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
{
d->reset();
@@ -411,7 +411,7 @@ void Cipher::reset(int dir, int mode, const QByteArray &key, const QByteArray &i
}
}
-bool Cipher::update(const QByteArray &a)
+bool Cipher::update(const TQByteArray &a)
{
if(d->err)
return false;
@@ -425,17 +425,17 @@ bool Cipher::update(const QByteArray &a)
return true;
}
-QByteArray Cipher::final(bool *ok)
+TQByteArray Cipher::final(bool *ok)
{
if(ok)
*ok = false;
if(d->err)
- return QByteArray();
+ return TQByteArray();
- QByteArray out;
+ TQByteArray out;
if(!d->c->final(&out)) {
d->err = true;
- return QByteArray();
+ return TQByteArray();
}
if(ok)
*ok = true;
@@ -473,7 +473,7 @@ MD5::MD5()
//----------------------------------------------------------------------------
// BlowFish
//----------------------------------------------------------------------------
-BlowFish::BlowFish(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+BlowFish::BlowFish(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
:Cipher((QCA_CipherContext *)getContext(CAP_BlowFish), dir, mode, key, iv, pad)
{
}
@@ -482,7 +482,7 @@ BlowFish::BlowFish(int dir, int mode, const QByteArray &key, const QByteArray &i
//----------------------------------------------------------------------------
// TripleDES
//----------------------------------------------------------------------------
-TripleDES::TripleDES(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+TripleDES::TripleDES(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
:Cipher((QCA_CipherContext *)getContext(CAP_TripleDES), dir, mode, key, iv, pad)
{
}
@@ -491,7 +491,7 @@ TripleDES::TripleDES(int dir, int mode, const QByteArray &key, const QByteArray
//----------------------------------------------------------------------------
// AES128
//----------------------------------------------------------------------------
-AES128::AES128(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+AES128::AES128(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
:Cipher((QCA_CipherContext *)getContext(CAP_AES128), dir, mode, key, iv, pad)
{
}
@@ -500,7 +500,7 @@ AES128::AES128(int dir, int mode, const QByteArray &key, const QByteArray &iv, b
//----------------------------------------------------------------------------
// AES256
//----------------------------------------------------------------------------
-AES256::AES256(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+AES256::AES256(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
:Cipher((QCA_CipherContext *)getContext(CAP_AES256), dir, mode, key, iv, pad)
{
}
@@ -564,35 +564,35 @@ bool RSAKey::havePrivate() const
return d->c->havePrivate();
}
-QByteArray RSAKey::toDER(bool publicOnly) const
+TQByteArray RSAKey::toDER(bool publicOnly) const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->toDER(&out, publicOnly))
- return QByteArray();
+ return TQByteArray();
return out;
}
-bool RSAKey::fromDER(const QByteArray &a)
+bool RSAKey::fromDER(const TQByteArray &a)
{
return d->c->createFromDER(a.data(), a.size());
}
-QString RSAKey::toPEM(bool publicOnly) const
+TQString RSAKey::toPEM(bool publicOnly) const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->toPEM(&out, publicOnly))
- return QByteArray();
+ return TQByteArray();
- QCString cs;
+ TQCString cs;
cs.resize(out.size()+1);
memcpy(cs.data(), out.data(), out.size());
- return QString::fromLatin1(cs);
+ return TQString::fromLatin1(cs);
}
-bool RSAKey::fromPEM(const QString &str)
+bool RSAKey::fromPEM(const TQString &str)
{
- QCString cs = str.latin1();
- QByteArray a(cs.length());
+ TQCString cs = str.latin1();
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return d->c->createFromPEM(a.data(), a.size());
}
@@ -602,18 +602,18 @@ bool RSAKey::fromNative(void *p)
return d->c->createFromNative(p);
}
-bool RSAKey::encrypt(const QByteArray &a, QByteArray *b, bool oaep) const
+bool RSAKey::encrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->encrypt(a, &out, oaep))
return false;
*b = out;
return true;
}
-bool RSAKey::decrypt(const QByteArray &a, QByteArray *b, bool oaep) const
+bool RSAKey::decrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->decrypt(a, &out, oaep))
return false;
*b = out;
@@ -647,14 +647,14 @@ void RSA::setKey(const RSAKey &k)
v_key = k;
}
-bool RSA::encrypt(const QByteArray &a, QByteArray *b, bool oaep) const
+bool RSA::encrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const
{
if(v_key.isNull())
return false;
return v_key.encrypt(a, b, oaep);
}
-bool RSA::decrypt(const QByteArray &a, QByteArray *b, bool oaep) const
+bool RSA::decrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const
{
if(v_key.isNull())
return false;
@@ -723,84 +723,84 @@ bool Cert::isNull() const
return d->c->isNull();
}
-QString Cert::commonName() const
+TQString Cert::commonName() const
{
CertProperties props = subject();
return props["CN"];
}
-QString Cert::serialNumber() const
+TQString Cert::serialNumber() const
{
return d->c->serialNumber();
}
-QString Cert::subjectString() const
+TQString Cert::subjectString() const
{
return d->c->subjectString();
}
-QString Cert::issuerString() const
+TQString Cert::issuerString() const
{
return d->c->issuerString();
}
CertProperties Cert::subject() const
{
- QValueList<QCA_CertProperty> list = d->c->subject();
+ TQValueList<QCA_CertProperty> list = d->c->subject();
CertProperties props;
- for(QValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for(TQValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it)
props[(*it).var] = (*it).val;
return props;
}
CertProperties Cert::issuer() const
{
- QValueList<QCA_CertProperty> list = d->c->issuer();
+ TQValueList<QCA_CertProperty> list = d->c->issuer();
CertProperties props;
- for(QValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for(TQValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it)
props[(*it).var] = (*it).val;
return props;
}
-QDateTime Cert::notBefore() const
+TQDateTime Cert::notBefore() const
{
return d->c->notBefore();
}
-QDateTime Cert::notAfter() const
+TQDateTime Cert::notAfter() const
{
return d->c->notAfter();
}
-QByteArray Cert::toDER() const
+TQByteArray Cert::toDER() const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->toDER(&out))
- return QByteArray();
+ return TQByteArray();
return out;
}
-bool Cert::fromDER(const QByteArray &a)
+bool Cert::fromDER(const TQByteArray &a)
{
return d->c->createFromDER(a.data(), a.size());
}
-QString Cert::toPEM() const
+TQString Cert::toPEM() const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->toPEM(&out))
- return QByteArray();
+ return TQByteArray();
- QCString cs;
+ TQCString cs;
cs.resize(out.size()+1);
memcpy(cs.data(), out.data(), out.size());
- return QString::fromLatin1(cs);
+ return TQString::fromLatin1(cs);
}
-bool Cert::fromPEM(const QString &str)
+bool Cert::fromPEM(const TQString &str)
{
- QCString cs = str.latin1();
- QByteArray a(cs.length());
+ TQCString cs = str.latin1();
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return d->c->createFromPEM(a.data(), a.size());
}
@@ -837,7 +837,7 @@ public:
tryMore = false;
}
- void appendArray(QByteArray *a, const QByteArray &b)
+ void appendArray(TQByteArray *a, const TQByteArray &b)
{
int oldsize = a->size();
a->resize(oldsize + b.size());
@@ -846,21 +846,21 @@ public:
Cert cert;
QCA_TLSContext *c;
- QByteArray in, out, to_net, from_net;
+ TQByteArray in, out, to_net, from_net;
int bytesEncoded;
bool tryMore;
bool handshaken;
- QString host;
+ TQString host;
bool hostMismatch;
bool closing;
Cert ourCert;
RSAKey ourKey;
- QPtrList<QCA_CertContext> store;
+ TQPtrList<QCA_CertContext> store;
};
-TLS::TLS(QObject *parent)
-:QObject(parent)
+TLS::TLS(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
}
@@ -876,11 +876,11 @@ void TLS::setCertificate(const Cert &cert, const RSAKey &key)
d->ourKey = key;
}
-void TLS::setCertificateStore(const QPtrList<Cert> &store)
+void TLS::setCertificateStore(const TQPtrList<Cert> &store)
{
// convert the cert list into a context list
d->store.clear();
- QPtrListIterator<Cert> it(store);
+ TQPtrListIterator<Cert> it(store);
for(Cert *cert; (cert = it.current()); ++it)
d->store.append(cert->d->c);
}
@@ -890,14 +890,14 @@ void TLS::reset()
d->reset();
}
-bool TLS::startClient(const QString &host)
+bool TLS::startClient(const TQString &host)
{
d->reset();
d->host = host;
if(!d->c->startClient(d->store, *d->ourCert.d->c, *d->ourKey.d->c))
return false;
- QTimer::singleShot(0, this, SLOT(update()));
+ TQTimer::singleShot(0, this, TQT_SLOT(update()));
return true;
}
@@ -907,7 +907,7 @@ bool TLS::startServer()
if(!d->c->startServer(d->store, *d->ourCert.d->c, *d->ourKey.d->c))
return false;
- QTimer::singleShot(0, this, SLOT(update()));
+ TQTimer::singleShot(0, this, TQT_SLOT(update()));
return true;
}
@@ -917,7 +917,7 @@ void TLS::close()
return;
d->closing = true;
- QTimer::singleShot(0, this, SLOT(update()));
+ TQTimer::singleShot(0, this, TQT_SLOT(update()));
}
bool TLS::isHandshaken() const
@@ -925,35 +925,35 @@ bool TLS::isHandshaken() const
return d->handshaken;
}
-void TLS::write(const QByteArray &a)
+void TLS::write(const TQByteArray &a)
{
d->appendArray(&d->out, a);
update();
}
-QByteArray TLS::read()
+TQByteArray TLS::read()
{
- QByteArray a = d->in.copy();
+ TQByteArray a = d->in.copy();
d->in.resize(0);
return a;
}
-void TLS::writeIncoming(const QByteArray &a)
+void TLS::writeIncoming(const TQByteArray &a)
{
d->appendArray(&d->from_net, a);
update();
}
-QByteArray TLS::readOutgoing()
+TQByteArray TLS::readOutgoing()
{
- QByteArray a = d->to_net.copy();
+ TQByteArray a = d->to_net.copy();
d->to_net.resize(0);
return a;
}
-QByteArray TLS::readUnprocessed()
+TQByteArray TLS::readUnprocessed()
{
- QByteArray a = d->from_net.copy();
+ TQByteArray a = d->from_net.copy();
d->from_net.resize(0);
return a;
}
@@ -976,10 +976,10 @@ void TLS::update()
bool force_read = false;
bool eof = false;
bool done = false;
- QGuardedPtr<TLS> self = this;
+ TQGuardedPtr<TLS> self = this;
if(d->closing) {
- QByteArray a;
+ TQByteArray a;
int r = d->c->shutdown(d->from_net, &a);
d->from_net.resize(0);
if(r == QCA_TLSContext::Error) {
@@ -995,7 +995,7 @@ void TLS::update()
}
else {
if(!d->handshaken) {
- QByteArray a;
+ TQByteArray a;
int r = d->c->handshake(d->from_net, &a);
d->from_net.resize(0);
if(r == QCA_TLSContext::Error) {
@@ -1024,7 +1024,7 @@ void TLS::update()
if(d->handshaken) {
if(!d->out.isEmpty() || d->tryMore) {
d->tryMore = false;
- QByteArray a;
+ TQByteArray a;
int enc;
bool more = false;
bool ok = d->c->encode(d->out, &a, &enc);
@@ -1045,7 +1045,7 @@ void TLS::update()
}
}
if(!d->from_net.isEmpty() || force_read) {
- QByteArray a, b;
+ TQByteArray a, b;
bool ok = d->c->decode(d->from_net, &a, &b);
eof = d->c->eof();
d->from_net.resize(0);
@@ -1091,7 +1091,7 @@ void TLS::update()
//----------------------------------------------------------------------------
// SASL
//----------------------------------------------------------------------------
-QString saslappname = "qca";
+TQString saslappname = "qca";
class SASL::Private
{
public:
@@ -1113,22 +1113,22 @@ public:
// security opts
bool noPlain, noActive, noDict, noAnon, reqForward, reqCreds, reqMutual;
int ssfmin, ssfmax;
- QString ext_authid;
+ TQString ext_authid;
int ext_ssf;
bool tried;
QCA_SASLContext *c;
- QHostAddress localAddr, remoteAddr;
+ TQHostAddress localAddr, remoteAddr;
int localPort, remotePort;
- QByteArray stepData;
+ TQByteArray stepData;
bool allowCSF;
bool first, server;
- QByteArray inbuf, outbuf;
+ TQByteArray inbuf, outbuf;
};
-SASL::SASL(QObject *parent)
-:QObject(parent)
+SASL::SASL(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
reset();
@@ -1139,7 +1139,7 @@ SASL::~SASL()
delete d;
}
-void SASL::setAppName(const QString &name)
+void SASL::setAppName(const TQString &name)
{
saslappname = name;
}
@@ -1217,7 +1217,7 @@ void SASL::setMaximumSSF(int x)
d->ssfmax = x;
}
-void SASL::setExternalAuthID(const QString &authid)
+void SASL::setExternalAuthID(const TQString &authid)
{
d->ext_authid = authid;
}
@@ -1227,19 +1227,19 @@ void SASL::setExternalSSF(int x)
d->ext_ssf = x;
}
-void SASL::setLocalAddr(const QHostAddress &addr, Q_UINT16 port)
+void SASL::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port)
{
d->localAddr = addr;
d->localPort = port;
}
-void SASL::setRemoteAddr(const QHostAddress &addr, Q_UINT16 port)
+void SASL::setRemoteAddr(const TQHostAddress &addr, Q_UINT16 port)
{
d->remoteAddr = addr;
d->remotePort = port;
}
-bool SASL::startClient(const QString &service, const QString &host, const QStringList &mechlist, bool allowClientSendFirst)
+bool SASL::startClient(const TQString &service, const TQString &host, const TQStringList &mechlist, bool allowClientSendFirst)
{
QCA_SASLHostPort la, ra;
if(d->localPort != -1) {
@@ -1260,11 +1260,11 @@ bool SASL::startClient(const QString &service, const QString &host, const QStrin
d->first = true;
d->server = false;
d->tried = false;
- QTimer::singleShot(0, this, SLOT(tryAgain()));
+ TQTimer::singleShot(0, this, TQT_SLOT(tryAgain()));
return true;
}
-bool SASL::startServer(const QString &service, const QString &host, const QString &realm, QStringList *mechlist)
+bool SASL::startServer(const TQString &service, const TQString &host, const TQString &realm, TQStringList *mechlist)
{
QCA_SASLHostPort la, ra;
if(d->localPort != -1) {
@@ -1287,13 +1287,13 @@ bool SASL::startServer(const QString &service, const QString &host, const QStrin
return true;
}
-void SASL::putServerFirstStep(const QString &mech)
+void SASL::putServerFirstStep(const TQString &mech)
{
int r = d->c->serverFirstStep(mech, 0);
handleServerFirstStep(r);
}
-void SASL::putServerFirstStep(const QString &mech, const QByteArray &clientInit)
+void SASL::putServerFirstStep(const TQString &mech, const TQByteArray &clientInit)
{
int r = d->c->serverFirstStep(mech, &clientInit);
handleServerFirstStep(r);
@@ -1311,28 +1311,28 @@ void SASL::handleServerFirstStep(int r)
error(ErrAuth);
}
-void SASL::putStep(const QByteArray &stepData)
+void SASL::putStep(const TQByteArray &stepData)
{
d->stepData = stepData.copy();
tryAgain();
}
-void SASL::setUsername(const QString &user)
+void SASL::setUsername(const TQString &user)
{
d->c->setClientParams(&user, 0, 0, 0);
}
-void SASL::setAuthzid(const QString &authzid)
+void SASL::setAuthzid(const TQString &authzid)
{
d->c->setClientParams(0, &authzid, 0, 0);
}
-void SASL::setPassword(const QString &pass)
+void SASL::setPassword(const TQString &pass)
{
d->c->setClientParams(0, 0, &pass, 0);
}
-void SASL::setRealm(const QString &realm)
+void SASL::setRealm(const TQString &realm)
{
d->c->setClientParams(0, 0, 0, &realm);
}
@@ -1394,8 +1394,8 @@ void SASL::tryAgain()
return;
}
- QString mech = d->c->mech();
- const QByteArray *clientInit = d->c->clientInit();
+ TQString mech = d->c->mech();
+ const TQByteArray *clientInit = d->c->clientInit();
d->first = false;
d->tried = false;
@@ -1438,9 +1438,9 @@ int SASL::ssf() const
return d->c->security();
}
-void SASL::write(const QByteArray &a)
+void SASL::write(const TQByteArray &a)
{
- QByteArray b;
+ TQByteArray b;
if(!d->c->encode(a, &b)) {
error(ErrCrypt);
return;
@@ -1451,16 +1451,16 @@ void SASL::write(const QByteArray &a)
readyReadOutgoing(a.size());
}
-QByteArray SASL::read()
+TQByteArray SASL::read()
{
- QByteArray a = d->inbuf.copy();
+ TQByteArray a = d->inbuf.copy();
d->inbuf.resize(0);
return a;
}
-void SASL::writeIncoming(const QByteArray &a)
+void SASL::writeIncoming(const TQByteArray &a)
{
- QByteArray b;
+ TQByteArray b;
if(!d->c->decode(a, &b)) {
error(ErrCrypt);
return;
@@ -1471,9 +1471,9 @@ void SASL::writeIncoming(const QByteArray &a)
readyRead();
}
-QByteArray SASL::readOutgoing()
+TQByteArray SASL::readOutgoing()
{
- QByteArray a = d->outbuf.copy();
+ TQByteArray a = d->outbuf.copy();
d->outbuf.resize(0);
return a;
}
diff --git a/kopete/protocols/jabber/libiris/qca/src/qca.h b/kopete/protocols/jabber/libiris/qca/src/qca.h
index 1a52a826..46b25cc9 100644
--- a/kopete/protocols/jabber/libiris/qca/src/qca.h
+++ b/kopete/protocols/jabber/libiris/qca/src/qca.h
@@ -21,12 +21,12 @@
#ifndef QCA_H
#define QCA_H
-#include<qstring.h>
-#include<qcstring.h>
-#include<qdatetime.h>
-#include<qmap.h>
-#include<qptrlist.h>
-#include<qobject.h>
+#include<tqstring.h>
+#include<tqcstring.h>
+#include<tqdatetime.h>
+#include<tqmap.h>
+#include<tqptrlist.h>
+#include<tqobject.h>
#ifdef Q_OS_WIN32
# ifndef QCA_STATIC
@@ -91,8 +91,8 @@ namespace QCA
QCA_EXPORT void insertProvider(QCAProvider *);
QCA_EXPORT void unloadAllPlugins();
- QCA_EXPORT QString arrayToHex(const QByteArray &);
- QCA_EXPORT QByteArray hexToArray(const QString &);
+ QCA_EXPORT TQString arrayToHex(const TQByteArray &);
+ QCA_EXPORT TQByteArray hexToArray(const TQString &);
class QCA_EXPORT Hash
{
@@ -102,8 +102,8 @@ namespace QCA
~Hash();
void clear();
- void update(const QByteArray &a);
- QByteArray final();
+ void update(const TQByteArray &a);
+ TQByteArray final();
protected:
Hash(QCA_HashContext *);
@@ -119,26 +119,26 @@ namespace QCA
public:
HashStatic<T>() {}
- static QByteArray hash(const QByteArray &a)
+ static TQByteArray hash(const TQByteArray &a)
{
T obj;
obj.update(a);
return obj.final();
}
- static QByteArray hash(const QCString &cs)
+ static TQByteArray hash(const TQCString &cs)
{
- QByteArray a(cs.length());
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return hash(a);
}
- static QString hashToString(const QByteArray &a)
+ static TQString hashToString(const TQByteArray &a)
{
return arrayToHex(hash(a));
}
- static QString hashToString(const QCString &cs)
+ static TQString hashToString(const TQCString &cs)
{
return arrayToHex(hash(cs));
}
@@ -151,14 +151,14 @@ namespace QCA
Cipher & operator=(const Cipher &);
~Cipher();
- QByteArray dyn_generateKey(int size=-1) const;
- QByteArray dyn_generateIV() const;
- void reset(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad=true);
- bool update(const QByteArray &a);
- QByteArray final(bool *ok=0);
+ TQByteArray dyn_generateKey(int size=-1) const;
+ TQByteArray dyn_generateIV() const;
+ void reset(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad=true);
+ bool update(const TQByteArray &a);
+ TQByteArray final(bool *ok=0);
protected:
- Cipher(QCA_CipherContext *, int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad);
+ Cipher(QCA_CipherContext *, int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad);
private:
class Private;
@@ -171,13 +171,13 @@ namespace QCA
public:
CipherStatic<T>() {}
- static QByteArray generateKey(int size=-1)
+ static TQByteArray generateKey(int size=-1)
{
T obj;
return obj.dyn_generateKey(size);
}
- static QByteArray generateIV()
+ static TQByteArray generateIV()
{
T obj;
return obj.dyn_generateIV();
@@ -205,25 +205,25 @@ namespace QCA
class QCA_EXPORT BlowFish : public Cipher, public CipherStatic<BlowFish>
{
public:
- BlowFish(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true);
+ BlowFish(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true);
};
class QCA_EXPORT TripleDES : public Cipher, public CipherStatic<TripleDES>
{
public:
- TripleDES(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true);
+ TripleDES(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true);
};
class QCA_EXPORT AES128 : public Cipher, public CipherStatic<AES128>
{
public:
- AES128(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true);
+ AES128(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true);
};
class QCA_EXPORT AES256 : public Cipher, public CipherStatic<AES256>
{
public:
- AES256(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true);
+ AES256(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true);
};
class RSA;
@@ -239,11 +239,11 @@ namespace QCA
bool havePublic() const;
bool havePrivate() const;
- QByteArray toDER(bool publicOnly=false) const;
- bool fromDER(const QByteArray &a);
+ TQByteArray toDER(bool publicOnly=false) const;
+ bool fromDER(const TQByteArray &a);
- QString toPEM(bool publicOnly=false) const;
- bool fromPEM(const QString &);
+ TQString toPEM(bool publicOnly=false) const;
+ bool fromPEM(const TQString &);
// only call if you know what you are doing
bool fromNative(void *);
@@ -254,8 +254,8 @@ namespace QCA
friend class RSA;
friend class TLS;
- bool encrypt(const QByteArray &a, QByteArray *out, bool oaep) const;
- bool decrypt(const QByteArray &a, QByteArray *out, bool oaep) const;
+ bool encrypt(const TQByteArray &a, TQByteArray *out, bool oaep) const;
+ bool decrypt(const TQByteArray &a, TQByteArray *out, bool oaep) const;
bool generate(unsigned int bits);
};
@@ -268,8 +268,8 @@ namespace QCA
RSAKey key() const;
void setKey(const RSAKey &);
- bool encrypt(const QByteArray &a, QByteArray *out, bool oaep=false) const;
- bool decrypt(const QByteArray &a, QByteArray *out, bool oaep=false) const;
+ bool encrypt(const TQByteArray &a, TQByteArray *out, bool oaep=false) const;
+ bool decrypt(const TQByteArray &a, TQByteArray *out, bool oaep=false) const;
static RSAKey generateKey(unsigned int bits);
@@ -277,7 +277,7 @@ namespace QCA
RSAKey v_key;
};
- typedef QMap<QString, QString> CertProperties;
+ typedef TQMap<TQString, TQString> CertProperties;
class QCA_EXPORT Cert
{
public:
@@ -288,20 +288,20 @@ namespace QCA
bool isNull() const;
- QString commonName() const;
- QString serialNumber() const;
- QString subjectString() const;
- QString issuerString() const;
+ TQString commonName() const;
+ TQString serialNumber() const;
+ TQString subjectString() const;
+ TQString issuerString() const;
CertProperties subject() const;
CertProperties issuer() const;
- QDateTime notBefore() const;
- QDateTime notAfter() const;
+ TQDateTime notBefore() const;
+ TQDateTime notAfter() const;
- QByteArray toDER() const;
- bool fromDER(const QByteArray &a);
+ TQByteArray toDER() const;
+ bool fromDER(const TQByteArray &a);
- QString toPEM() const;
- bool fromPEM(const QString &);
+ TQString toPEM() const;
+ bool fromPEM(const TQString &);
private:
class Private;
@@ -332,26 +332,26 @@ namespace QCA
};
enum Error { ErrHandshake, ErrCrypt };
- TLS(QObject *parent=0);
+ TLS(TQObject *parent=0);
~TLS();
void setCertificate(const Cert &cert, const RSAKey &key);
- void setCertificateStore(const QPtrList<Cert> &store); // note: store must persist
+ void setCertificateStore(const TQPtrList<Cert> &store); // note: store must persist
void reset();
- bool startClient(const QString &host="");
+ bool startClient(const TQString &host="");
bool startServer();
void close();
bool isHandshaken() const;
// plain (application side)
- void write(const QByteArray &a);
- QByteArray read();
+ void write(const TQByteArray &a);
+ TQByteArray read();
// encoded (socket side)
- void writeIncoming(const QByteArray &a);
- QByteArray readOutgoing();
- QByteArray readUnprocessed();
+ void writeIncoming(const TQByteArray &a);
+ TQByteArray readOutgoing();
+ TQByteArray readUnprocessed();
// cert related
const Cert & peerCertificate() const;
@@ -390,10 +390,10 @@ namespace QCA
NoUser,
RemoteUnavail
};
- SASL(QObject *parent=0);
+ SASL(TQObject *parent=0);
~SASL();
- static void setAppName(const QString &name);
+ static void setAppName(const TQString &name);
void reset();
int errorCondition() const;
@@ -409,40 +409,40 @@ namespace QCA
void setMinimumSSF(int);
void setMaximumSSF(int);
- void setExternalAuthID(const QString &authid);
+ void setExternalAuthID(const TQString &authid);
void setExternalSSF(int);
- void setLocalAddr(const QHostAddress &addr, Q_UINT16 port);
- void setRemoteAddr(const QHostAddress &addr, Q_UINT16 port);
+ void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port);
+ void setRemoteAddr(const TQHostAddress &addr, Q_UINT16 port);
// initialize
- bool startClient(const QString &service, const QString &host, const QStringList &mechlist, bool allowClientSendFirst=true);
- bool startServer(const QString &service, const QString &host, const QString &realm, QStringList *mechlist);
+ bool startClient(const TQString &service, const TQString &host, const TQStringList &mechlist, bool allowClientSendFirst=true);
+ bool startServer(const TQString &service, const TQString &host, const TQString &realm, TQStringList *mechlist);
// authentication
- void putStep(const QByteArray &stepData);
- void putServerFirstStep(const QString &mech);
- void putServerFirstStep(const QString &mech, const QByteArray &clientInit);
- void setUsername(const QString &user);
- void setAuthzid(const QString &auth);
- void setPassword(const QString &pass);
- void setRealm(const QString &realm);
+ void putStep(const TQByteArray &stepData);
+ void putServerFirstStep(const TQString &mech);
+ void putServerFirstStep(const TQString &mech, const TQByteArray &clientInit);
+ void setUsername(const TQString &user);
+ void setAuthzid(const TQString &auth);
+ void setPassword(const TQString &pass);
+ void setRealm(const TQString &realm);
void continueAfterParams();
void continueAfterAuthCheck();
// security layer
int ssf() const;
- void write(const QByteArray &a);
- QByteArray read();
- void writeIncoming(const QByteArray &a);
- QByteArray readOutgoing();
+ void write(const TQByteArray &a);
+ TQByteArray read();
+ void writeIncoming(const TQByteArray &a);
+ TQByteArray readOutgoing();
signals:
// for authentication
- void clientFirstStep(const QString &mech, const QByteArray *clientInit);
- void nextStep(const QByteArray &stepData);
+ void clientFirstStep(const TQString &mech, const TQByteArray *clientInit);
+ void nextStep(const TQByteArray &stepData);
void needParams(bool user, bool authzid, bool pass, bool realm);
- void authCheck(const QString &user, const QString &authzid);
+ void authCheck(const TQString &user, const TQString &authzid);
void authenticated();
// for security layer
diff --git a/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h b/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h
index e6172434..6eda17f9 100644
--- a/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h
+++ b/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h
@@ -21,11 +21,11 @@
#ifndef QCAPROVIDER_H
#define QCAPROVIDER_H
-#include<qglobal.h>
-#include<qstring.h>
-#include<qdatetime.h>
-#include<qobject.h>
-#include<qhostaddress.h>
+#include<tqglobal.h>
+#include<tqstring.h>
+#include<tqdatetime.h>
+#include<tqobject.h>
+#include<tqhostaddress.h>
#include"qca.h"
#define QCA_PLUGIN_VERSION 1
@@ -50,7 +50,7 @@ public:
virtual QCA_HashContext *clone()=0;
virtual void reset()=0;
virtual void update(const char *in, unsigned int len)=0;
- virtual void final(QByteArray *out)=0;
+ virtual void final(TQByteArray *out)=0;
};
class QCA_CipherContext
@@ -66,7 +66,7 @@ public:
virtual bool setup(int dir, int mode, const char *key, int keysize, const char *iv, bool pad)=0;
virtual bool update(const char *in, unsigned int len)=0;
- virtual bool final(QByteArray *out)=0;
+ virtual bool final(TQByteArray *out)=0;
};
class QCA_RSAKeyContext
@@ -82,17 +82,17 @@ public:
virtual bool createFromPEM(const char *in, unsigned int len)=0;
virtual bool createFromNative(void *in)=0;
virtual bool generate(unsigned int bits)=0;
- virtual bool toDER(QByteArray *out, bool publicOnly)=0;
- virtual bool toPEM(QByteArray *out, bool publicOnly)=0;
+ virtual bool toDER(TQByteArray *out, bool publicOnly)=0;
+ virtual bool toPEM(TQByteArray *out, bool publicOnly)=0;
- virtual bool encrypt(const QByteArray &in, QByteArray *out, bool oaep)=0;
- virtual bool decrypt(const QByteArray &in, QByteArray *out, bool oaep)=0;
+ virtual bool encrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0;
+ virtual bool decrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0;
};
struct QCA_CertProperty
{
- QString var;
- QString val;
+ TQString var;
+ TQString val;
};
class QCA_CertContext
@@ -104,17 +104,17 @@ public:
virtual bool isNull() const=0;
virtual bool createFromDER(const char *in, unsigned int len)=0;
virtual bool createFromPEM(const char *in, unsigned int len)=0;
- virtual bool toDER(QByteArray *out)=0;
- virtual bool toPEM(QByteArray *out)=0;
-
- virtual QString serialNumber() const=0;
- virtual QString subjectString() const=0;
- virtual QString issuerString() const=0;
- virtual QValueList<QCA_CertProperty> subject() const=0;
- virtual QValueList<QCA_CertProperty> issuer() const=0;
- virtual QDateTime notBefore() const=0;
- virtual QDateTime notAfter() const=0;
- virtual bool matchesAddress(const QString &realHost) const=0;
+ virtual bool toDER(TQByteArray *out)=0;
+ virtual bool toPEM(TQByteArray *out)=0;
+
+ virtual TQString serialNumber() const=0;
+ virtual TQString subjectString() const=0;
+ virtual TQString issuerString() const=0;
+ virtual TQValueList<QCA_CertProperty> subject() const=0;
+ virtual TQValueList<QCA_CertProperty> issuer() const=0;
+ virtual TQDateTime notBefore() const=0;
+ virtual TQDateTime notAfter() const=0;
+ virtual bool matchesAddress(const TQString &realHost) const=0;
};
class QCA_TLSContext
@@ -124,15 +124,15 @@ public:
virtual ~QCA_TLSContext() {}
virtual void reset()=0;
- virtual bool startClient(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
- virtual bool startServer(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
+ virtual bool startClient(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
+ virtual bool startServer(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
- virtual int handshake(const QByteArray &in, QByteArray *out)=0;
- virtual int shutdown(const QByteArray &in, QByteArray *out)=0;
- virtual bool encode(const QByteArray &plain, QByteArray *to_net, int *encoded)=0;
- virtual bool decode(const QByteArray &from_net, QByteArray *plain, QByteArray *to_net)=0;
+ virtual int handshake(const TQByteArray &in, TQByteArray *out)=0;
+ virtual int shutdown(const TQByteArray &in, TQByteArray *out)=0;
+ virtual bool encode(const TQByteArray &plain, TQByteArray *to_net, int *encoded)=0;
+ virtual bool decode(const TQByteArray &from_net, TQByteArray *plain, TQByteArray *to_net)=0;
virtual bool eof() const=0;
- virtual QByteArray unprocessed()=0;
+ virtual TQByteArray unprocessed()=0;
virtual QCA_CertContext *peerCertificate() const=0;
virtual int validityResult() const=0;
@@ -140,7 +140,7 @@ public:
struct QCA_SASLHostPort
{
- QHostAddress addr;
+ TQHostAddress addr;
Q_UINT16 port;
};
@@ -157,35 +157,35 @@ public:
// common
virtual void reset()=0;
- virtual void setCoreProps(const QString &service, const QString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0;
- virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const QString &_ext_authid, int _ext_ssf)=0;
+ virtual void setCoreProps(const TQString &service, const TQString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0;
+ virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const TQString &_ext_authid, int _ext_ssf)=0;
virtual int security() const=0;
virtual int errorCond() const=0;
// init / first step
- virtual bool clientStart(const QStringList &mechlist)=0;
+ virtual bool clientStart(const TQStringList &mechlist)=0;
virtual int clientFirstStep(bool allowClientSendFirst)=0;
- virtual bool serverStart(const QString &realm, QStringList *mechlist, const QString &name)=0;
- virtual int serverFirstStep(const QString &mech, const QByteArray *in)=0;
+ virtual bool serverStart(const TQString &realm, TQStringList *mechlist, const TQString &name)=0;
+ virtual int serverFirstStep(const TQString &mech, const TQByteArray *in)=0;
// get / set params
virtual QCA_SASLNeedParams clientParamsNeeded() const=0;
- virtual void setClientParams(const QString *user, const QString *authzid, const QString *pass, const QString *realm)=0;
- virtual QString username() const=0;
- virtual QString authzid() const=0;
+ virtual void setClientParams(const TQString *user, const TQString *authzid, const TQString *pass, const TQString *realm)=0;
+ virtual TQString username() const=0;
+ virtual TQString authzid() const=0;
// continue steps
- virtual int nextStep(const QByteArray &in)=0;
+ virtual int nextStep(const TQByteArray &in)=0;
virtual int tryAgain()=0;
// results
- virtual QString mech() const=0;
- virtual const QByteArray *clientInit() const=0;
- virtual QByteArray result() const=0;
+ virtual TQString mech() const=0;
+ virtual const TQByteArray *clientInit() const=0;
+ virtual TQByteArray result() const=0;
// security layer
- virtual bool encode(const QByteArray &in, QByteArray *out)=0;
- virtual bool decode(const QByteArray &in, QByteArray *out)=0;
+ virtual bool encode(const TQByteArray &in, TQByteArray *out)=0;
+ virtual bool decode(const TQByteArray &in, TQByteArray *out)=0;
};
#endif
diff --git a/kopete/protocols/jabber/ui/dlgjabberbrowse.cpp b/kopete/protocols/jabber/ui/dlgjabberbrowse.cpp
index f8e2b4ce..be558388 100644
--- a/kopete/protocols/jabber/ui/dlgjabberbrowse.cpp
+++ b/kopete/protocols/jabber/ui/dlgjabberbrowse.cpp
@@ -17,9 +17,9 @@
***************************************************************************/
#include <kpushbutton.h>
-#include <qgroupbox.h>
-#include <qtable.h>
-#include <qlabel.h>
+#include <tqgroupbox.h>
+#include <tqtable.h>
+#include <tqlabel.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -30,7 +30,7 @@
#include "jabberformtranslator.h"
#include "dlgjabberbrowse.h"
-dlgJabberBrowse::dlgJabberBrowse (JabberAccount *account, const XMPP::Jid & jid, QWidget * parent, const char *name):dlgBrowse (parent, name)
+dlgJabberBrowse::dlgJabberBrowse (JabberAccount *account, const XMPP::Jid & jid, TQWidget * parent, const char *name):dlgBrowse (parent, name)
{
m_account = account;
@@ -41,11 +41,11 @@ dlgJabberBrowse::dlgJabberBrowse (JabberAccount *account, const XMPP::Jid & jid,
tblResults->setNumRows (0);
// disable user selections
- tblResults->setSelectionMode (QTable::NoSelection);
+ tblResults->setSelectionMode (TQTable::NoSelection);
XMPP::JT_Search * task = new XMPP::JT_Search (m_account->client()->rootTask ());
- connect (task, SIGNAL (finished ()), this, SLOT (slotGotForm ()));
+ connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotGotForm ()));
task->get (jid);
task->go (true);
@@ -83,7 +83,7 @@ void dlgJabberBrowse::slotGotForm ()
tblResults->setColumnStretchable (i, true);
}
- connect (btnSearch, SIGNAL (clicked ()), this, SLOT (slotSendForm ()));
+ connect (btnSearch, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotSendForm ()));
}
@@ -92,7 +92,7 @@ void dlgJabberBrowse::slotSendForm ()
XMPP::JT_Search * task = new XMPP::JT_Search (m_account->client()->rootTask ());
- connect (task, SIGNAL (finished ()), this, SLOT (slotSentForm ()));
+ connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotSentForm ()));
task->set (translator->resultData ());
task->go (true);
@@ -120,7 +120,7 @@ void dlgJabberBrowse::slotSentForm ()
int row = 0;
- for (QValueList < XMPP::SearchResult >::const_iterator it = task->results ().begin (); it != task->results ().end (); ++it)
+ for (TQValueList < XMPP::SearchResult >::const_iterator it = task->results ().begin (); it != task->results ().end (); ++it)
{
tblResults->setText (row, 0, (*it).jid ().userHost ());
tblResults->setText (row, 1, (*it).first ());
diff --git a/kopete/protocols/jabber/ui/dlgjabberbrowse.h b/kopete/protocols/jabber/ui/dlgjabberbrowse.h
index 8a8b6cc1..20886005 100644
--- a/kopete/protocols/jabber/ui/dlgjabberbrowse.h
+++ b/kopete/protocols/jabber/ui/dlgjabberbrowse.h
@@ -19,7 +19,7 @@
#ifndef DLGJABBERBROWSE_H
#define DLGJABBERBROWSE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "xmpp_tasks.h"
@@ -37,7 +37,7 @@ class dlgJabberBrowse:public dlgBrowse
Q_OBJECT
public:
- dlgJabberBrowse (JabberAccount *account, const XMPP::Jid & jid, QWidget * parent = 0, const char *name = 0);
+ dlgJabberBrowse (JabberAccount *account, const XMPP::Jid & jid, TQWidget * parent = 0, const char *name = 0);
~dlgJabberBrowse ();
private slots:
diff --git a/kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp b/kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp
index 9f6ae65d..948a594e 100644
--- a/kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp
+++ b/kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp
@@ -23,14 +23,14 @@
#include <klocale.h>
#include <kpassdlg.h>
#include <kmessagebox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
#include <kopetepassword.h>
#include <xmpp_tasks.h>
#include "jabberaccount.h"
#include "dlgchangepassword.h"
-DlgJabberChangePassword::DlgJabberChangePassword ( JabberAccount *account, QWidget *parent, const char *name )
+DlgJabberChangePassword::DlgJabberChangePassword ( JabberAccount *account, TQWidget *parent, const char *name )
: KDialogBase ( parent, name, true, i18n("Change Jabber Password"),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true )
{
@@ -80,7 +80,7 @@ void DlgJabberChangePassword::slotOk ()
i18n ( "Your account needs to be connected before the password can be changed. Do you want to try to connect now?" ),
i18n ( "Jabber Password Change" ), i18n("Connect"), i18n("Stay Offline") ) == KMessageBox::Yes )
{
- connect ( m_account, SIGNAL ( isConnectedChanged () ), this, SLOT ( slotChangePassword () ) );
+ connect ( m_account, TQT_SIGNAL ( isConnectedChanged () ), this, TQT_SLOT ( slotChangePassword () ) );
m_account->connect ();
}
}
@@ -102,7 +102,7 @@ void DlgJabberChangePassword::slotChangePassword ()
{
XMPP::JT_Register *task = new XMPP::JT_Register ( m_account->client()->rootTask () );
- QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotChangePasswordDone () ) );
+ TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotChangePasswordDone () ) );
task->changepw ( m_mainWidget->peNewPassword1->password () );
task->go ( true );
@@ -116,7 +116,7 @@ void DlgJabberChangePassword::slotChangePasswordDone ()
if ( task->success () )
{
- KMessageBox::queuedMessageBox ( dynamic_cast<QWidget*>(parent()), KMessageBox::Information,
+ KMessageBox::queuedMessageBox ( dynamic_cast<TQWidget*>(parent()), KMessageBox::Information,
i18n ( "Your password has been changed successfully. Please note that the change may not be instantaneous. If you have problems logging in with your new password, please contact the administrator." ),
i18n ( "Jabber Password Change" ) );
@@ -124,7 +124,7 @@ void DlgJabberChangePassword::slotChangePasswordDone ()
}
else
{
- KMessageBox::queuedMessageBox ( dynamic_cast<QWidget*>(parent()), KMessageBox::Sorry,
+ KMessageBox::queuedMessageBox ( dynamic_cast<TQWidget*>(parent()), KMessageBox::Sorry,
i18n ( "Your password could not be changed. Either your server does not support this feature or the administrator does not allow you to change your password." ) );
}
diff --git a/kopete/protocols/jabber/ui/dlgjabberchangepassword.h b/kopete/protocols/jabber/ui/dlgjabberchangepassword.h
index 84e880c5..023485ec 100644
--- a/kopete/protocols/jabber/ui/dlgjabberchangepassword.h
+++ b/kopete/protocols/jabber/ui/dlgjabberchangepassword.h
@@ -34,7 +34,7 @@ class DlgJabberChangePassword : public KDialogBase
Q_OBJECT
public:
- DlgJabberChangePassword ( JabberAccount *account, QWidget *parent = 0, const char *name = 0);
+ DlgJabberChangePassword ( JabberAccount *account, TQWidget *parent = 0, const char *name = 0);
~DlgJabberChangePassword();
private slots:
diff --git a/kopete/protocols/jabber/ui/dlgjabberchatjoin.cpp b/kopete/protocols/jabber/ui/dlgjabberchatjoin.cpp
index 620bff03..9d69beae 100644
--- a/kopete/protocols/jabber/ui/dlgjabberchatjoin.cpp
+++ b/kopete/protocols/jabber/ui/dlgjabberchatjoin.cpp
@@ -18,8 +18,8 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#include "jabberaccount.h"
#include "jabberclient.h"
@@ -27,7 +27,7 @@
#include "dlgjabberchatjoin.h"
-dlgJabberChatJoin::dlgJabberChatJoin(JabberAccount *account, QWidget* parent, const char* name) :
+dlgJabberChatJoin::dlgJabberChatJoin(JabberAccount *account, TQWidget* parent, const char* name) :
dlgChatJoin(parent, name),
m_account(account)
{
@@ -77,7 +77,7 @@ void dlgJabberChatJoin::slotBowse()
void dlgJabberChatJoin::checkDefaultChatroomServer()
{
XMPP::JT_GetServices *serviceTask = new XMPP::JT_GetServices(m_account->client()->rootTask());
- connect(serviceTask, SIGNAL (finished()), this, SLOT (slotQueryFinished()));
+ connect(serviceTask, TQT_SIGNAL (finished()), this, TQT_SLOT (slotQueryFinished()));
serviceTask->get(m_account->server());
serviceTask->go(true);
@@ -97,7 +97,7 @@ void dlgJabberChatJoin::slotQueryFinished()
for (XMPP::AgentList::const_iterator it = task->agents().begin(); it != task->agents().end(); ++it)
{
XMPP::JT_DiscoInfo *discoTask = new XMPP::JT_DiscoInfo(m_account->client()->rootTask());
- connect(discoTask, SIGNAL (finished()), this, SLOT (slotDiscoFinished()));
+ connect(discoTask, TQT_SIGNAL (finished()), this, TQT_SLOT (slotDiscoFinished()));
discoTask->get((*it).jid().full());
discoTask->go(true);
diff --git a/kopete/protocols/jabber/ui/dlgjabberchatjoin.h b/kopete/protocols/jabber/ui/dlgjabberchatjoin.h
index fad58fcb..d68ae78e 100644
--- a/kopete/protocols/jabber/ui/dlgjabberchatjoin.h
+++ b/kopete/protocols/jabber/ui/dlgjabberchatjoin.h
@@ -27,7 +27,7 @@ class dlgJabberChatJoin : public dlgChatJoin
Q_OBJECT
public:
- dlgJabberChatJoin(JabberAccount *account, QWidget* parent = 0, const char* name = 0);
+ dlgJabberChatJoin(JabberAccount *account, TQWidget* parent = 0, const char* name = 0);
~dlgJabberChatJoin();
/*$PUBLIC_FUNCTIONS$*/
diff --git a/kopete/protocols/jabber/ui/dlgjabberchatroomslist.cpp b/kopete/protocols/jabber/ui/dlgjabberchatroomslist.cpp
index aea2843f..1803a013 100644
--- a/kopete/protocols/jabber/ui/dlgjabberchatroomslist.cpp
+++ b/kopete/protocols/jabber/ui/dlgjabberchatroomslist.cpp
@@ -13,15 +13,15 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qtable.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqtable.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
#include "dlgjabberchatroomslist.h"
#include "jabberprotocol.h"
-dlgJabberChatRoomsList::dlgJabberChatRoomsList(JabberAccount* account, const QString& server, const QString &nick, QWidget *parent, const char *name) :
+dlgJabberChatRoomsList::dlgJabberChatRoomsList(JabberAccount* account, const TQString& server, const TQString &nick, TQWidget *parent, const char *name) :
dlgChatRoomsList(parent, name),
m_account(account) , m_selectedRow(-1) , m_nick(nick)
{
@@ -74,7 +74,7 @@ void dlgJabberChatRoomsList::slotQuery()
tblChatRoomsList->setNumRows(0);
XMPP::JT_DiscoItems *discoTask = new XMPP::JT_DiscoItems(m_account->client()->rootTask());
- connect (discoTask, SIGNAL(finished()), this, SLOT(slotQueryFinished()));
+ connect (discoTask, TQT_SIGNAL(finished()), this, TQT_SLOT(slotQueryFinished()));
m_chatServer = leServer->text();
discoTask->get(leServer->text());
@@ -102,13 +102,13 @@ void dlgJabberChatRoomsList::slotQueryFinished()
}
}
-void dlgJabberChatRoomsList::slotDoubleClick(int row, int /*col*/, int /*button*/, const QPoint& /*mousePos*/)
+void dlgJabberChatRoomsList::slotDoubleClick(int row, int /*col*/, int /*button*/, const TQPoint& /*mousePos*/)
{
m_selectedRow = row;
slotJoin();
}
-void dlgJabberChatRoomsList::slotClick(int row, int /*col*/, int /*button*/, const QPoint& /*mousePos*/)
+void dlgJabberChatRoomsList::slotClick(int row, int /*col*/, int /*button*/, const TQPoint& /*mousePos*/)
{
m_selectedRow = row;
}
diff --git a/kopete/protocols/jabber/ui/dlgjabberchatroomslist.h b/kopete/protocols/jabber/ui/dlgjabberchatroomslist.h
index 1db296d7..6b1dce7b 100644
--- a/kopete/protocols/jabber/ui/dlgjabberchatroomslist.h
+++ b/kopete/protocols/jabber/ui/dlgjabberchatroomslist.h
@@ -23,7 +23,7 @@ class dlgJabberChatRoomsList : public dlgChatRoomsList
Q_OBJECT
public:
- dlgJabberChatRoomsList(JabberAccount* account, const QString& server = QString::null, const QString& nick = QString::null, QWidget* parent = 0, const char* name = 0);
+ dlgJabberChatRoomsList(JabberAccount* account, const TQString& server = TQString::null, const TQString& nick = TQString::null, TQWidget* parent = 0, const char* name = 0);
~dlgJabberChatRoomsList();
/*$PUBLIC_FUNCTIONS$*/
@@ -31,8 +31,8 @@ public slots:
/*$PUBLIC_SLOTS$*/
virtual void slotJoin();
virtual void slotQuery();
- virtual void slotDoubleClick(int row, int col, int button, const QPoint& mousePos);
- virtual void slotClick(int row, int col, int button, const QPoint& mousePos);
+ virtual void slotDoubleClick(int row, int col, int button, const TQPoint& mousePos);
+ virtual void slotClick(int row, int col, int button, const TQPoint& mousePos);
protected:
/*$PROTECTED_FUNCTIONS$*/
@@ -46,8 +46,8 @@ private:
JabberAccount *m_account;
int m_selectedRow;
- QString m_chatServer;
- QString m_nick;
+ TQString m_chatServer;
+ TQString m_nick;
};
#endif
diff --git a/kopete/protocols/jabber/ui/dlgjabberregister.cpp b/kopete/protocols/jabber/ui/dlgjabberregister.cpp
index e16b5652..ff324085 100644
--- a/kopete/protocols/jabber/ui/dlgjabberregister.cpp
+++ b/kopete/protocols/jabber/ui/dlgjabberregister.cpp
@@ -16,7 +16,7 @@
* *
***************************************************************************/
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -26,13 +26,13 @@
#include "jabberclient.h"
#include "dlgjabberregister.h"
-dlgJabberRegister::dlgJabberRegister (JabberAccount *account, const XMPP::Jid & jid, QWidget * parent, const char *name):dlgRegister (parent, name)
+dlgJabberRegister::dlgJabberRegister (JabberAccount *account, const XMPP::Jid & jid, TQWidget * parent, const char *name):dlgRegister (parent, name)
{
m_account = account;
XMPP::JT_Register * task = new XMPP::JT_Register(m_account->client()->rootTask ());
- connect (task, SIGNAL (finished ()), this, SLOT (slotGotForm ()));
+ connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotGotForm ()));
task->getForm (jid);
task->go (true);
@@ -59,14 +59,14 @@ void dlgJabberRegister::slotGotForm ()
// translate the form and create it inside the box widget
translator = new JabberFormTranslator (task->form (), grpForm);
- static_cast<QBoxLayout*>(grpForm->layout())->insertWidget(1, translator);
+ static_cast<TQBoxLayout*>(grpForm->layout())->insertWidget(1, translator);
translator->show();
resize(sizeHint());
// enable the send button
btnRegister->setEnabled (true);
- connect (btnRegister, SIGNAL (clicked ()), this, SLOT (slotSendForm ()));
+ connect (btnRegister, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotSendForm ()));
}
@@ -76,7 +76,7 @@ void dlgJabberRegister::slotSendForm ()
return;
XMPP::JT_Register * task = new XMPP::JT_Register (m_account->client()->rootTask ());
- connect (task, SIGNAL (finished ()), this, SLOT (slotSentForm ()));
+ connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotSentForm ()));
task->setForm (translator->resultData ());
task->go (true);
diff --git a/kopete/protocols/jabber/ui/dlgjabberregister.h b/kopete/protocols/jabber/ui/dlgjabberregister.h
index 36bc0bab..5cb0af67 100644
--- a/kopete/protocols/jabber/ui/dlgjabberregister.h
+++ b/kopete/protocols/jabber/ui/dlgjabberregister.h
@@ -19,10 +19,10 @@
#ifndef DLGJABBERREGISTER_H
#define DLGJABBERREGISTER_H
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
#include "im.h"
#include "xmpp.h"
@@ -41,7 +41,7 @@ class dlgJabberRegister:public dlgRegister
Q_OBJECT
public:
- dlgJabberRegister (JabberAccount *account, const XMPP::Jid & jid, QWidget * parent = 0, const char *name = 0);
+ dlgJabberRegister (JabberAccount *account, const XMPP::Jid & jid, TQWidget * parent = 0, const char *name = 0);
~dlgJabberRegister ();
private slots:
diff --git a/kopete/protocols/jabber/ui/dlgjabbersendraw.cpp b/kopete/protocols/jabber/ui/dlgjabbersendraw.cpp
index 17b2d181..4b9192dc 100644
--- a/kopete/protocols/jabber/ui/dlgjabbersendraw.cpp
+++ b/kopete/protocols/jabber/ui/dlgjabbersendraw.cpp
@@ -18,20 +18,20 @@
#include "dlgjabbersendraw.h"
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qtextedit.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
+#include <tqtextedit.h>
#include <kdebug.h>
#include "jabberclient.h"
-dlgJabberSendRaw::dlgJabberSendRaw ( JabberClient *client, QWidget *parent, const char *name )
+dlgJabberSendRaw::dlgJabberSendRaw ( JabberClient *client, TQWidget *parent, const char *name )
: DlgSendRaw (parent, name)
{
// Connect the GUI elements to things that do stuff
- connect (btnSend, SIGNAL (clicked ()), this, SLOT (slotSend ()));
- connect (btnClose, SIGNAL (clicked ()), this, SLOT (slotCancel ()));
- connect (btnClear, SIGNAL (clicked ()), this, SLOT (slotClear ()));
- connect (inputWidget, SIGNAL (activated (int)), this, SLOT (slotCreateMessage (int)));
+ connect (btnSend, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotSend ()));
+ connect (btnClose, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotCancel ()));
+ connect (btnClear, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotClear ()));
+ connect (inputWidget, TQT_SIGNAL (activated (int)), this, TQT_SLOT (slotCreateMessage (int)));
m_client = client;
@@ -58,7 +58,7 @@ void dlgJabberSendRaw::slotCreateMessage(int index)
{
switch (index) {
case 1:
- tePacket->setText(QString("<iq type='set' to='%1'>\n<query xmlns='jabber:iq:register'><remove/>\n</query>\n</iq>")
+ tePacket->setText(TQString("<iq type='set' to='%1'>\n<query xmlns='jabber:iq:register'><remove/>\n</query>\n</iq>")
.arg ( m_client->jid().domain () ) );
break;
case 2:
@@ -68,11 +68,11 @@ void dlgJabberSendRaw::slotCreateMessage(int index)
tePacket->setText("<iq type='get' to='USER@DOMAIN'>\n<query xmlns='jabber:iq:last'/></iq>");
break;
case 4:
- tePacket->setText(QString("<message to='USER@DOMAIN' from='%1@%2/%3'>\n<body>Body text</body>\n</message>")
+ tePacket->setText(TQString("<message to='USER@DOMAIN' from='%1@%2/%3'>\n<body>Body text</body>\n</message>")
.arg ( m_client->jid().node (), m_client->jid().domain (), m_client->jid().resource () ) );
break;
case 5:
- tePacket->setText(QString("<message to='USER@DOMAIN' from='%1@%2/%3'>\n<subject>Subject</subject><body>Body text</body>\n</message>")
+ tePacket->setText(TQString("<message to='USER@DOMAIN' from='%1@%2/%3'>\n<subject>Subject</subject><body>Body text</body>\n</message>")
.arg ( m_client->jid().node (), m_client->jid().domain (), m_client->jid().resource () ) );
break;
diff --git a/kopete/protocols/jabber/ui/dlgjabbersendraw.h b/kopete/protocols/jabber/ui/dlgjabbersendraw.h
index 6570363b..44e1a9ad 100644
--- a/kopete/protocols/jabber/ui/dlgjabbersendraw.h
+++ b/kopete/protocols/jabber/ui/dlgjabbersendraw.h
@@ -19,7 +19,7 @@
#ifndef DLGJABBERSENDRAW_H
#define DLGJABBERSENDRAW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "dlgsendraw.h"
class JabberClient;
@@ -27,7 +27,7 @@ class JabberClient;
/**
* A dialog to send raw strings to the jabber server.
*
- * It comes with a QComboBox to choose some "template" strings
+ * It comes with a TQComboBox to choose some "template" strings
* like "Availability Status", "Subscription",...
*
* @author Till Gerken <till@tantalo.net>
@@ -38,7 +38,7 @@ class dlgJabberSendRaw:public DlgSendRaw
Q_OBJECT
public:
- dlgJabberSendRaw ( JabberClient *client, QWidget * parent = 0, const char *name = 0);
+ dlgJabberSendRaw ( JabberClient *client, TQWidget * parent = 0, const char *name = 0);
virtual ~ dlgJabberSendRaw ();
public slots:
diff --git a/kopete/protocols/jabber/ui/dlgjabberservices.cpp b/kopete/protocols/jabber/ui/dlgjabberservices.cpp
index 00e99f45..1bd1310c 100644
--- a/kopete/protocols/jabber/ui/dlgjabberservices.cpp
+++ b/kopete/protocols/jabber/ui/dlgjabberservices.cpp
@@ -20,9 +20,9 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qtable.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqtable.h>
#include "jabberaccount.h"
#include "jabberclient.h"
@@ -32,7 +32,7 @@
#include "dlgjabberservices.moc"
-dlgJabberServices::dlgJabberServices (JabberAccount *account, QWidget *parent, const char *name):dlgServices (parent, name)
+dlgJabberServices::dlgJabberServices (JabberAccount *account, TQWidget *parent, const char *name):dlgServices (parent, name)
{
m_account = account;
@@ -57,22 +57,22 @@ dlgJabberServices::dlgJabberServices (JabberAccount *account, QWidget *parent, c
//tblServices->setColumnStretchable (1, true);
// disable user selections
- //tblServices->setSelectionMode (QTable::NoSelection);
+ //tblServices->setSelectionMode (TQTable::NoSelection);
// name table headers
//tblServices->horizontalHeader ()->setLabel (0, i18n ("Name"));
//tblServices->horizontalHeader ()->setLabel (1, i18n ("Address"));
- connect (btnQuery, SIGNAL (clicked ()), this, SLOT (slotDisco ()));
- //connect (tblServices, SIGNAL (clicked (int, int, int, const QPoint &)), this, SLOT (slotSetSelection (int, int, int, const QPoint &)));
- connect (lvServices, SIGNAL (selectionChanged (QListViewItem *)), this, SLOT (slotSetSelection (QListViewItem *)));
+ connect (btnQuery, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotDisco ()));
+ //connect (tblServices, TQT_SIGNAL (clicked (int, int, int, const TQPoint &)), this, TQT_SLOT (slotSetSelection (int, int, int, const TQPoint &)));
+ connect (lvServices, TQT_SIGNAL (selectionChanged (TQListViewItem *)), this, TQT_SLOT (slotSetSelection (TQListViewItem *)));
- connect (btnRegister, SIGNAL (clicked ()), this, SLOT (slotRegister ()));
- connect (btnBrowse, SIGNAL (clicked ()), this, SLOT (slotBrowse ()));
+ connect (btnRegister, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotRegister ()));
+ connect (btnBrowse, TQT_SIGNAL (clicked ()), this, TQT_SLOT (slotBrowse ()));
}
-void dlgJabberServices::slotSetSelection (QListViewItem *it)
+void dlgJabberServices::slotSetSelection (TQListViewItem *it)
{
dlgJabberServies_item *item=dynamic_cast<dlgJabberServies_item*>(it);
if(!item)
@@ -99,7 +99,7 @@ void dlgJabberServices::slotService ()
}
XMPP::JT_GetServices *serviceTask = new XMPP::JT_GetServices (m_account->client()->rootTask ());
- connect (serviceTask, SIGNAL (finished ()), this, SLOT (slotServiceFinished ()));
+ connect (serviceTask, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotServiceFinished ()));
/* populate server field if it is empty */
if(leServer->text().isEmpty())
@@ -121,7 +121,7 @@ void dlgJabberServices::slotServiceFinished ()
if (!task->success ())
{
- QString error = task->statusString();
+ TQString error = task->statusString();
KMessageBox::queuedMessageBox (this, KMessageBox::Error, i18n ("Unable to retrieve the list of services.\nReason: %1").arg(error), i18n ("Jabber Error"));
return;
}
@@ -148,13 +148,13 @@ void dlgJabberServices::slotDisco()
}
JT_DiscoItems *jt = new JT_DiscoItems(m_account->client()->rootTask());
- connect(jt, SIGNAL(finished()), this, SLOT(slotDiscoFinished()));
+ connect(jt, TQT_SIGNAL(finished()), this, TQT_SLOT(slotDiscoFinished()));
/* populate server field if it is empty */
if(leServer->text().isEmpty())
leServer->setText(m_account->server());
- jt->get(leServer->text() , QString());
+ jt->get(leServer->text() , TQString());
jt->go(true);
}
@@ -168,11 +168,11 @@ void dlgJabberServices::slotDiscoFinished( )
if ( jt->success() )
{
- QValueList<XMPP::DiscoItem> list = jt->items();
+ TQValueList<XMPP::DiscoItem> list = jt->items();
lvServices->clear();
- for(QValueList<XMPP::DiscoItem>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for(TQValueList<XMPP::DiscoItem>::ConstIterator it = list.begin(); it != list.end(); ++it)
{
const XMPP::DiscoItem a = *it;
dlgJabberServies_item *item=new dlgJabberServies_item( lvServices , (*it).jid ().userHost () , (*it).name ());
@@ -211,10 +211,10 @@ dlgJabberServices::~dlgJabberServices ()
{
}
-void dlgJabberServies_item::updateInfo( const XMPP::Jid & jid , const QString & node , JabberAccount *account )
+void dlgJabberServies_item::updateInfo( const XMPP::Jid & jid , const TQString & node , JabberAccount *account )
{
XMPP::JT_DiscoInfo *jt = new XMPP::JT_DiscoInfo(account->client()->rootTask());
- connect(jt, SIGNAL(finished()),this, SLOT(slotDiscoFinished()));
+ connect(jt, TQT_SIGNAL(finished()),this, TQT_SLOT(slotDiscoFinished()));
jt->get(jid, node);
jt->go(true);
diff --git a/kopete/protocols/jabber/ui/dlgjabberservices.h b/kopete/protocols/jabber/ui/dlgjabberservices.h
index f2d4cedc..c64fb045 100644
--- a/kopete/protocols/jabber/ui/dlgjabberservices.h
+++ b/kopete/protocols/jabber/ui/dlgjabberservices.h
@@ -19,13 +19,13 @@
#ifndef DLGJABBERSERVICES_H
#define DLGJABBERSERVICES_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "jabberaccount.h"
#include "xmpp_tasks.h"
#include "dlgservices.h"
-#include <qlistview.h>
+#include <tqlistview.h>
/**
*@author Till Gerken <till@tantalo.net>
@@ -36,11 +36,11 @@ class dlgJabberServices:public dlgServices
Q_OBJECT
public:
- dlgJabberServices (JabberAccount *account, QWidget *parent = 0, const char *name = 0);
+ dlgJabberServices (JabberAccount *account, TQWidget *parent = 0, const char *name = 0);
~dlgJabberServices ();
private slots:
- void slotSetSelection (QListViewItem *);
+ void slotSetSelection (TQListViewItem *);
void slotService ();
void slotServiceFinished ();
void slotRegister ();
@@ -56,16 +56,16 @@ private:
};
-class dlgJabberServies_item : protected QObject, public QListViewItem
+class dlgJabberServies_item : protected TQObject, public TQListViewItem
{
Q_OBJECT
public:
- dlgJabberServies_item( QListView *parent , const QString &s1 , const QString &s2 )
- : QListViewItem(parent,s1,s2), can_browse(false) , can_register(false) {}
+ dlgJabberServies_item( TQListView *parent , const TQString &s1 , const TQString &s2 )
+ : TQListViewItem(parent,s1,s2), can_browse(false) , can_register(false) {}
bool can_browse, can_register;
XMPP::Jid jid;
- void updateInfo(const XMPP::Jid& jid, const QString &node , JabberAccount *account);
+ void updateInfo(const XMPP::Jid& jid, const TQString &node , JabberAccount *account);
private slots:
void slotDiscoFinished();
};
diff --git a/kopete/protocols/jabber/ui/dlgjabbervcard.cpp b/kopete/protocols/jabber/ui/dlgjabbervcard.cpp
index b35e091a..19070798 100644
--- a/kopete/protocols/jabber/ui/dlgjabbervcard.cpp
+++ b/kopete/protocols/jabber/ui/dlgjabbervcard.cpp
@@ -23,10 +23,10 @@
#include "dlgjabbervcard.h"
// Qt includes
-#include <qtextedit.h>
-#include <qwidgetstack.h>
-#include <qregexp.h>
-#include <qbuffer.h>
+#include <tqtextedit.h>
+#include <tqwidgetstack.h>
+#include <tqregexp.h>
+#include <tqbuffer.h>
// KDE includes
#include <kdebug.h>
@@ -60,7 +60,7 @@
* name 'name'
*
*/
-dlgJabberVCard::dlgJabberVCard (JabberAccount *account, JabberBaseContact *contact, QWidget * parent, const char *name)
+dlgJabberVCard::dlgJabberVCard (JabberAccount *account, JabberBaseContact *contact, TQWidget * parent, const char *name)
: KDialogBase (parent, name, false, i18n("Jabber vCard"), Close | User1 | User2, Close, false, i18n("&Save User Info"), i18n("&Fetch vCard") )
{
@@ -70,14 +70,14 @@ dlgJabberVCard::dlgJabberVCard (JabberAccount *account, JabberBaseContact *conta
m_mainWidget = new dlgVCard(this);
setMainWidget(m_mainWidget);
- connect (this, SIGNAL (user1Clicked()), this, SLOT (slotSaveVCard ()));
- connect (this, SIGNAL( user2Clicked()), this, SLOT (slotGetVCard ()));
+ connect (this, TQT_SIGNAL (user1Clicked()), this, TQT_SLOT (slotSaveVCard ()));
+ connect (this, TQT_SIGNAL( user2Clicked()), this, TQT_SLOT (slotGetVCard ()));
- connect (m_mainWidget->btnSelectPhoto, SIGNAL (clicked()), this, SLOT (slotSelectPhoto()));
- connect (m_mainWidget->btnClearPhoto, SIGNAL (clicked()), this, SLOT (slotClearPhoto()));
- connect (m_mainWidget->urlHomeEmail, SIGNAL (leftClickedURL(const QString &)), this, SLOT (slotOpenURL (const QString &)));
- connect (m_mainWidget->urlWorkEmail, SIGNAL (leftClickedURL(const QString &)), this, SLOT (slotOpenURL (const QString &)));
- connect (m_mainWidget->urlHomepage, SIGNAL (leftClickedURL(const QString &)), this, SLOT (slotOpenURL (const QString &)));
+ connect (m_mainWidget->btnSelectPhoto, TQT_SIGNAL (clicked()), this, TQT_SLOT (slotSelectPhoto()));
+ connect (m_mainWidget->btnClearPhoto, TQT_SIGNAL (clicked()), this, TQT_SLOT (slotClearPhoto()));
+ connect (m_mainWidget->urlHomeEmail, TQT_SIGNAL (leftClickedURL(const TQString &)), this, TQT_SLOT (slotOpenURL (const TQString &)));
+ connect (m_mainWidget->urlWorkEmail, TQT_SIGNAL (leftClickedURL(const TQString &)), this, TQT_SLOT (slotOpenURL (const TQString &)));
+ connect (m_mainWidget->urlHomepage, TQT_SIGNAL (leftClickedURL(const TQString &)), this, TQT_SLOT (slotOpenURL (const TQString &)));
assignContactProperties();
@@ -120,7 +120,7 @@ void dlgJabberVCard::assignContactProperties ()
m_mainWidget->leBirthday->setText (m_contact->property(m_account->protocol()->propBirthday).value().toString());
m_mainWidget->leTimezone->setText (m_contact->property(m_account->protocol()->propTimezone).value().toString());
- QString homepage = m_contact->property(m_account->protocol()->propHomepage).value().toString();
+ TQString homepage = m_contact->property(m_account->protocol()->propHomepage).value().toString();
m_mainWidget->leHomepage->setText (homepage);
m_mainWidget->urlHomepage->setText (homepage);
m_mainWidget->urlHomepage->setURL (homepage);
@@ -130,7 +130,7 @@ void dlgJabberVCard::assignContactProperties ()
m_photoPath = m_contact->property(m_account->protocol()->propPhoto).value().toString();
if( !m_photoPath.isEmpty() )
{
- m_mainWidget->lblPhoto->setPixmap( QPixmap(m_photoPath) );
+ m_mainWidget->lblPhoto->setPixmap( TQPixmap(m_photoPath) );
}
// addresses
@@ -152,8 +152,8 @@ void dlgJabberVCard::assignContactProperties ()
m_mainWidget->urlWorkEmail->setUseCursor ( false );
m_mainWidget->urlHomeEmail->setUseCursor ( false );
- QString workEmail = m_contact->property(m_account->protocol()->propWorkEmailAddress).value().toString();
- QString homeEmail = m_contact->property(m_account->protocol()->propEmailAddress).value().toString();
+ TQString workEmail = m_contact->property(m_account->protocol()->propWorkEmailAddress).value().toString();
+ TQString homeEmail = m_contact->property(m_account->protocol()->propEmailAddress).value().toString();
m_mainWidget->leWorkEmail->setText (workEmail);
m_mainWidget->urlWorkEmail->setText (workEmail);
m_mainWidget->urlWorkEmail->setURL ("mailto:" + workEmail);
@@ -358,7 +358,7 @@ void dlgJabberVCard::slotSaveVCard()
// work information tab
XMPP::VCard::Org org;
org.name = m_mainWidget->leCompany->text();
- org.unit = QStringList::split(",", m_mainWidget->leDepartment->text());
+ org.unit = TQStringList::split(",", m_mainWidget->leDepartment->text());
vCard.setOrg(org);
vCard.setTitle( m_mainWidget->lePosition->text() );
vCard.setRole( m_mainWidget->leRole->text() );
@@ -393,10 +393,10 @@ void dlgJabberVCard::slotSaveVCard()
// Set contact photo as a binary value (if he has set a photo)
if( !m_photoPath.isEmpty() )
{
- QString photoPath = m_photoPath;
- QImage image( photoPath );
- QByteArray ba;
- QBuffer buffer( ba );
+ TQString photoPath = m_photoPath;
+ TQImage image( photoPath );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
image.save( &buffer, "PNG" );
vCard.setPhoto( ba );
@@ -407,7 +407,7 @@ void dlgJabberVCard::slotSaveVCard()
XMPP::JT_VCard *task = new XMPP::JT_VCard( m_account->client()->rootTask() );
// signal to ourselves when the vCard data arrived
- QObject::connect(task, SIGNAL(finished()), this, SLOT(slotVCardSaved()));
+ TQObject::connect(task, TQT_SIGNAL(finished()), this, TQT_SLOT(slotVCardSaved()));
task->set(vCard);
task->go(true);
}
@@ -438,7 +438,7 @@ void dlgJabberVCard::slotGetVCard()
XMPP::JT_VCard *task = new XMPP::JT_VCard ( m_account->client()->rootTask() );
// signal to ourselves when the vCard data arrived
- QObject::connect( task, SIGNAL ( finished () ), this, SLOT ( slotGotVCard () ) );
+ TQObject::connect( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotGotVCard () ) );
task->get ( m_contact->rosterItem().jid().full() );
task->go ( true );
}
@@ -467,9 +467,9 @@ void dlgJabberVCard::slotGotVCard()
void dlgJabberVCard::slotSelectPhoto()
{
- QString path;
+ TQString path;
bool remoteFile = false;
- KURL filePath = KFileDialog::getImageOpenURL( QString::null, this, i18n( "Jabber Photo" ) );
+ KURL filePath = KFileDialog::getImageOpenURL( TQString::null, this, i18n( "Jabber Photo" ) );
if( filePath.isEmpty() )
return;
@@ -485,15 +485,15 @@ void dlgJabberVCard::slotSelectPhoto()
else
path = filePath.path();
- QImage img( path );
- img = KPixmapRegionSelectorDialog::getSelectedImage( QPixmap(img), 96, 96, this );
+ TQImage img( path );
+ img = KPixmapRegionSelectorDialog::getSelectedImage( TQPixmap(img), 96, 96, this );
if( !img.isNull() )
{
if(img.width() > 96 || img.height() > 96)
{
// Scale and crop the picture.
- img = img.smoothScale( 96, 96, QImage::ScaleMin );
+ img = img.smoothScale( 96, 96, TQImage::ScaleMin );
// crop image if not square
if(img.width() < img.height())
img = img.copy((img.width()-img.height())/2, 0, 96, 96);
@@ -504,7 +504,7 @@ void dlgJabberVCard::slotSelectPhoto()
else if (img.width() < 32 || img.height() < 32)
{
// Scale and crop the picture.
- img = img.smoothScale( 32, 32, QImage::ScaleMin );
+ img = img.smoothScale( 32, 32, TQImage::ScaleMin );
// crop image if not square
if(img.width() < img.height())
img = img.copy((img.width()-img.height())/2, 0, 32, 32);
@@ -520,14 +520,14 @@ void dlgJabberVCard::slotSelectPhoto()
img = img.copy(0, (img.height()-img.width())/2, img.height(), img.height());
}
- m_photoPath = locateLocal("appdata", "jabberphotos/" + m_contact->rosterItem().jid().full().lower().replace(QRegExp("[./~]"),"-") +".png");
+ m_photoPath = locateLocal("appdata", "jabberphotos/" + m_contact->rosterItem().jid().full().lower().replace(TQRegExp("[./~]"),"-") +".png");
if( img.save(m_photoPath, "PNG") )
{
- m_mainWidget->lblPhoto->setPixmap( QPixmap(img) );
+ m_mainWidget->lblPhoto->setPixmap( TQPixmap(img) );
}
else
{
- m_photoPath = QString::null;
+ m_photoPath = TQString::null;
}
}
else
@@ -541,13 +541,13 @@ void dlgJabberVCard::slotSelectPhoto()
void dlgJabberVCard::slotClearPhoto()
{
- m_mainWidget->lblPhoto->setPixmap( QPixmap() );
- m_photoPath = QString::null;
+ m_mainWidget->lblPhoto->setPixmap( TQPixmap() );
+ m_photoPath = TQString::null;
}
-void dlgJabberVCard::slotOpenURL(const QString &url)
+void dlgJabberVCard::slotOpenURL(const TQString &url)
{
- if ( !url.isEmpty () || (url == QString::fromLatin1("mailto:") ) )
+ if ( !url.isEmpty () || (url == TQString::fromLatin1("mailto:") ) )
new KRun(KURL( url ) );
}
diff --git a/kopete/protocols/jabber/ui/dlgjabbervcard.h b/kopete/protocols/jabber/ui/dlgjabbervcard.h
index 2bea5a2b..05a80940 100644
--- a/kopete/protocols/jabber/ui/dlgjabbervcard.h
+++ b/kopete/protocols/jabber/ui/dlgjabbervcard.h
@@ -55,7 +55,7 @@ public:
* @param widget Parent widget.
* @param name widget name.
*/
- dlgJabberVCard (JabberAccount *account, JabberBaseContact *contact, QWidget * parent = 0, const char *name = 0);
+ dlgJabberVCard (JabberAccount *account, JabberBaseContact *contact, TQWidget * parent = 0, const char *name = 0);
~dlgJabberVCard ();
private slots:
@@ -83,7 +83,7 @@ private slots:
/**
* Open a link. (ex: the homepage link or the email address)
*/
- void slotOpenURL(const QString &url);
+ void slotOpenURL(const TQString &url);
/**
* Retrieve vCard information for the current contact.
@@ -99,7 +99,7 @@ private:
JabberAccount *m_account;
JabberBaseContact *m_contact;
dlgVCard *m_mainWidget;
- QString m_photoPath;
+ TQString m_photoPath;
void assignContactProperties();
void setReadOnly(bool state);
diff --git a/kopete/protocols/jabber/ui/jabberaddcontactpage.cpp b/kopete/protocols/jabber/ui/jabberaddcontactpage.cpp
index 950d5680..076b92b8 100644
--- a/kopete/protocols/jabber/ui/jabberaddcontactpage.cpp
+++ b/kopete/protocols/jabber/ui/jabberaddcontactpage.cpp
@@ -20,11 +20,11 @@
#include "jabberaddcontactpage.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klineedit.h>
#include <klocale.h>
#include <kopeteaccount.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kopetegroup.h>
#include <kopetemetacontact.h>
@@ -35,9 +35,9 @@
#include "jabberclient.h"
#include "xmpp_tasks.h"
-JabberAddContactPage::JabberAddContactPage (Kopete::Account * owner, QWidget * parent, const char *name):AddContactPage (parent, name)
+JabberAddContactPage::JabberAddContactPage (Kopete::Account * owner, TQWidget * parent, const char *name):AddContactPage (parent, name)
{
- (new QVBoxLayout (this))->setAutoAdd (true);
+ (new TQVBoxLayout (this))->setAutoAdd (true);
JabberTransport *transport=dynamic_cast<JabberTransport*>(owner);
JabberAccount *jaccount= transport ? transport->account() : dynamic_cast<JabberAccount*>(owner);
@@ -51,7 +51,7 @@ JabberAddContactPage::JabberAddContactPage (Kopete::Account * owner, QWidget * p
{
jabData->textLabel1->setText( i18n("Loading instruction from gateway...") );
XMPP::JT_Gateway * gatewayTask = new XMPP::JT_Gateway ( jaccount->client()->rootTask () );
- QObject::connect (gatewayTask, SIGNAL (finished ()), this, SLOT (slotPromtReceived()));
+ TQObject::connect (gatewayTask, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotPromtReceived()));
gatewayTask->get ( transport->myself()->contactId() );
gatewayTask->go ( true );
}
@@ -59,8 +59,8 @@ JabberAddContactPage::JabberAddContactPage (Kopete::Account * owner, QWidget * p
}
else
{
- noaddMsg1 = new QLabel (i18n ("You need to be connected to be able to add contacts."), this);
- noaddMsg2 = new QLabel (i18n ("Connect to the Jabber network and try again."), this);
+ noaddMsg1 = new TQLabel (i18n ("You need to be connected to be able to add contacts."), this);
+ noaddMsg2 = new TQLabel (i18n ("Connect to the Jabber network and try again."), this);
canadd = false;
}
@@ -84,26 +84,26 @@ bool JabberAddContactPage::apply ( Kopete::Account *account, Kopete::MetaContact
JabberTransport *transport=dynamic_cast<JabberTransport*>(account);
JabberAccount *jaccount=transport?transport->account():dynamic_cast<JabberAccount*>(account);
- QString contactId = jabData->addID->text ();
+ TQString contactId = jabData->addID->text ();
if(transport)
{
XMPP::JT_Gateway * gatewayTask = new XMPP::JT_Gateway ( jaccount->client()->rootTask () );
JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND *workaround =
new JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND( transport , parentContact , gatewayTask );
- QObject::connect (gatewayTask, SIGNAL (finished ()), workaround, SLOT (slotJidReceived()));
+ TQObject::connect (gatewayTask, TQT_SIGNAL (finished ()), workaround, TQT_SLOT (slotJidReceived()));
gatewayTask->set ( transport->myself()->contactId() , contactId );
gatewayTask->go ( true );
return true;
}
- QString displayName = parentContact->displayName ();
+ TQString displayName = parentContact->displayName ();
/*
if ( displayName.isEmpty () )
displayName = contactId;
*/
// collect all group names
- QStringList groupNames;
+ TQStringList groupNames;
Kopete::GroupList groupList = parentContact->groups();
for(Kopete::Group *group = groupList.first(); group; group = groupList.next())
groupNames += group->displayName();
@@ -151,8 +151,8 @@ void JabberAddContactPage::slotPromtReceived( )
}
}
-JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND::JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND( JabberTransport *t, Kopete::MetaContact * mc, QObject* task )
- : QObject(task) , metacontact(mc) , transport(t)
+JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND::JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND( JabberTransport *t, Kopete::MetaContact * mc, TQObject* task )
+ : TQObject(task) , metacontact(mc) , transport(t)
{}
void JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND::slotJidReceived( )
@@ -165,7 +165,7 @@ void JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND::slot
// maybe we should show an error message, but i don't like showing error message - Olivier
}
- QString contactId=task->prompt();
+ TQString contactId=task->prompt();
Kopete::MetaContact* parentContact=metacontact;
JabberAccount *jaccount=transport->account();;
@@ -174,13 +174,13 @@ void JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND::slot
* this is a copy of the end of JabberAddContactPage::apply
\*/
- QString displayName = parentContact->displayName ();
+ TQString displayName = parentContact->displayName ();
/*
if ( displayName.isEmpty () )
displayName = contactId;
*/
// collect all group names
- QStringList groupNames;
+ TQStringList groupNames;
Kopete::GroupList groupList = parentContact->groups();
for(Kopete::Group *group = groupList.first(); group; group = groupList.next())
groupNames += group->displayName();
diff --git a/kopete/protocols/jabber/ui/jabberaddcontactpage.h b/kopete/protocols/jabber/ui/jabberaddcontactpage.h
index 8081d0ad..77109c3d 100644
--- a/kopete/protocols/jabber/ui/jabberaddcontactpage.h
+++ b/kopete/protocols/jabber/ui/jabberaddcontactpage.h
@@ -34,13 +34,13 @@ class JabberAddContactPage:public AddContactPage
Q_OBJECT
public:
- JabberAddContactPage (Kopete::Account * owner, QWidget * parent = 0, const char *name = 0);
+ JabberAddContactPage (Kopete::Account * owner, TQWidget * parent = 0, const char *name = 0);
~JabberAddContactPage ();
virtual bool validateData ();
virtual bool apply (Kopete::Account *, Kopete::MetaContact *);
dlgAddContact *jabData;
- QLabel *noaddMsg1;
- QLabel *noaddMsg2;
+ TQLabel *noaddMsg1;
+ TQLabel *noaddMsg2;
bool canadd;
public slots:
void slotPromtReceived();
@@ -55,7 +55,7 @@ class JabberTransport;
class JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND : public QObject
{ Q_OBJECT
public:
- JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND( JabberTransport * , Kopete::MetaContact *mc, QObject *parent);
+ JabberAddContactPage_there_is_no_possibility_to_add_assync_WORKAROUND( JabberTransport * , Kopete::MetaContact *mc, TQObject *parent);
Kopete::MetaContact *metacontact;
JabberTransport *transport;
public slots:
diff --git a/kopete/protocols/jabber/ui/jabberchooseserver.cpp b/kopete/protocols/jabber/ui/jabberchooseserver.cpp
index 66598432..63339158 100644
--- a/kopete/protocols/jabber/ui/jabberchooseserver.cpp
+++ b/kopete/protocols/jabber/ui/jabberchooseserver.cpp
@@ -24,8 +24,8 @@
#include <kio/global.h>
#include <kio/job.h>
#include <kio/jobclasses.h>
-#include <qtable.h>
-#include <qlabel.h>
+#include <tqtable.h>
+#include <tqlabel.h>
#include "jabberprotocol.h"
#include "dlgjabberchooseserver.h"
#include "jabberregisteraccount.h"
@@ -48,11 +48,11 @@ JabberChooseServer::JabberChooseServer ( JabberRegisterAccount *parent, const ch
// retrieve server list
mTransferJob = KIO::get ( "http://www.jabber.org/servers.xml" );
- connect ( mTransferJob, SIGNAL ( result ( KIO::Job* ) ), this, SLOT ( slotTransferResult ( KIO::Job* ) ) );
- connect ( mTransferJob, SIGNAL ( data ( KIO::Job*, const QByteArray& ) ), this, SLOT ( slotTransferData ( KIO::Job*, const QByteArray& ) ) );
+ connect ( mTransferJob, TQT_SIGNAL ( result ( KIO::Job* ) ), this, TQT_SLOT ( slotTransferResult ( KIO::Job* ) ) );
+ connect ( mTransferJob, TQT_SIGNAL ( data ( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT ( slotTransferData ( KIO::Job*, const TQByteArray& ) ) );
- connect ( mMainWidget->listServers, SIGNAL ( pressed ( int, int, int, const QPoint & ) ), this, SLOT ( slotSetSelection ( int ) ) );
- connect ( mMainWidget->listServers, SIGNAL ( doubleClicked ( int, int, int, const QPoint & ) ), this, SLOT ( slotOk () ) );
+ connect ( mMainWidget->listServers, TQT_SIGNAL ( pressed ( int, int, int, const TQPoint & ) ), this, TQT_SLOT ( slotSetSelection ( int ) ) );
+ connect ( mMainWidget->listServers, TQT_SIGNAL ( doubleClicked ( int, int, int, const TQPoint & ) ), this, TQT_SLOT ( slotOk () ) );
enableButtonOK ( false );
@@ -90,7 +90,7 @@ void JabberChooseServer::slotSetSelection ( int row )
}
-void JabberChooseServer::slotTransferData ( KIO::Job */*job*/, const QByteArray &data )
+void JabberChooseServer::slotTransferData ( KIO::Job */*job*/, const TQByteArray &data )
{
unsigned oldSize = xmlServerList.size ();
@@ -119,7 +119,7 @@ void JabberChooseServer::slotTransferResult ( KIO::Job *job )
mMainWidget->lblStatus->setText ( "" );
// parse XML list
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent ( xmlServerList ) )
{
@@ -127,14 +127,14 @@ void JabberChooseServer::slotTransferResult ( KIO::Job *job )
return;
}
- QDomElement docElement = doc.documentElement ();
+ TQDomElement docElement = doc.documentElement ();
mMainWidget->listServers->setNumRows ( docElement.childNodes().count () );
int listIndex = 0;
- for( QDomNode node = docElement.firstChild (); !node.isNull (); node = node.nextSibling (), listIndex++ )
+ for( TQDomNode node = docElement.firstChild (); !node.isNull (); node = node.nextSibling (), listIndex++ )
{
- QDomNamedNodeMap attributes = node.attributes ();
+ TQDomNamedNodeMap attributes = node.attributes ();
mMainWidget->listServers->setText ( listIndex, 0, attributes.namedItem ( "jid" ).nodeValue () );
mMainWidget->listServers->setText ( listIndex, 1, attributes.namedItem ( "name" ).nodeValue () );
}
diff --git a/kopete/protocols/jabber/ui/jabberchooseserver.h b/kopete/protocols/jabber/ui/jabberchooseserver.h
index 0cc8045d..cc64040b 100644
--- a/kopete/protocols/jabber/ui/jabberchooseserver.h
+++ b/kopete/protocols/jabber/ui/jabberchooseserver.h
@@ -21,7 +21,7 @@
#define JABBERCHOOSESERVER_H
#include <kdialogbase.h>
-#include <qcstring.h>
+#include <tqcstring.h>
class JabberRegisterAccount;
class DlgJabberChooseServer;
@@ -48,7 +48,7 @@ public:
private slots:
void slotOk ();
void slotCancel ();
- void slotTransferData ( KIO::Job *job, const QByteArray &data );
+ void slotTransferData ( KIO::Job *job, const TQByteArray &data );
void slotTransferResult ( KIO::Job *job );
void slotSetSelection ( int row );
@@ -56,7 +56,7 @@ private:
DlgJabberChooseServer *mMainWidget;
JabberRegisterAccount *mParentWidget;
KIO::TransferJob *mTransferJob;
- QByteArray xmlServerList;
+ TQByteArray xmlServerList;
int mSelectedRow;
diff --git a/kopete/protocols/jabber/ui/jabbereditaccountwidget.cpp b/kopete/protocols/jabber/ui/jabbereditaccountwidget.cpp
index b0284e41..6c928ad6 100644
--- a/kopete/protocols/jabber/ui/jabbereditaccountwidget.cpp
+++ b/kopete/protocols/jabber/ui/jabbereditaccountwidget.cpp
@@ -18,12 +18,12 @@
***************************************************************************/
#include <kdebug.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
#include <kconfig.h>
#include <kmessagebox.h>
@@ -40,18 +40,18 @@
#include "jabberregisteraccount.h"
#include "dlgjabberchangepassword.h"
-JabberEditAccountWidget::JabberEditAccountWidget (JabberProtocol * proto, JabberAccount * ident, QWidget * parent, const char *name)
+JabberEditAccountWidget::JabberEditAccountWidget (JabberProtocol * proto, JabberAccount * ident, TQWidget * parent, const char *name)
: DlgJabberEditAccountWidget (parent, name), KopeteEditAccountWidget (ident)
{
m_protocol = proto;
- connect (mID, SIGNAL (textChanged (const QString &)), this, SLOT (updateServerField ()));
- connect (cbCustomServer, SIGNAL (toggled (bool)), this, SLOT (updateServerField ()));
+ connect (mID, TQT_SIGNAL (textChanged (const TQString &)), this, TQT_SLOT (updateServerField ()));
+ connect (cbCustomServer, TQT_SIGNAL (toggled (bool)), this, TQT_SLOT (updateServerField ()));
- connect (cbUseSSL, SIGNAL (toggled (bool)), this, SLOT (sslToggled (bool)));
+ connect (cbUseSSL, TQT_SIGNAL (toggled (bool)), this, TQT_SLOT (sslToggled (bool)));
- connect (btnChangePassword, SIGNAL ( clicked() ), this, SLOT ( slotChangePasswordClicked () ));
+ connect (btnChangePassword, TQT_SIGNAL ( clicked() ), this, TQT_SLOT ( slotChangePasswordClicked () ));
if (account())
{
@@ -63,7 +63,7 @@ JabberEditAccountWidget::JabberEditAccountWidget (JabberProtocol * proto, Jabber
{
// this is a new account
btnChangePassword->setEnabled ( false );
- connect (btnRegister, SIGNAL (clicked ()), this, SLOT (registerClicked ()));
+ connect (btnRegister, TQT_SIGNAL (clicked ()), this, TQT_SLOT (registerClicked ()));
}
}
@@ -88,15 +88,15 @@ void JabberEditAccountWidget::reopen ()
mPass->load (&account()->password ());
cbAutoConnect->setChecked (account()->excludeConnect());
- mResource->setText (account()->configGroup()->readEntry ("Resource", QString::fromLatin1("Kopete")));
+ mResource->setText (account()->configGroup()->readEntry ("Resource", TQString::fromLatin1("Kopete")));
mPriority->setValue (account()->configGroup()->readNumEntry ("Priority", 5));
- mServer->setText (account()->configGroup()->readEntry ("Server", QString::null));
+ mServer->setText (account()->configGroup()->readEntry ("Server", TQString::null));
cbUseSSL->setChecked (account()->configGroup()->readBoolEntry( "UseSSL", false));
mPort->setValue (account()->configGroup()->readNumEntry("Port", 5222));
- QString auth = account()->configGroup()->readEntry("AuthType", QString::null);
+ TQString auth = account()->configGroup()->readEntry("AuthType", TQString::null);
cbCustomServer->setChecked (account()->configGroup()->readBoolEntry("CustomServer",false));
@@ -119,7 +119,7 @@ void JabberEditAccountWidget::reopen ()
leLocalIP->setText (KGlobal::config()->readEntry("LocalIP", ""));
sbLocalPort->setValue (KGlobal::config()->readNumEntry("LocalPort", 8010));
- leProxyJID->setText (account()->configGroup()->readEntry("ProxyJID", QString::null));
+ leProxyJID->setText (account()->configGroup()->readEntry("ProxyJID", TQString::null));
// Privacy
cbSendEvents->setChecked( account()->configGroup()->readBoolEntry("SendEvents", true) );
@@ -173,8 +173,8 @@ void JabberEditAccountWidget::writeConfig ()
account()->configGroup()->writeEntry("AllowPlainTextPassword", cbAllowPlainTextPassword->isChecked());
account()->configGroup()->writeEntry("Server", mServer->text ());
account()->configGroup()->writeEntry("Resource", mResource->text ());
- account()->configGroup()->writeEntry("Priority", QString::number (mPriority->value ()));
- account()->configGroup()->writeEntry("Port", QString::number (mPort->value ()));
+ account()->configGroup()->writeEntry("Priority", TQString::number (mPriority->value ()));
+ account()->configGroup()->writeEntry("Port", TQString::number (mPort->value ()));
account()->setExcludeConnect(cbAutoConnect->isChecked());
@@ -217,7 +217,7 @@ void JabberEditAccountWidget::updateServerField ()
if(!cbCustomServer->isChecked())
{
- QString newServer = mID->text().section("@", 1);
+ TQString newServer = mID->text().section("@", 1);
mPort->setValue(5222);
// check if ssl is enabled and set the port correctly
sslToggled(cbUseSSL->isChecked());
@@ -258,7 +258,7 @@ void JabberEditAccountWidget::slotChangePasswordClicked ()
DlgJabberChangePassword *passwordDlg = new DlgJabberChangePassword ( account (), this );
- connect ( passwordDlg, SIGNAL ( destroyed () ), this, SLOT ( slotChangePasswordFinished () ) );
+ connect ( passwordDlg, TQT_SIGNAL ( destroyed () ), this, TQT_SLOT ( slotChangePasswordFinished () ) );
passwordDlg->show ();
diff --git a/kopete/protocols/jabber/ui/jabbereditaccountwidget.h b/kopete/protocols/jabber/ui/jabbereditaccountwidget.h
index 1f3ba378..e56dcbd2 100644
--- a/kopete/protocols/jabber/ui/jabbereditaccountwidget.h
+++ b/kopete/protocols/jabber/ui/jabbereditaccountwidget.h
@@ -20,7 +20,7 @@
#ifndef JABBEREDITACCOUNTWIDEGET_H
#define JABBEREDITACCOUNTWIDEGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kprogress.h>
#include "editaccountwidget.h"
#include "jabberaccount.h"
@@ -37,7 +37,7 @@ class JabberEditAccountWidget:public DlgJabberEditAccountWidget, public KopeteEd
Q_OBJECT
public:
- JabberEditAccountWidget (JabberProtocol * proto, JabberAccount *, QWidget * parent = 0, const char *name = 0);
+ JabberEditAccountWidget (JabberProtocol * proto, JabberAccount *, TQWidget * parent = 0, const char *name = 0);
~JabberEditAccountWidget ();
virtual bool validateData ();
virtual Kopete::Account *apply ();
diff --git a/kopete/protocols/jabber/ui/jabberregisteraccount.cpp b/kopete/protocols/jabber/ui/jabberregisteraccount.cpp
index f5142736..bb20611b 100644
--- a/kopete/protocols/jabber/ui/jabberregisteraccount.cpp
+++ b/kopete/protocols/jabber/ui/jabberregisteraccount.cpp
@@ -28,10 +28,10 @@
#include <kpassdlg.h>
#include <knuminput.h>
#include <kpushbutton.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include "qca.h"
#include "xmpp.h"
@@ -68,9 +68,9 @@ JabberRegisterAccount::JabberRegisterAccount ( JabberEditAccountWidget *parent,
// clear variables
jabberClient = new JabberClient ();
- connect ( jabberClient, SIGNAL ( csError ( int ) ), this, SLOT ( slotCSError ( int ) ) );
- connect ( jabberClient, SIGNAL ( tlsWarning ( int ) ), this, SLOT ( slotHandleTLSWarning ( int ) ) );
- connect ( jabberClient, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) );
+ connect ( jabberClient, TQT_SIGNAL ( csError ( int ) ), this, TQT_SLOT ( slotCSError ( int ) ) );
+ connect ( jabberClient, TQT_SIGNAL ( tlsWarning ( int ) ), this, TQT_SLOT ( slotHandleTLSWarning ( int ) ) );
+ connect ( jabberClient, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) );
jidRegExp.setPattern ( "[\\w\\d.+_-]{1,}@[\\w\\d.-]{1,}" );
hintPixmap = KGlobal::iconLoader()->loadIcon ( "jabber_online", KIcon::Small );
@@ -86,16 +86,16 @@ JabberRegisterAccount::JabberRegisterAccount ( JabberEditAccountWidget *parent,
mMainWidget->cbUseSSL->setChecked ( parent->cbUseSSL->isChecked () );
// connect buttons to slots, ok is already connected by default
- connect ( this, SIGNAL ( cancelClicked () ), this, SLOT ( slotDeleteDialog () ) );
- connect ( mMainWidget->btnChooseServer, SIGNAL ( clicked () ), this, SLOT ( slotChooseServer () ) );
- connect ( mMainWidget->leServer, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( slotJIDInformation () ) );
- connect ( mMainWidget->leJID, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( slotJIDInformation () ) );
- connect ( mMainWidget->cbUseSSL, SIGNAL ( toggled ( bool ) ), this, SLOT ( slotSSLToggled () ) );
+ connect ( this, TQT_SIGNAL ( cancelClicked () ), this, TQT_SLOT ( slotDeleteDialog () ) );
+ connect ( mMainWidget->btnChooseServer, TQT_SIGNAL ( clicked () ), this, TQT_SLOT ( slotChooseServer () ) );
+ connect ( mMainWidget->leServer, TQT_SIGNAL ( textChanged ( const TQString & ) ), this, TQT_SLOT ( slotJIDInformation () ) );
+ connect ( mMainWidget->leJID, TQT_SIGNAL ( textChanged ( const TQString & ) ), this, TQT_SLOT ( slotJIDInformation () ) );
+ connect ( mMainWidget->cbUseSSL, TQT_SIGNAL ( toggled ( bool ) ), this, TQT_SLOT ( slotSSLToggled () ) );
- connect ( mMainWidget->leServer, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( validateData () ) );
- connect ( mMainWidget->leJID, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( validateData () ) );
- connect ( mMainWidget->lePassword, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( validateData () ) );
- connect ( mMainWidget->lePasswordVerify, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( validateData () ) );
+ connect ( mMainWidget->leServer, TQT_SIGNAL ( textChanged ( const TQString & ) ), this, TQT_SLOT ( validateData () ) );
+ connect ( mMainWidget->leJID, TQT_SIGNAL ( textChanged ( const TQString & ) ), this, TQT_SLOT ( validateData () ) );
+ connect ( mMainWidget->lePassword, TQT_SIGNAL ( textChanged ( const TQString & ) ), this, TQT_SLOT ( validateData () ) );
+ connect ( mMainWidget->lePasswordVerify, TQT_SIGNAL ( textChanged ( const TQString & ) ), this, TQT_SLOT ( validateData () ) );
// display JID info now
slotJIDInformation ();
@@ -146,8 +146,8 @@ void JabberRegisterAccount::validateData ()
}
if ( valid &&
- ( QString::fromLatin1 ( mMainWidget->lePassword->password () ).isEmpty () ||
- QString::fromLatin1 ( mMainWidget->lePasswordVerify->password () ).isEmpty () ) )
+ ( TQString::fromLatin1 ( mMainWidget->lePassword->password () ).isEmpty () ||
+ TQString::fromLatin1 ( mMainWidget->lePasswordVerify->password () ).isEmpty () ) )
{
mMainWidget->lblStatusMessage->setText ( i18n ( "Please enter the same password twice." ) );
valid = false;
@@ -155,8 +155,8 @@ void JabberRegisterAccount::validateData ()
}
if ( valid &&
- ( QString::fromLatin1 ( mMainWidget->lePassword->password () ) !=
- QString::fromLatin1 ( mMainWidget->lePasswordVerify->password () ) ) )
+ ( TQString::fromLatin1 ( mMainWidget->lePassword->password () ) !=
+ TQString::fromLatin1 ( mMainWidget->lePasswordVerify->password () ) ) )
{
mMainWidget->lblStatusMessage->setText ( i18n ( "Password entries do not match." ) );
valid = false;
@@ -228,11 +228,11 @@ void JabberRegisterAccount::slotChooseServer ()
}
-void JabberRegisterAccount::setServer ( const QString &server )
+void JabberRegisterAccount::setServer ( const TQString &server )
{
mMainWidget->leServer->setText ( server );
- mMainWidget->leJID->setText ( QString ( "@%1" ).arg ( server ) );
+ mMainWidget->leJID->setText ( TQString ( "@%1" ).arg ( server ) );
}
@@ -259,7 +259,7 @@ void JabberRegisterAccount::slotOk ()
jabberClient->setOverrideHost ( true, mMainWidget->leServer->text (), mMainWidget->sbPort->value () );
// start connection, no authentication
- switch ( jabberClient->connect ( XMPP::Jid ( mMainWidget->leJID->text () ), QString::null, false ) )
+ switch ( jabberClient->connect ( XMPP::Jid ( mMainWidget->leJID->text () ), TQString::null, false ) )
{
case JabberClient::NoTLS:
// no SSL support, at the connecting stage this means the problem is client-side
@@ -327,7 +327,7 @@ void JabberRegisterAccount::slotConnected ()
mMainWidget->lblStatusMessage->setText ( i18n ( "Connected successfully, registering new account..." ) );
XMPP::JT_Register * task = new XMPP::JT_Register (jabberClient->rootTask ());
- QObject::connect (task, SIGNAL (finished ()), this, SLOT (slotRegisterUserDone ()));
+ TQObject::connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotRegisterUserDone ()));
task->reg (mMainWidget->leJID->text().section("@", 0, 0), mMainWidget->lePassword->password ());
task->go (true);
@@ -369,7 +369,7 @@ void JabberRegisterAccount::slotRegisterUserDone ()
// rewire buttons
enableButtonOK ( false );
setButtonCancel ( KStdGuiItem::close () );
- connect ( this, SIGNAL ( closeClicked () ), this, SLOT ( slotDeleteDialog () ) );
+ connect ( this, TQT_SIGNAL ( closeClicked () ), this, TQT_SLOT ( slotDeleteDialog () ) );
}
else
{
@@ -382,7 +382,7 @@ void JabberRegisterAccount::slotRegisterUserDone ()
// FIXME: this is required because Iris crashes if we try
// to disconnect here. Hopefully Justin can fix this.
- QTimer::singleShot(0, this, SLOT(disconnect ()));
+ TQTimer::singleShot(0, this, TQT_SLOT(disconnect ()));
}
diff --git a/kopete/protocols/jabber/ui/jabberregisteraccount.h b/kopete/protocols/jabber/ui/jabberregisteraccount.h
index 40d643a7..727d61fb 100644
--- a/kopete/protocols/jabber/ui/jabberregisteraccount.h
+++ b/kopete/protocols/jabber/ui/jabberregisteraccount.h
@@ -21,8 +21,8 @@
#define JABBERREGISTER_H
#include <kdialogbase.h>
-#include <qregexp.h>
-#include <qpixmap.h>
+#include <tqregexp.h>
+#include <tqpixmap.h>
class DlgJabberRegisterAccount;
class JabberProtocol;
@@ -42,7 +42,7 @@ public:
~JabberRegisterAccount ();
- void setServer ( const QString &server );
+ void setServer ( const TQString &server );
private slots:
void slotChooseServer ();
@@ -64,8 +64,8 @@ private:
DlgJabberRegisterAccount *mMainWidget;
JabberEditAccountWidget *mParentWidget;
- QRegExp jidRegExp;
- QPixmap hintPixmap;
+ TQRegExp jidRegExp;
+ TQPixmap hintPixmap;
JabberClient *jabberClient;