diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
commit | 838baf3f99ec5ab81b063eb5449a3381d860f377 (patch) | |
tree | dd31abcfde08ca92e4623b8f50b3d762a87c997a /libkdegames/kgame/kgamechat.cpp | |
parent | 2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff) | |
download | tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.tar.gz tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.zip |
TQt4 port kdegames
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1236074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdegames/kgame/kgamechat.cpp')
-rw-r--r-- | libkdegames/kgame/kgamechat.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/libkdegames/kgame/kgamechat.cpp b/libkdegames/kgame/kgamechat.cpp index ddc1bd66..29d80807 100644 --- a/libkdegames/kgame/kgamechat.cpp +++ b/libkdegames/kgame/kgamechat.cpp @@ -57,18 +57,18 @@ public: int mToMyGroup; // just as the above - but for the group, not for players }; -KGameChat::KGameChat(KGame* g, int msgid, TQWidget* parent) : KChatBase(parent) +KGameChat::KGameChat(KGame* g, int msgid, TQWidget* tqparent) : KChatBase(tqparent) { init(g, msgid); } -KGameChat::KGameChat(KGame* g, int msgid, KPlayer* fromPlayer, TQWidget* parent) : KChatBase(parent) +KGameChat::KGameChat(KGame* g, int msgid, KPlayer* fromPlayer, TQWidget* tqparent) : KChatBase(tqparent) { init(g, msgid); setFromPlayer(fromPlayer); } -KGameChat::KGameChat(TQWidget* parent) : KChatBase(parent) +KGameChat::KGameChat(TQWidget* tqparent) : KChatBase(tqparent) { init(0, -1); } @@ -92,7 +92,7 @@ void KGameChat::addMessage(int fromId, const TQString& text) { if (!d->mGame) { kdWarning(11001) << "no KGame object has been set" << endl; - addMessage(i18n("Player %1").arg(fromId), text); + addMessage(i18n("Player %1").tqarg(fromId), text); } else { KPlayer* p = d->mGame->findPlayer(fromId); if (p) { @@ -162,10 +162,10 @@ bool KGameChat::isToGroupMessage(int id) const bool KGameChat::isToPlayerMessage(int id) const { -return d->mSendId2PlayerId.contains(id); } +return d->mSendId2PlayerId.tqcontains(id); } TQString KGameChat::sendToPlayerEntry(const TQString& name) const -{ return i18n("Send to %1").arg(name); } +{ return i18n("Send to %1").tqarg(name); } int KGameChat::playerId(int id) const { @@ -188,7 +188,7 @@ int KGameChat::sendingId(int playerId) const } const TQString& KGameChat::fromName() const -{ return d->mFromPlayer ? d->mFromPlayer->name() : TQString::null; } +{ return d->mFromPlayer ? d->mFromPlayer->name() : TQString(); } bool KGameChat::hasPlayer(int id) const { @@ -211,7 +211,7 @@ void KGameChat::setFromPlayer(KPlayer* p) removeSendingEntry(d->mToMyGroup); } d->mToMyGroup = nextId(); - addSendingEntry(i18n("Send to My Group (\"%1\")").arg(p->group()), d->mToMyGroup); + addSendingEntry(i18n("Send to My Group (\"%1\")").tqarg(p->group()), d->mToMyGroup); } d->mFromPlayer = p; kdDebug(11001) << k_funcinfo << " player=" << p << endl; @@ -231,8 +231,8 @@ void KGameChat::setKGame(KGame* g) this, TQT_SLOT(slotAddPlayer(KPlayer*))); connect(d->mGame, TQT_SIGNAL(signalPlayerLeftGame(KPlayer*)), this, TQT_SLOT(slotRemovePlayer(KPlayer*))); - connect(d->mGame, TQT_SIGNAL(signalNetworkData(int, const TQByteArray&, Q_UINT32, Q_UINT32)), - this, TQT_SLOT(slotReceiveMessage(int, const TQByteArray&, Q_UINT32, Q_UINT32))); + connect(d->mGame, TQT_SIGNAL(signalNetworkData(int, const TQByteArray&, TQ_UINT32, TQ_UINT32)), + this, TQT_SLOT(slotReceiveMessage(int, const TQByteArray&, TQ_UINT32, TQ_UINT32))); connect(d->mGame, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotUnsetKGame())); TQPtrList<KPlayer> playerList = *d->mGame->playerList(); @@ -283,8 +283,8 @@ void KGameChat::slotAddPlayer(KPlayer* p) d->mSendId2PlayerId.insert(sendingId, p->id()); connect(p, TQT_SIGNAL(signalPropertyChanged(KGamePropertyBase*, KPlayer*)), this, TQT_SLOT(slotPropertyChanged(KGamePropertyBase*, KPlayer*))); - connect(p, TQT_SIGNAL(signalNetworkData(int, const TQByteArray&, Q_UINT32, KPlayer*)), - this, TQT_SLOT(slotReceivePrivateMessage(int, const TQByteArray&, Q_UINT32, KPlayer*))); + connect(p, TQT_SIGNAL(signalNetworkData(int, const TQByteArray&, TQ_UINT32, KPlayer*)), + this, TQT_SLOT(slotReceivePrivateMessage(int, const TQByteArray&, TQ_UINT32, KPlayer*))); } void KGameChat::slotRemovePlayer(KPlayer* p) @@ -317,7 +317,7 @@ void KGameChat::slotPropertyChanged(KGamePropertyBase* prop, KPlayer* player) } } -void KGameChat::slotReceivePrivateMessage(int msgid, const TQByteArray& buffer, Q_UINT32 sender, KPlayer* me) +void KGameChat::slotReceivePrivateMessage(int msgid, const TQByteArray& buffer, TQ_UINT32 sender, KPlayer* me) { if (!me || me != fromPlayer()) { kdDebug() << k_funcinfo << "nope - not for us!" << endl; @@ -326,7 +326,7 @@ void KGameChat::slotReceivePrivateMessage(int msgid, const TQByteArray& buffer, slotReceiveMessage(msgid, buffer, me->id(), sender); } -void KGameChat::slotReceiveMessage(int msgid, const TQByteArray& buffer, Q_UINT32 , Q_UINT32 sender) +void KGameChat::slotReceiveMessage(int msgid, const TQByteArray& buffer, TQ_UINT32 , TQ_UINT32 sender) { TQDataStream msg(buffer, IO_ReadOnly); if (msgid != messageId()) { |