diff options
Diffstat (limited to 'libtdegames/kgame')
-rw-r--r-- | libtdegames/kgame/COMPAT | 2 | ||||
-rw-r--r-- | libtdegames/kgame/DESIGN | 2 | ||||
-rw-r--r-- | libtdegames/kgame/dialogs/kgameconnectdialog.cpp | 2 | ||||
-rw-r--r-- | libtdegames/kgame/dialogs/kgamedebugdialog.cpp | 42 | ||||
-rw-r--r-- | libtdegames/kgame/dialogs/kgamedialog.cpp | 2 | ||||
-rw-r--r-- | libtdegames/kgame/dialogs/kgamedialogconfig.cpp | 6 | ||||
-rw-r--r-- | libtdegames/kgame/dialogs/kgamedialogconfig.h | 2 | ||||
-rw-r--r-- | libtdegames/kgame/dialogs/kgameerrordialog.cpp | 6 | ||||
-rw-r--r-- | libtdegames/kgame/kgame.cpp | 28 | ||||
-rw-r--r-- | libtdegames/kgame/kgame.h | 10 | ||||
-rw-r--r-- | libtdegames/kgame/kgamechat.cpp | 6 | ||||
-rw-r--r-- | libtdegames/kgame/kgameerror.cpp | 6 | ||||
-rw-r--r-- | libtdegames/kgame/kgameproperty.h | 2 | ||||
-rw-r--r-- | libtdegames/kgame/kgamepropertyhandler.cpp | 6 | ||||
-rw-r--r-- | libtdegames/kgame/kmessageclient.cpp | 8 | ||||
-rw-r--r-- | libtdegames/kgame/kmessageclient.h | 6 | ||||
-rw-r--r-- | libtdegames/kgame/kmessageio.cpp | 2 | ||||
-rw-r--r-- | libtdegames/kgame/kmessageio.h | 2 | ||||
-rw-r--r-- | libtdegames/kgame/kmessageserver.h | 2 | ||||
-rw-r--r-- | libtdegames/kgame/messages.txt | 2 |
20 files changed, 72 insertions, 72 deletions
diff --git a/libtdegames/kgame/COMPAT b/libtdegames/kgame/COMPAT index 4551c679..b85ec9b6 100644 --- a/libtdegames/kgame/COMPAT +++ b/libtdegames/kgame/COMPAT @@ -38,7 +38,7 @@ too! The API stays the same. 11.10.2001 KGameDialogGeneralConfig now doesn't provide setMin/maxPlayers() - anymore. The game should manage this internally. tqlayout() is + anymore. The game should manage this internally. layout() is obsolete as well 18.10.2001 KPlayer::signalNetworkData contained QDataStream& instead of const QByteArray& parameter (oops!). This is fixed now. All apps which diff --git a/libtdegames/kgame/DESIGN b/libtdegames/kgame/DESIGN index cd737e3a..b1c48146 100644 --- a/libtdegames/kgame/DESIGN +++ b/libtdegames/kgame/DESIGN @@ -359,7 +359,7 @@ KDialogBase::addVBoxPage() (for example). 5.1.1 Debug KGame ----------------- The first page, "Debug KGame" shows on the left most or even all status values of -KGame. That contains e.g. minPlayers(), isAdmin(), gametqStatus(), ... +KGame. That contains e.g. minPlayers(), isAdmin(), gameStatus(), ... The right side is probably the more important one. It lists *all* KGameProperties which have been inserted to this KGame object (only to this KGame object - not the ones that have been added to the players!). Most of the status variables of diff --git a/libtdegames/kgame/dialogs/kgameconnectdialog.cpp b/libtdegames/kgame/dialogs/kgameconnectdialog.cpp index 98958ffd..009c4e76 100644 --- a/libtdegames/kgame/dialogs/kgameconnectdialog.cpp +++ b/libtdegames/kgame/dialogs/kgameconnectdialog.cpp @@ -27,7 +27,7 @@ #include <tqlineedit.h> #include <tqcombobox.h> #include <tqvbuttongroup.h> -#include <tqlayout.h> +#include <layout.h> #include <tqradiobutton.h> #include <tqlabel.h> #include <dnssd/servicebrowser.h> diff --git a/libtdegames/kgame/dialogs/kgamedebugdialog.cpp b/libtdegames/kgame/dialogs/kgamedebugdialog.cpp index 49623238..11745f21 100644 --- a/libtdegames/kgame/dialogs/kgamedebugdialog.cpp +++ b/libtdegames/kgame/dialogs/kgamedebugdialog.cpp @@ -32,7 +32,7 @@ #include <kpushbutton.h> #include <kstdguiitem.h> -#include <tqlayout.h> +#include <layout.h> #include <tqstring.h> #include <tqintdict.h> #include <tqlabel.h> @@ -56,7 +56,7 @@ public: mGameMaster = 0; mGameAdmin = 0; mGameOffering = 0; - mGametqStatus = 0; + mGameStatus = 0; mGameRunning = 0; mGameMaxPlayers = 0; mGameMinPlayers = 0; @@ -93,7 +93,7 @@ public: TQListViewItem* mGameMaster; TQListViewItem* mGameAdmin; TQListViewItem* mGameOffering; - TQListViewItem* mGametqStatus; + TQListViewItem* mGameStatus; TQListViewItem* mGameRunning; TQListViewItem* mGameMaxPlayers; TQListViewItem* mGameMinPlayers; @@ -142,18 +142,18 @@ void KGameDebugDialog::initGamePage() { d->mGamePage = addPage(i18n("Debug &KGame")); TQVBoxLayout* topLayout = new TQVBoxLayout(d->mGamePage, marginHint(), spacingHint()); - TQHBoxLayout* tqlayout = new TQHBoxLayout(topLayout); + TQHBoxLayout* layout = new TQHBoxLayout(topLayout); KListView* v = new KListView(d->mGamePage); v->addColumn(i18n("Data")); v->addColumn(i18n("Value")); - tqlayout->addWidget(v); + layout->addWidget(v); d->mGameProperties = new KListView(d->mGamePage); d->mGameProperties->addColumn(i18n("Property")); d->mGameProperties->addColumn(i18n("Value")); d->mGameProperties->addColumn(i18n("Policy")); - tqlayout->addWidget(d->mGameProperties); + layout->addWidget(d->mGameProperties); TQPushButton* b = new TQPushButton(i18n("Update"), d->mGamePage); connect(b, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotUpdateGameData())); @@ -166,7 +166,7 @@ void KGameDebugDialog::initGamePage() d->mGameMaster = new TQListViewItem(v, i18n("Is Master")); d->mGameAdmin = new TQListViewItem(v, i18n("Is Admin")); d->mGameOffering = new TQListViewItem(v, i18n("Is Offering Connections")); - d->mGametqStatus = new TQListViewItem(v, i18n("Game Status")); + d->mGameStatus = new TQListViewItem(v, i18n("Game Status")); d->mGameRunning = new TQListViewItem(v, i18n("Game is Running")); d->mGameMaxPlayers = new TQListViewItem(v, i18n("Maximal Players")); d->mGameMinPlayers = new TQListViewItem(v, i18n("Minimal Players")); @@ -177,19 +177,19 @@ void KGameDebugDialog::initPlayerPage() { d->mPlayerPage = addPage(i18n("Debug &Players")); TQVBoxLayout* topLayout = new TQVBoxLayout(d->mPlayerPage, marginHint(), spacingHint()); - TQHBoxLayout* tqlayout = new TQHBoxLayout(topLayout); + TQHBoxLayout* layout = new TQHBoxLayout(topLayout); //TODO: connect to the KGame signals for joined/removed players!!! - TQVBoxLayout* listLayout = new TQVBoxLayout(tqlayout); + TQVBoxLayout* listLayout = new TQVBoxLayout(layout); TQLabel* listLabel = new TQLabel(i18n("Available Players"), d->mPlayerPage); listLayout->addWidget(listLabel); d->mPlayerList = new KListBox(d->mPlayerPage); connect(d->mPlayerList, TQT_SIGNAL(executed(TQListBoxItem*)), this, TQT_SLOT(slotUpdatePlayerData(TQListBoxItem*))); listLayout->addWidget(d->mPlayerList); - d->mPlayerList->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding)); + d->mPlayerList->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding)); KListView* v = new KListView(d->mPlayerPage); - tqlayout->addWidget(v); + layout->addWidget(v); v->addColumn(i18n("Data")); v->addColumn(i18n("Value")); @@ -197,7 +197,7 @@ void KGameDebugDialog::initPlayerPage() d->mPlayerProperties->addColumn(i18n("Property")); d->mPlayerProperties->addColumn(i18n("Value")); d->mPlayerProperties->addColumn(i18n("Policy")); - tqlayout->addWidget(d->mPlayerProperties); + layout->addWidget(d->mPlayerProperties); TQPushButton* b = new TQPushButton(i18n("Update"), d->mPlayerPage); connect(b, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotUpdatePlayerList())); @@ -220,9 +220,9 @@ void KGameDebugDialog::initPlayerPage() void KGameDebugDialog::initMessagePage() { d->mMessagePage = addPage(i18n("Debug &Messages")); - TQGridLayout* tqlayout = new TQGridLayout(d->mMessagePage, 11, 7, marginHint(), spacingHint()); + TQGridLayout* layout = new TQGridLayout(d->mMessagePage, 11, 7, marginHint(), spacingHint()); d->mMessageList = new KListView(d->mMessagePage); - tqlayout->addMultiCellWidget(d->mMessageList, 0, 9, 0, 3); + layout->addMultiCellWidget(d->mMessageList, 0, 9, 0, 3); d->mMessageList->addColumn(i18n("Time")); d->mMessageList->addColumn(i18n("ID")); d->mMessageList->addColumn(i18n("Receiver")); @@ -231,20 +231,20 @@ void KGameDebugDialog::initMessagePage() TQPushButton* hide = new TQPushButton(i18n("&>>"), d->mMessagePage); connect(hide, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotHideId())); - tqlayout->addWidget(hide, 4, 4); + layout->addWidget(hide, 4, 4); TQPushButton* show = new TQPushButton(i18n("&<<"), d->mMessagePage); connect(show, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotShowId())); - tqlayout->addWidget(show, 6, 4); + layout->addWidget(show, 6, 4); TQLabel* l = new TQLabel(i18n("Do not show IDs:"), d->mMessagePage); - tqlayout->addMultiCellWidget(l, 0, 0, 5, 6); + layout->addMultiCellWidget(l, 0, 0, 5, 6); d->mHideIdList = new KListBox(d->mMessagePage); - tqlayout->addMultiCellWidget(d->mHideIdList, 1, 8, 5, 6); + layout->addMultiCellWidget(d->mHideIdList, 1, 8, 5, 6); TQPushButton* clear = new KPushButton(KStdGuiItem::clear(), d->mMessagePage); connect(clear, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotClearMessages())); - tqlayout->addMultiCellWidget(clear, 10, 10, 0, 6); + layout->addMultiCellWidget(clear, 10, 10, 0, 6); //TODO: "show all but..." and "show nothing but..." } @@ -274,7 +274,7 @@ void KGameDebugDialog::clearGameData() d->mGameMaster->setText(1, ""); d->mGameAdmin->setText(1, ""); d->mGameOffering->setText(1, ""); - d->mGametqStatus->setText(1, ""); + d->mGameStatus->setText(1, ""); d->mGameRunning->setText(1, ""); d->mGameMaxPlayers->setText(1, ""); d->mGameMinPlayers->setText(1, ""); @@ -320,7 +320,7 @@ void KGameDebugDialog::slotUpdateGameData() d->mGameMaster->setText(1, d->mGame->isMaster() ? i18n("True") : i18n("False")); d->mGameAdmin->setText(1, d->mGame->isAdmin() ? i18n("True") : i18n("False")); d->mGameOffering->setText(1, d->mGame->isOfferingConnections() ? i18n("True") : i18n("False")); - d->mGametqStatus->setText(1, TQString::number(d->mGame->gametqStatus())); + d->mGameStatus->setText(1, TQString::number(d->mGame->gameStatus())); d->mGameRunning->setText(1, d->mGame->isRunning() ? i18n("True") : i18n("False")); d->mGameMaxPlayers->setText(1, TQString::number(d->mGame->maxPlayers())); d->mGameMinPlayers->setText(1, TQString::number(d->mGame->minPlayers())); diff --git a/libtdegames/kgame/dialogs/kgamedialog.cpp b/libtdegames/kgame/dialogs/kgamedialog.cpp index c03df4ff..dc85cd6a 100644 --- a/libtdegames/kgame/dialogs/kgamedialog.cpp +++ b/libtdegames/kgame/dialogs/kgamedialog.cpp @@ -18,7 +18,7 @@ Boston, MA 02110-1301, USA. */ -#include <tqlayout.h> +#include <layout.h> #include <tqvbox.h> #include <klocale.h> diff --git a/libtdegames/kgame/dialogs/kgamedialogconfig.cpp b/libtdegames/kgame/dialogs/kgamedialogconfig.cpp index f6845650..c57ed7f6 100644 --- a/libtdegames/kgame/dialogs/kgamedialogconfig.cpp +++ b/libtdegames/kgame/dialogs/kgamedialogconfig.cpp @@ -31,7 +31,7 @@ #include <klistbox.h> #include <kmessagebox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqhgroupbox.h> #include <tqlabel.h> #include <tqpushbutton.h> @@ -122,7 +122,7 @@ KGameDialogNetworkConfig::KGameDialogNetworkConfig(TQWidget* parent) // kdDebug(11001) << k_funcinfo << ": this=" << this << endl; d = new KGameDialogNetworkConfigPrivate(); - TQVBoxLayout* topLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "toptqlayout"); + TQVBoxLayout* topLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "toplayout"); TQHBoxLayout *hb = new TQHBoxLayout(topLayout, KDialog::spacingHint()); @@ -743,7 +743,7 @@ void KGameDialogConnectionConfig::slotKickPlayerOut(TQListBoxItem* item) return; } - if (KMessageBox::questionYesNo(this, i18n("Do you want to ban player \"%1\" from the game?").tqarg( + if (KMessageBox::questionYesNo(this, i18n("Do you want to ban player \"%1\" from the game?").arg( p->name()), TQString(), i18n("Ban Player"), i18n("Do Not Ban")) == KMessageBox::Yes) { kdDebug(11001) << "will remove player " << p << endl; game()->removePlayer(p); diff --git a/libtdegames/kgame/dialogs/kgamedialogconfig.h b/libtdegames/kgame/dialogs/kgamedialogconfig.h index c2c36e2a..b91f05d0 100644 --- a/libtdegames/kgame/dialogs/kgamedialogconfig.h +++ b/libtdegames/kgame/dialogs/kgamedialogconfig.h @@ -157,7 +157,7 @@ public: * * @param parent Parent widget for this dialog. * @param initializeGUI If you really don't want to use the - * predefined widget and/or tqlayout use FALSE here. Note that then none + * predefined widget and/or layout use FALSE here. Note that then none * of the predefined widgets (currently only the name of the player) * will exist anymore. * diff --git a/libtdegames/kgame/dialogs/kgameerrordialog.cpp b/libtdegames/kgame/dialogs/kgameerrordialog.cpp index 6ab9d71c..e22211c3 100644 --- a/libtdegames/kgame/dialogs/kgameerrordialog.cpp +++ b/libtdegames/kgame/dialogs/kgameerrordialog.cpp @@ -86,7 +86,7 @@ void KGameErrorDialog::slotClientConnectionLost(TQ_UINT32 /*id*/,bool) //TODO: add IP/port of the client TQString message; // if (c) { -// message = i18n("Connection to client has been lost!\nID: %1\nIP: %2").tqarg(c->id()).tqarg(c->IP()); +// message = i18n("Connection to client has been lost!\nID: %1\nIP: %2").arg(c->id()).arg(c->IP()); // } else { // message = i18n("Connection to client has been lost!"); // } @@ -96,7 +96,7 @@ void KGameErrorDialog::slotClientConnectionLost(TQ_UINT32 /*id*/,bool) void KGameErrorDialog::slotError(int errorNo, TQString text) { - TQString message = i18n("Received a network error!\nError number: %1\nError message: %2").tqarg(errorNo).tqarg(text); + TQString message = i18n("Received a network error!\nError number: %1\nError message: %2").arg(errorNo).arg(text); error(message, (TQWidget*)parent()); } @@ -106,7 +106,7 @@ void KGameErrorDialog::connectionError(TQString s) if (s.isNull()) { message = i18n("No connection could be created."); } else { - message = i18n("No connection could be created.\nThe error message was:\n%1").tqarg(s); + message = i18n("No connection could be created.\nThe error message was:\n%1").arg(s); } error(message, (TQWidget*)parent()); } diff --git a/libtdegames/kgame/kgame.cpp b/libtdegames/kgame/kgame.cpp index 2eebac64..c2f7f583 100644 --- a/libtdegames/kgame/kgame.cpp +++ b/libtdegames/kgame/kgame.cpp @@ -75,7 +75,7 @@ public: //KGamePropertys KGamePropertyInt mMaxPlayer; KGamePropertyUInt mMinPlayer; - KGamePropertyInt mGametqStatus; // Game running? + KGamePropertyInt mGameStatus; // Game running? TQValueList<int> mInactiveIdList; }; @@ -95,8 +95,8 @@ KGame::KGame(int cookie,TQObject* parent) : KGameNetwork(cookie,parent) d->mMaxPlayer.setLocal(-1); // Infinite d->mMinPlayer.registerData(KGamePropertyBase::IdMinPlayer, this, i18n("MinPlayers")); d->mMinPlayer.setLocal(0); // Always ok - d->mGametqStatus.registerData(KGamePropertyBase::IdGametqStatus, this, i18n("GameStatus")); - d->mGametqStatus.setLocal(Init); + d->mGameStatus.registerData(KGamePropertyBase::IdGameStatus, this, i18n("GameStatus")); + d->mGameStatus.setLocal(Init); // d->mUniquePlayerNumber = 0; d->mRandom = new KRandomSequence; d->mRandom->setSeed(0); @@ -542,10 +542,10 @@ void KGame::systemRemovePlayer(KPlayer* player,bool deleteit) kdWarning(11001) << "player " << player << "(" << player->id() << ") Could not be found!" << endl; } - if (gametqStatus()==(int)Run && playerCount()<minPlayers()) + if (gameStatus()==(int)Run && playerCount()<minPlayers()) { kdWarning(11001) << k_funcinfo ": not enough players, PAUSING game\n" << endl; - setGametqStatus(Pause); + setGameStatus(Pause); } } @@ -680,11 +680,11 @@ int KGame::maxPlayers() const uint KGame::playerCount() const { return d->mPlayerList.count(); } -int KGame::gametqStatus() const -{ return d->mGametqStatus.value(); } +int KGame::gameStatus() const +{ return d->mGameStatus.value(); } bool KGame::isRunning() const -{ return d->mGametqStatus.value() == Run; } +{ return d->mGameStatus.value() == Run; } KGamePropertyHandler* KGame::dataHandler() const { return d->mProperties; } @@ -772,7 +772,7 @@ KPlayer * KGame::playerInputFinished(KPlayer *player) { player->setTurn(false); } - setGametqStatus(End); + setGameStatus(End); emit signalGameOver(gameOver,player,this); } else if (!player->asyncInput()) @@ -829,7 +829,7 @@ KPlayer *KGame::nextPlayer(KPlayer *last,bool exclusive) return 0; } -void KGame::setGametqStatus(int status) +void KGame::setGameStatus(int status) { kdDebug(11001) << k_funcinfo << ": GAMESTATUS CHANGED to" << status << endl; if (status==(int)Run && playerCount()<minPlayers()) @@ -837,7 +837,7 @@ void KGame::setGametqStatus(int status) kdDebug(11001) << k_funcinfo << ": not enough players, pausing game\n" << endl; status=Pause; } - d->mGametqStatus = status; + d->mGameStatus = status; } void KGame::networkTransmission(TQDataStream &stream, int msgid, TQ_UINT32 receiver, TQ_UINT32 sender, TQ_UINT32 /*clientID*/) @@ -1244,7 +1244,7 @@ void KGame::Debug() kdDebug(11001) << "------------------- KGAME -------------------------" << endl; kdDebug(11001) << "this: " << this << endl; kdDebug(11001) << "uniquePlayer " << d->mUniquePlayerNumber << endl; - kdDebug(11001) << "gameStatus " << gametqStatus() << endl; + kdDebug(11001) << "gameStatus " << gameStatus() << endl; kdDebug(11001) << "MaxPlayers : " << maxPlayers() << endl; kdDebug(11001) << "NoOfPlayers : " << playerCount() << endl; kdDebug(11001) << "NoOfInactive: " << d->mInactivePlayerList.count() << endl; @@ -1264,7 +1264,7 @@ void KGame::slotServerDisconnected() // Client side kdDebug(11001) << "======= SERVER DISCONNECT ======="<<endl; kdDebug(11001) << "+++ (CLIENT)++++++++" << k_funcinfo << ": our GameID="<<gameId() << endl; - int oldgamestatus=gametqStatus(); + int oldgamestatus=gameStatus(); KPlayer *player; KGamePlayerList removeList; @@ -1326,7 +1326,7 @@ void KGame::slotClientDisconnected(TQ_UINT32 clientID,bool /*broken*/) // server { kdDebug(11001) << "++++(SERVER)+++++++" << k_funcinfo << " clientId=" << clientID << endl; - int oldgamestatus=gametqStatus(); + int oldgamestatus=gameStatus(); KPlayer *player; KGamePlayerList removeList; diff --git a/libtdegames/kgame/kgame.h b/libtdegames/kgame/kgame.h index bf66dcb8..7ad010fc 100644 --- a/libtdegames/kgame/kgame.h +++ b/libtdegames/kgame/kgame.h @@ -118,7 +118,7 @@ public: * The KGame e.g. sets the status to Pause when you have * less player than the minimum amount */ - enum GametqStatus + enum GameStatus { Init = 0, Run = 1, @@ -127,7 +127,7 @@ public: Abort = 4, SystemPause = 5, Intro = 6, - UsertqStatus = 7 + UserStatus = 7 }; // Properties @@ -387,14 +387,14 @@ public: * * @return game status */ - int gametqStatus() const; + int gameStatus() const; /** * sets the game status * * @param status the new status */ - void setGametqStatus(int status); + void setGameStatus(int status); /** * docu: see KPlayer @@ -433,7 +433,7 @@ public: * @param msg the message which will be send. See messages.txt for contents * @param msgid an id for this message * @param sender the id of the sender - * @param group the group of the tqreceivers + * @param group the group of the receivers * @return true if worked */ bool sendGroupMessage(const TQByteArray& msg, int msgid, TQ_UINT32 sender, const TQString& group); diff --git a/libtdegames/kgame/kgamechat.cpp b/libtdegames/kgame/kgamechat.cpp index 11f47f7b..c2469906 100644 --- a/libtdegames/kgame/kgamechat.cpp +++ b/libtdegames/kgame/kgamechat.cpp @@ -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").tqarg(fromId), text); + addMessage(i18n("Player %1").arg(fromId), text); } else { KPlayer* p = d->mGame->findPlayer(fromId); if (p) { @@ -165,7 +165,7 @@ bool KGameChat::isToPlayerMessage(int id) const return d->mSendId2PlayerId.contains(id); } TQString KGameChat::sendToPlayerEntry(const TQString& name) const -{ return i18n("Send to %1").tqarg(name); } +{ return i18n("Send to %1").arg(name); } int KGameChat::playerId(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\")").tqarg(p->group()), d->mToMyGroup); + addSendingEntry(i18n("Send to My Group (\"%1\")").arg(p->group()), d->mToMyGroup); } d->mFromPlayer = p; kdDebug(11001) << k_funcinfo << " player=" << p << endl; diff --git a/libtdegames/kgame/kgameerror.cpp b/libtdegames/kgame/kgameerror.cpp index ef6145fb..4ed64e0d 100644 --- a/libtdegames/kgame/kgameerror.cpp +++ b/libtdegames/kgame/kgameerror.cpp @@ -60,7 +60,7 @@ TQString KGameError::errorText(int errorCode, TQDataStream& s) TQ_INT32 cookie2; s >> cookie1; s >> cookie2; - text = i18n("Cookie mismatch!\nExpected Cookie: %1\nReceived Cookie: %2").tqarg(cookie1).tqarg(cookie2); + text = i18n("Cookie mismatch!\nExpected Cookie: %1\nReceived Cookie: %2").arg(cookie1).arg(cookie2); break; } case Version: @@ -69,11 +69,11 @@ TQString KGameError::errorText(int errorCode, TQDataStream& s) TQ_INT32 version2; s >> version1; s >> version2; - text = i18n("KGame Version mismatch!\nExpected Version: %1\nReceived Version: %2\n").tqarg(version1).tqarg(version2); + text = i18n("KGame Version mismatch!\nExpected Version: %1\nReceived Version: %2\n").arg(version1).arg(version2); break; } default: - text = i18n("Unknown error code %1").tqarg(errorCode); + text = i18n("Unknown error code %1").arg(errorCode); } return text; } diff --git a/libtdegames/kgame/kgameproperty.h b/libtdegames/kgame/kgameproperty.h index f02c4db0..0bb117b8 100644 --- a/libtdegames/kgame/kgameproperty.h +++ b/libtdegames/kgame/kgameproperty.h @@ -51,7 +51,7 @@ public: IdName=5, //KGame - IdGametqStatus=6, + IdGameStatus=6, IdMaxPlayer=7, IdMinPlayer=8, diff --git a/libtdegames/kgame/kgamepropertyhandler.cpp b/libtdegames/kgame/kgamepropertyhandler.cpp index 405d433e..9ad43a69 100644 --- a/libtdegames/kgame/kgamepropertyhandler.cpp +++ b/libtdegames/kgame/kgamepropertyhandler.cpp @@ -174,13 +174,13 @@ TQString KGamePropertyHandler::propertyName(int id) const TQString s; if (d->mIdDict.find(id)) { if (d->mNameMap.contains(id)) { - s = i18n("%1 (%2)").tqarg(d->mNameMap[id]).tqarg(id); + s = i18n("%1 (%2)").arg(d->mNameMap[id]).arg(id); } else { - s = i18n("Unnamed - ID: %1").tqarg(id); + s = i18n("Unnamed - ID: %1").arg(id); } } else { // Should _never_ happen - s = i18n("%1 unregistered").tqarg(id); + s = i18n("%1 unregistered").arg(id); } return s; } diff --git a/libtdegames/kgame/kmessageclient.cpp b/libtdegames/kgame/kmessageclient.cpp index 0233884a..056ca879 100644 --- a/libtdegames/kgame/kmessageclient.cpp +++ b/libtdegames/kgame/kmessageclient.cpp @@ -132,7 +132,7 @@ TQ_UINT16 KMessageClient::peerPort () const TQString KMessageClient::peerName () const { - return d->connection ? d->connection->peerName() : TQString::tqfromLatin1("localhost"); + return d->connection ? d->connection->peerName() : TQString::fromLatin1("localhost"); } // --------------------- Sending messages @@ -228,9 +228,9 @@ void KMessageClient::processMessage (const TQByteArray &msg) case KMessageServer::MSG_FORWARD: { TQ_UINT32 clientID; - TQValueList <TQ_UINT32> tqreceivers; - in_stream >> clientID >> tqreceivers; - emit forwardReceived (in_buffer.readAll(), clientID, tqreceivers); + TQValueList <TQ_UINT32> receivers; + in_stream >> clientID >> receivers; + emit forwardReceived (in_buffer.readAll(), clientID, receivers); } break; diff --git a/libtdegames/kgame/kmessageclient.h b/libtdegames/kgame/kmessageclient.h index 8a35234d..da15f16d 100644 --- a/libtdegames/kgame/kmessageclient.h +++ b/libtdegames/kgame/kmessageclient.h @@ -284,7 +284,7 @@ signals: senderID contains the ID of the client that sent the broadcast message. You can use this e.g. to send a reply message to only that client. - tqreceivers contains the list of the clients that got the message. (If this list + receivers contains the list of the clients that got the message. (If this list only contains one number, this will be your client ID, and it was exclusivly sent to you.) @@ -302,9 +302,9 @@ signals: Then connect the broadcast signal to your slot that analyzes the message. @param msg The message that has been sent to us @param senderID The ID of the client which sent the message - @param tqreceivers All clients which receive this message + @param receivers All clients which receive this message */ - void forwardReceived (const TQByteArray &msg, TQ_UINT32 senderID, const TQValueList <TQ_UINT32> &tqreceivers); + void forwardReceived (const TQByteArray &msg, TQ_UINT32 senderID, const TQValueList <TQ_UINT32> &receivers); /** This signal is emitted when the connection to the KMessageServer is broken. diff --git a/libtdegames/kgame/kmessageio.cpp b/libtdegames/kgame/kmessageio.cpp index b35382b0..b3dd1875 100644 --- a/libtdegames/kgame/kmessageio.cpp +++ b/libtdegames/kgame/kmessageio.cpp @@ -245,7 +245,7 @@ KMessageProcess::KMessageProcess(TQObject *parent, TQString file) : KMessageIO(p mProcessName=file; mProcess=new KProcess; int id=0; - *mProcess << mProcessName << TQString("%1").tqarg(id); + *mProcess << mProcessName << TQString("%1").arg(id); kdDebug(11001) << "@@@KMessageProcess::Init:Id= " << id << endl; kdDebug(11001) << "@@@KMessgeProcess::Init:Processname: " << mProcessName << endl; connect(mProcess, TQT_SIGNAL(receivedStdout(KProcess *, char *, int )), diff --git a/libtdegames/kgame/kmessageio.h b/libtdegames/kgame/kmessageio.h index 326476ff..69038df9 100644 --- a/libtdegames/kgame/kmessageio.h +++ b/libtdegames/kgame/kmessageio.h @@ -123,7 +123,7 @@ public: @since 3.2 @return "localhost" in the default implementation. Reimplemented in @ref KMessageSocket */ - virtual TQString peerName () const { return TQString::tqfromLatin1("localhost"); } + virtual TQString peerName () const { return TQString::fromLatin1("localhost"); } signals: diff --git a/libtdegames/kgame/kmessageserver.h b/libtdegames/kgame/kmessageserver.h index 9042fca2..067ea3f9 100644 --- a/libtdegames/kgame/kmessageserver.h +++ b/libtdegames/kgame/kmessageserver.h @@ -83,7 +83,7 @@ class KMessageServerPrivate; TQ_UINT32 clientID; // the ID of the client that sent the broadcast request - TQByteArray << static_cast<TQ_UINT32>( RETQ_FORWARD ) << client_list << raw_data - TQValueList <TQ_UINT32> client_list; // list of tqreceivers + TQValueList <TQ_UINT32> client_list; // list of receivers When the server receives this message, it sends the following message to the clients in client_list: diff --git a/libtdegames/kgame/messages.txt b/libtdegames/kgame/messages.txt index c42d2d91..3a163790 100644 --- a/libtdegames/kgame/messages.txt +++ b/libtdegames/kgame/messages.txt @@ -82,7 +82,7 @@ IdRemovePlayer Q_INT16 playerid IdError Q_INT32 errorcode QString errortext -IdGametqStatus Q_INT32 status +IdGameStatus Q_INT32 status IdPlayerProperty Q_INT16 propertyId user defined -> the property |