diff --git a/src/engine/local_engine/localhand.cpp b/src/engine/local_engine/localhand.cpp index ff153308..f54d61ef 100755 --- a/src/engine/local_engine/localhand.cpp +++ b/src/engine/local_engine/localhand.cpp @@ -158,19 +158,19 @@ void LocalHand::start() void LocalHand::assignButtons() { - PlayerListIterator seatIt; + PlayerListIterator seatIt; // delete all buttons - for (seatIt=seatsList->begin(); seatIt!=seatsList->end(); ++seatIt) { - (*seatIt)->setMyButton(BUTTON_NONE); + for (seatIt=seatsList->begin(); seatIt!=seatsList->end(); ++seatIt) { + (*seatIt)->setMyButton(BUTTON_NONE); } // assign dealer button - seatIt = getSeatIt(dealerPosition); - if(seatIt == seatsList->end()) { + seatIt = getSeatIt(dealerPosition); + if(seatIt == seatsList->end()) { throw LocalException(__FILE__, __LINE__, ERR_SEAT_NOT_FOUND); } - (*seatIt)->setMyButton(BUTTON_DEALER); + (*seatIt)->setMyButton(BUTTON_DEALER); // assign Small Blind next to dealer. ATTENTION: in heads up it is big blind @@ -181,40 +181,40 @@ void LocalHand::assignButtons() throw LocalException(__FILE__, __LINE__, ERR_SEAT_NOT_FOUND); } - for(size_t i=0; isize(); i++) { + for(size_t i=0; isize(); i++) { ++dealerPositionIt; if(dealerPositionIt == seatsList->end()) dealerPositionIt = seatsList->begin(); - PlayerListIterator activePlayerIt = getActivePlayerIt( (*dealerPositionIt)->getMyUniqueID() ); - if(activePlayerIt != activePlayerList->end() ) { + PlayerListIterator activePlayerIt = getActivePlayerIt( (*dealerPositionIt)->getMyUniqueID() ); + if(activePlayerIt != activePlayerList->end() ) { nextActivePlayerFound = true; if(activePlayerList->size() > 2) { //small blind normal - (*activePlayerIt)->setMyButton(2); - smallBlindPosition = (*activePlayerIt)->getMyUniqueID(); + (*activePlayerIt)->setMyButton(2); + smallBlindPosition = (*activePlayerIt)->getMyUniqueID(); } else { //big blind in heads up - (*activePlayerIt)->setMyButton(3); - bigBlindPosition = (*activePlayerIt)->getMyUniqueID(); + (*activePlayerIt)->setMyButton(3); + bigBlindPosition = (*activePlayerIt)->getMyUniqueID(); // lastPlayerAction for showing cards } // first player after dealer have to show his cards first (in showdown) - lastActionPlayerID = (*activePlayerIt)->getMyUniqueID(); + lastActionPlayerID = (*activePlayerIt)->getMyUniqueID(); myBoard->setLastActionPlayerID(lastActionPlayerID); - ++activePlayerIt; - if(activePlayerIt == activePlayerList->end()) activePlayerIt = activePlayerList->begin(); + ++activePlayerIt; + if(activePlayerIt == activePlayerList->end()) activePlayerIt = activePlayerList->begin(); if(activePlayerList->size() > 2) { //big blind normal - (*activePlayerIt)->setMyButton(3); - bigBlindPosition = (*activePlayerIt)->getMyUniqueID(); + (*activePlayerIt)->setMyButton(3); + bigBlindPosition = (*activePlayerIt)->getMyUniqueID(); } else { //small blind in heads up - (*activePlayerIt)->setMyButton(2); - smallBlindPosition = (*activePlayerIt)->getMyUniqueID(); + (*activePlayerIt)->setMyButton(2); + smallBlindPosition = (*activePlayerIt)->getMyUniqueID(); } break; diff --git a/src/gui/qt/gametable/gametableimpl.cpp b/src/gui/qt/gametable/gametableimpl.cpp index 1d543fe4..bff6afbc 100755 --- a/src/gui/qt/gametable/gametableimpl.cpp +++ b/src/gui/qt/gametable/gametableimpl.cpp @@ -4310,8 +4310,7 @@ void gameTableImpl::restoreGameTableGeometry() int availableHeight = dw.screenGeometry().height(); this->showNormal(); this->setGeometry(0,0,availableWidth, availableHeight); - } - else { + } else { this->showFullScreen(); } #endif diff --git a/src/gui/qt/gametable/log/guilog.cpp b/src/gui/qt/gametable/log/guilog.cpp index a00366c3..e55b56ad 100644 --- a/src/gui/qt/gametable/log/guilog.cpp +++ b/src/gui/qt/gametable/log/guilog.cpp @@ -42,7 +42,7 @@ using namespace std; guiLog::guiLog(gameTableImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir(0), myHtmlLogFile(0), myHtmlLogFile_old(0), myTxtLogFile(0), tb(0) { - newVersion = true; + newVersion = true; myW->setGuiLog(this); myStyle = myW->getMyGameTableStyle(); @@ -566,7 +566,7 @@ int guiLog::exportLog(QString fileStringPdb,int modus,int uniqueGameID_req) switch(modus) { case 1: log_string = "

" + log_string + "

\n"; - // if(!newVersion) log_string = "\n" + log_string; + // if(!newVersion) log_string = "\n" + log_string; break; case 2: log_string += ""; @@ -657,7 +657,7 @@ int guiLog::exportLog(QString fileStringPdb,int modus,int uniqueGameID_req) switch(modus) { case 1: log_string = "

" + log_string; - if(!newVersion) log_string += "
"; + if(!newVersion) log_string += ""; else log_string += ""; break; case 2: @@ -719,7 +719,7 @@ int guiLog::exportLog(QString fileStringPdb,int modus,int uniqueGameID_req) switch(modus) { case 1: - if(!newVersion) log_string += "
"; + if(!newVersion) log_string += "
"; else log_string += "
"; break; case 2: @@ -757,7 +757,7 @@ int guiLog::exportLog(QString fileStringPdb,int modus,int uniqueGameID_req) log_string += ")"; switch(modus) { case 1: - if(!newVersion) log_string += "
"; + if(!newVersion) log_string += "
"; else log_string += "
"; break; case 2: @@ -780,7 +780,7 @@ int guiLog::exportLog(QString fileStringPdb,int modus,int uniqueGameID_req) } } - if(newVersion) { + if(newVersion) { if(modus == 1) log_string += "
"; @@ -902,7 +902,7 @@ int guiLog::exportLog(QString fileStringPdb,int modus,int uniqueGameID_req) if(nRow_Action == 1) { switch(modus) { case 1: - if(!newVersion) log_string += "
"; + if(!newVersion) log_string += "
"; else log_string += "
"; break; case 2: @@ -920,7 +920,7 @@ int guiLog::exportLog(QString fileStringPdb,int modus,int uniqueGameID_req) } - if(!newVersion && modus==1) log_string += "
"; + if(!newVersion && modus==1) log_string += "
"; writeLog(log_string,modus); log_string = ""; @@ -948,10 +948,10 @@ int guiLog::exportLog(QString fileStringPdb,int modus,int uniqueGameID_req) } switch(modus) { case 1: - if(!newVersion) round_string = "
" + round_string + ""; + if(!newVersion) round_string = "
" + round_string + ""; else round_string = "
" + round_string + ""; if(round_ctr >= GAME_STATE_FLOP) { - if(!newVersion) round_string = "
\n" + round_string; + if(!newVersion) round_string = "
\n" + round_string; else round_string = "
\n" + round_string; } break; @@ -1018,7 +1018,7 @@ int guiLog::exportLog(QString fileStringPdb,int modus,int uniqueGameID_req) for(action_ctr=1; action_ctr<=nRow_Action; action_ctr++) { switch(modus) { case 1: - if(!newVersion) { + if(!newVersion) { if(action_ctr>1 && (boost::lexical_cast(results.result_Action[3*(action_ctr-1)+1]) == "wins" || boost::lexical_cast(results.result_Action[3*(action_ctr-1)+1]) == "sits out" || boost::lexical_cast(results.result_Action[3*(action_ctr-1)+1]) == "wins (side pot)")) log_string += "\n"; else @@ -1036,7 +1036,7 @@ int guiLog::exportLog(QString fileStringPdb,int modus,int uniqueGameID_req) default: ; } - if(!newVersion && boost::lexical_cast(results.result_Action[3*action_ctr+1]) == "wins (side pot)") { + if(!newVersion && boost::lexical_cast(results.result_Action[3*action_ctr+1]) == "wins (side pot)") { action_string += player[boost::lexical_cast(results.result_Action[3*action_ctr])-1]; action_string += " wins $"; action_string += boost::lexical_cast(results.result_Action[3*action_ctr+2]); @@ -1056,7 +1056,7 @@ int guiLog::exportLog(QString fileStringPdb,int modus,int uniqueGameID_req) if(boost::lexical_cast(results.result_Action[3*action_ctr+1]) == "wins game") { switch(modus) { case 1: - if(!newVersion) action_string = "

" + action_string + " " + boost::lexical_cast(gameID) + "!
"; + if(!newVersion) action_string = "

" + action_string + " " + boost::lexical_cast(gameID) + "!
"; else action_string = "
" + action_string + " " + boost::lexical_cast(gameID) + "!"; break; case 2: @@ -1074,7 +1074,7 @@ int guiLog::exportLog(QString fileStringPdb,int modus,int uniqueGameID_req) if(boost::lexical_cast(results.result_Action[3*action_ctr+1]) == "wins" || boost::lexical_cast(results.result_Action[3*action_ctr+1]) == "wins (side pot)") { switch(modus) { case 1: - if(!newVersion) action_string = "
" + action_string + ""; + if(!newVersion) action_string = "
" + action_string + ""; else action_string = "" + action_string + ""; break; case 3: @@ -1089,7 +1089,7 @@ int guiLog::exportLog(QString fileStringPdb,int modus,int uniqueGameID_req) if(boost::lexical_cast(results.result_Action[3*action_ctr+1]) == "has left the game" || boost::lexical_cast(results.result_Action[3*action_ctr+1]) == "was kicked from the game" || boost::lexical_cast(results.result_Action[3*action_ctr+1]) == "is game admin now" || boost::lexical_cast(results.result_Action[3*action_ctr+1]) == "has joined the game") { switch(modus) { case 1: - if(!newVersion) action_string = "" + action_string + "!"; + if(!newVersion) action_string = "" + action_string + "!"; else action_string = "" + action_string + ""; break; case 3: @@ -1104,7 +1104,7 @@ int guiLog::exportLog(QString fileStringPdb,int modus,int uniqueGameID_req) if(boost::lexical_cast(results.result_Action[3*action_ctr+1]) == "sits out") { switch(modus) { case 1: - if(!newVersion) action_string = "
" + action_string + ""; + if(!newVersion) action_string = "
" + action_string + ""; else action_string = "" + action_string + ""; break; case 3: @@ -1121,7 +1121,7 @@ int guiLog::exportLog(QString fileStringPdb,int modus,int uniqueGameID_req) // show cards if(boost::lexical_cast(results.result_Action[3*action_ctr+1]) == "shows" || boost::lexical_cast(results.result_Action[3*action_ctr+1]) == "has") { // log cards - if(!newVersion && round_ctr == GAME_STATE_POST_RIVER) log_string += " [ "; + if(!newVersion && round_ctr == GAME_STATE_POST_RIVER) log_string += " [ "; else log_string += " ["; if(modus == 1 || modus == 3) log_string += ""; @@ -1192,10 +1192,10 @@ int guiLog::exportLog(QString fileStringPdb,int modus,int uniqueGameID_req) } - if(!newVersion && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "wins" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "shows" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "has" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "sits out" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "wins (side pot)" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "wins game" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "has left the game" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "was kicked from the game" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "is game admin now" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "has joined the game") { + if(!newVersion && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "wins" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "shows" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "has" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "sits out" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "wins (side pot)" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "wins game" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "has left the game" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "was kicked from the game" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "is game admin now" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "has joined the game") { log_string += "."; } - if(newVersion && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "wins game" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "has left the game" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "was kicked from the game" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "is game admin now" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "has joined the game") + if(newVersion && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "wins game" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "has left the game" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "was kicked from the game" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "is game admin now" && boost::lexical_cast(results.result_Action[3*action_ctr+1]) != "has joined the game") log_string += "."; } diff --git a/src/gui/qt/gametable/log/guilog.h b/src/gui/qt/gametable/log/guilog.h index 6c99abeb..0bf6f79f 100644 --- a/src/gui/qt/gametable/log/guilog.h +++ b/src/gui/qt/gametable/log/guilog.h @@ -137,7 +137,7 @@ private: QTextBrowser* tb; GameTableStyleReader *myStyle; std::string mySqliteLogFileName; - bool newVersion; + bool newVersion; friend class GuiWrapper; diff --git a/src/gui/qt/logfiledialog/logfiledialog.cpp b/src/gui/qt/logfiledialog/logfiledialog.cpp index e6380be7..f83be4d5 100644 --- a/src/gui/qt/logfiledialog/logfiledialog.cpp +++ b/src/gui/qt/logfiledialog/logfiledialog.cpp @@ -180,8 +180,8 @@ void LogFileDialog::exportLogToTxt() if(selectedItem) { QFileInfo fi(selectedItem->data(0, Qt::UserRole).toString()); QFileDialog dlg(this, tr("Export PokerTH log file to plain text"), - QDir::homePath()+"/"+fi.baseName()+".txt", - tr("PokerTH plain text log (*.txt)")); + QDir::homePath()+"/"+fi.baseName()+".txt", + tr("PokerTH plain text log (*.txt)")); dlg.setFileMode(QFileDialog::AnyFile); dlg.setAcceptMode(QFileDialog::AcceptSave); #ifdef ANDROID @@ -251,8 +251,7 @@ void LogFileDialog::keyPressEvent ( QKeyEvent * event ) if(ui->treeWidget_logFiles->hasFocus()) { ui->pushButton_deleteLog->click(); } - } - else { + } else { QDialog::keyPressEvent(event); } }