Running astyle.

This commit is contained in:
lotodore
2013-10-06 16:30:09 +02:00
parent c8939fdbdf
commit f0f3d2eb04
44 changed files with 201 additions and 200 deletions
@@ -1041,7 +1041,8 @@ void gameLobbyDialogImpl::addConnectedPlayer(unsigned playerId, QString playerNa
refreshConnectedPlayerAvatars();
}
void gameLobbyDialogImpl::addConnectedSpectator(unsigned spectatorId, QString spectatorName) {
void gameLobbyDialogImpl::addConnectedSpectator(unsigned spectatorId, QString spectatorName)
{
QTreeWidgetItem *item = new QTreeWidgetItem(treeWidget_connectedSpectators, 0);
item->setData(0, Qt::UserRole, spectatorId);
@@ -1672,8 +1673,11 @@ void gameLobbyDialogImpl::showNickListContextMenu(QPoint p)
nickListPlayerInGameInfo->setText(playerInGameInfoString);
//prevent admin to total kickban himself
if(playerUid == mySession->getClientUniquePlayerId()) { nickListAdminTotalKickBan->setDisabled(true); }
else { nickListAdminTotalKickBan->setEnabled(true); }
if(playerUid == mySession->getClientUniquePlayerId()) {
nickListAdminTotalKickBan->setDisabled(true);
} else {
nickListAdminTotalKickBan->setEnabled(true);
}
// check for admin and remove admin actions for non-admins
if(!mySession->getClientPlayerInfo(mySession->getClientUniquePlayerId()).isAdmin) {
@@ -1693,8 +1697,11 @@ void gameLobbyDialogImpl::showGameListContextMenu(QPoint p)
assert(mySession);
unsigned selectedGameId = myGameListSelectionModel->selectedRows().first().data(Qt::UserRole).toUInt();
if(selectedGameId == mySession->getClientCurrentGameId()) { gameListAdminCloseGame->setDisabled(true); }
else { gameListAdminCloseGame->setEnabled(true); }
if(selectedGameId == mySession->getClientCurrentGameId()) {
gameListAdminCloseGame->setDisabled(true);
} else {
gameListAdminCloseGame->setEnabled(true);
}
// check for admin and remove admin actions for non-admins
if(!mySession->getClientPlayerInfo(mySession->getClientUniquePlayerId()).isAdmin) {
+1 -2
View File
@@ -4482,8 +4482,7 @@ void gameTableImpl::refreshSpectatorsDisplay()
}
spectatorList.remove(spectatorList.size()-4,4);
spectatorIcon->setToolTip(spectatorList);
}
else {
} else {
spectatorIcon->setToolTip("");
spectatorIcon->clear();
}
+1 -2
View File
@@ -399,8 +399,7 @@ void MyAvatarLabel::paintEvent(QPaintEvent*)
if(!playerIsOnIgnoreList(QString::fromUtf8(mySession->getClientPlayerInfo(myUniqueId).playerName.c_str()))) {
painter.drawPixmap(0,0,myPixmap);
return;
}
else if(myW->getMyConfig()->readConfigInt("DontHideAvatarsOfIgnored")) {
} else if(myW->getMyConfig()->readConfigInt("DontHideAvatarsOfIgnored")) {
painter.drawPixmap(0,0,myPixmap);
return;
}
+1 -2
View File
@@ -287,8 +287,7 @@ void LogFileDialog::showLogAnalysis(QString /*filename*/, QString returnMessage)
if (retStr == LOG_UPLOAD_ERROR_STR) {
QString errorId(returnMessage.mid(retStr.size()).trimmed());
serverMsg += "\n" + tr("Failure reason: ");
switch (errorId.toInt())
{
switch (errorId.toInt()) {
case LOG_UPLOAD_ERROR_NO_FILE :
serverMsg += tr("No file received.");
break;
+2 -1
View File
@@ -1186,7 +1186,8 @@ void startWindowImpl::networkMessage(unsigned msgId)
msgText = tr("The player could not be found.");
}
break;
default: showMsgBox = false;
default:
showMsgBox = false;
break;
}
+1 -2
View File
@@ -1837,8 +1837,7 @@ ServerLobbyThread::TimerRemoveGame(const boost::system::error_code &ec)
GameMap::iterator next = i;
++next;
boost::shared_ptr<ServerGame> tmpGame = i->second;
if (!tmpGame->GetSessionManager().HasSessionWithState(SessionData::Game))
{
if (!tmpGame->GetSessionManager().HasSessionWithState(SessionData::Game)) {
tmpGame->MoveSpectatorsToLobby();
InternalRemoveGame(tmpGame); // This will delete the game.
}
+1 -2
View File
@@ -94,8 +94,7 @@ ServerManager::Init(unsigned serverPort, unsigned websocketPort, bool ipv6, int
sctpAcceptHelper->Listen(serverPort, ipv6, logDir, m_lobbyThread);
m_acceptHelperPool.push_back(sctpAcceptHelper);
}*/
if (proto & TRANSPORT_PROTOCOL_WEBSOCKET)
{
if (proto & TRANSPORT_PROTOCOL_WEBSOCKET) {
boost::shared_ptr<ServerAcceptInterface> webAcceptHelper(
new ServerAcceptWebHelper(GetGui(), m_ioService, webSocketResource, webSocketOrigin));
webAcceptHelper->Listen(websocketPort, ipv6, logDir, m_lobbyThread);
+1 -2
View File
@@ -36,8 +36,7 @@
#include <net/websocket_defs.h>
struct WebSocketData
{
struct WebSocketData {
boost::shared_ptr<server> webSocketServer;
websocketpp::connection_hdl webHandle;
};
+1 -2
View File
@@ -211,8 +211,7 @@ int main( int argc, char **argv )
QPixmap pixmap;
if(customWelcomePokerTHFile.exists()) {
pixmap.load(QFileInfo(customWelcomePokerTHFile).absoluteFilePath());
}
else {
} else {
//if custom welcome pic could not be saved locally we need to scale it on the fly
pixmap.load(":/android/android-data/gfx/gui/misc/welcomepokerth10_mobile.png");
pixmap = pixmap.scaled(screenWidth, screenHeight, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);