From 0e2b76239f354a9eead0b4e37d86d390ec57ffa9 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 18 Dec 2011 18:31:10 -0600 Subject: Rename old tq methods that no longer need a unique name --- libtdegames/kgame/DESIGN | 2 +- libtdegames/kgame/dialogs/kgamedebugdialog.cpp | 12 +++++------ libtdegames/kgame/kgame.cpp | 28 +++++++++++++------------- libtdegames/kgame/kgame.h | 8 ++++---- libtdegames/kgame/kgameproperty.h | 2 +- libtdegames/kgame/kmessageclient.cpp | 2 +- libtdegames/kgame/kmessageio.h | 2 +- libtdegames/kgame/messages.txt | 2 +- 8 files changed, 29 insertions(+), 29 deletions(-) (limited to 'libtdegames/kgame') 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/kgamedebugdialog.cpp b/libtdegames/kgame/dialogs/kgamedebugdialog.cpp index 49623238..6b56432c 100644 --- a/libtdegames/kgame/dialogs/kgamedebugdialog.cpp +++ b/libtdegames/kgame/dialogs/kgamedebugdialog.cpp @@ -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; @@ -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")); @@ -186,7 +186,7 @@ void KGameDebugDialog::initPlayerPage() 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); @@ -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/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 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()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()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 ======="<connection ? d->connection->peerName() : TQString::fromLatin1("localhost"); } // --------------------- Sending messages 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/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 -- cgit v1.2.1