Running astyle.
This commit is contained in:
@@ -79,8 +79,7 @@ aboutPokerthImpl::aboutPokerthImpl(QWidget *parent, ConfigFile *c)
|
||||
int api = -2;
|
||||
if (currVM->AttachCurrentThread(&env, NULL)<0) {
|
||||
qCritical()<<"AttachCurrentThread failed";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
jclass jclassApplicationClass = env->FindClass("android/os/Build$VERSION");
|
||||
if (jclassApplicationClass) {
|
||||
api = env->GetStaticIntField(jclassApplicationClass, env->GetStaticFieldID(jclassApplicationClass,"SDK_INT", "I"));
|
||||
|
||||
@@ -119,12 +119,10 @@ bool changeCompleteBlindsDialogImpl::eventFilter(QObject *obj, QEvent *event)
|
||||
}
|
||||
event->ignore();
|
||||
return false;
|
||||
}
|
||||
else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
||||
} else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
||||
this->reject();
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// pass the event on to the parent class
|
||||
return QDialog::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
@@ -123,12 +123,10 @@ bool changeContentDialogImpl::eventFilter(QObject *obj, QEvent *event)
|
||||
}
|
||||
event->ignore();
|
||||
return false;
|
||||
}
|
||||
else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
||||
} else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
||||
this->reject();
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// pass the event on to the parent class
|
||||
return QDialog::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
@@ -315,7 +315,8 @@ unsigned ChatTools::parsePrivateMessageTarget(QString &chatText)
|
||||
return playerId;
|
||||
}
|
||||
|
||||
QString ChatTools::checkForEmotes(QString msg) {
|
||||
QString ChatTools::checkForEmotes(QString msg)
|
||||
{
|
||||
|
||||
msg.replace("0:-)", "<img src=\":emotes/emotes/face-angel.png\" />");
|
||||
msg.replace("X-(", "<img src=\":emotes/emotes/face-angry.png\" />");
|
||||
|
||||
@@ -260,12 +260,10 @@ bool createInternetGameDialogImpl::eventFilter(QObject *obj, QEvent *event)
|
||||
}
|
||||
event->ignore();
|
||||
return false;
|
||||
}
|
||||
else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
||||
} else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
||||
this->reject();
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// pass the event on to the parent class
|
||||
return QDialog::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
@@ -151,12 +151,10 @@ bool createNetworkGameDialogImpl::eventFilter(QObject *obj, QEvent *event)
|
||||
}
|
||||
event->ignore();
|
||||
return false;
|
||||
}
|
||||
else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
||||
} else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
||||
this->reject();
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// pass the event on to the parent class
|
||||
return QDialog::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
@@ -3744,14 +3744,12 @@ void gameTableImpl::changeSpinBoxBetValue(int value)
|
||||
if(betSliderChangedByInput) {
|
||||
//prevent interval cutting of spinBox_betValue input from code below
|
||||
betSliderChangedByInput = FALSE;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
if(horizontalSlider_bet->value() == horizontalSlider_bet->maximum()) {
|
||||
|
||||
spinBox_betValue->setValue(horizontalSlider_bet->value());
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
int temp;
|
||||
if(horizontalSlider_bet->maximum() <= 1000 ) {
|
||||
@@ -4390,7 +4388,8 @@ void gameTableImpl::tabsButtonClose()
|
||||
#endif
|
||||
|
||||
|
||||
void gameTableImpl::checkActionLabelPosition() {
|
||||
void gameTableImpl::checkActionLabelPosition()
|
||||
{
|
||||
#ifndef GUI_800x480
|
||||
int i;
|
||||
if(myCardDeckStyle->getBigIndexesActionBottom() == "1") {
|
||||
@@ -4399,22 +4398,19 @@ void gameTableImpl::checkActionLabelPosition() {
|
||||
if(actionLabelArray[i]->y() == 56) {
|
||||
actionLabelArray[i]->move(actionLabelArray[i]->x(), 80);
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if(actionLabelArray[i]->y() == 43) {
|
||||
actionLabelArray[i]->move(actionLabelArray[i]->x(), 67);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
||||
if(i>=3 && i<=7) {
|
||||
if(actionLabelArray[i]->y() == 80) {
|
||||
actionLabelArray[i]->move(actionLabelArray[i]->x(), 56);
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if(actionLabelArray[i]->y() == 67) {
|
||||
actionLabelArray[i]->move(actionLabelArray[i]->x(), 43);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,9 @@ public slots:
|
||||
void regUserToggled(bool);
|
||||
void guestUserToggled(bool);
|
||||
void okButtonCheck();
|
||||
void clickLoginButton() { pushButton_login->click(); }
|
||||
void clickLoginButton() {
|
||||
pushButton_login->click();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
|
||||
class UploaderThread;
|
||||
|
||||
namespace Ui {
|
||||
namespace Ui
|
||||
{
|
||||
class LogFileDialog;
|
||||
}
|
||||
|
||||
@@ -44,7 +45,9 @@ public:
|
||||
explicit LogFileDialog(QWidget *parent = 0, ConfigFile *c = 0);
|
||||
~LogFileDialog();
|
||||
|
||||
void setGuiLog(guiLog *g) { myGuiLog = g; }
|
||||
void setGuiLog(guiLog *g) {
|
||||
myGuiLog = g;
|
||||
}
|
||||
void exec();
|
||||
|
||||
virtual void UploadCompleted(const std::string &filename, const std::string &returnMessage);
|
||||
@@ -60,8 +63,12 @@ public slots:
|
||||
void exportLogToHtml();
|
||||
void exportLogToTxt();
|
||||
void saveLogFileAs();
|
||||
void showLogFilePreviewInit() {showLogFilePreview(INIT_VIEW); }
|
||||
void showLogFilePreviewSelected() {showLogFilePreview(SELECTED_GAME); }
|
||||
void showLogFilePreviewInit() {
|
||||
showLogFilePreview(INIT_VIEW);
|
||||
}
|
||||
void showLogFilePreviewSelected() {
|
||||
showLogFilePreview(SELECTED_GAME);
|
||||
}
|
||||
void showLogFilePreview(ShowLogMode);
|
||||
void keyPressEvent ( QKeyEvent * event );
|
||||
void uploadFile();
|
||||
|
||||
@@ -100,12 +100,10 @@ bool newGameDialogImpl::eventFilter(QObject *obj, QEvent *event)
|
||||
}
|
||||
event->ignore();
|
||||
return false;
|
||||
}
|
||||
else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
||||
} else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
||||
this->reject();
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// pass the event on to the parent class
|
||||
return QDialog::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
@@ -166,7 +166,8 @@ void AndroidAudio::startSoundPlayer()
|
||||
// qDebug() << "Created Buffer Player";
|
||||
}
|
||||
|
||||
void AndroidAudio::playSound(const std::string& name, int i) {
|
||||
void AndroidAudio::playSound(const std::string& name, int i)
|
||||
{
|
||||
|
||||
if(audioEnabled && myConfig->readConfigInt("PlaySoundEffects")) {
|
||||
|
||||
|
||||
@@ -52,8 +52,7 @@ void SDLPlayer::initAudio()
|
||||
if( Mix_OpenAudio(audio_rate, audio_format, audio_channels, audio_buffers) == 0) {
|
||||
Mix_QuerySpec(&audio_rate, &audio_format, &audio_channels);
|
||||
audioEnabled = 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
qDebug() << "Mix_OpenAudio() was not successfull, no sound possible :(";
|
||||
}
|
||||
}
|
||||
@@ -134,7 +133,8 @@ void SDLPlayer::playSound(string audioString, int playerID)
|
||||
}
|
||||
|
||||
void SDLPlayer::closeAudio()
|
||||
{ if(audioEnabled) {
|
||||
{
|
||||
if(audioEnabled) {
|
||||
Mix_HaltChannel(currentChannel);
|
||||
Mix_FreeChunk(sound);
|
||||
sound = NULL;
|
||||
|
||||
@@ -88,14 +88,12 @@ startWindowImpl::startWindowImpl(ConfigFile *c, Log *l)
|
||||
QFile customStartWindowBgFile(customStartWindowBgFileString);
|
||||
if(customStartWindowBgFile.exists()) {
|
||||
centralwidget->setStyleSheet(".QWidget { background-image: url("+QFileInfo(customStartWindowBgFile).absoluteFilePath()+"); background-position: bottom center; background-origin: content; background-repeat: no-repeat;}");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
QPixmap pix(":/android/android-data/gfx/gui/misc/startwindowbg_800x480.png");
|
||||
pix = pix.scaled(screenWidth, screenHeight, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||
if(pix.save(customStartWindowBgFileString)) {
|
||||
centralwidget->setStyleSheet(".QWidget { background-image: url("+QFileInfo(customStartWindowBgFile).absoluteFilePath()+"); background-position: bottom center; background-origin: content; background-repeat: no-repeat;}");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
centralwidget->setStyleSheet(".QWidget { background-image: url(:/android/android-data/gfx/gui/misc/startwindowbg_800x480.png); background-position: bottom center; background-origin: content; background-repeat: no-repeat;}");
|
||||
}
|
||||
|
||||
|
||||
@@ -138,8 +138,7 @@ void CardDeckStyleReader::readStyleFile(QString file)
|
||||
// set loadedSuccessfull TRUE if everything works
|
||||
if(leftItems.isEmpty() && cardsLeft.isEmpty() && PokerTHStyleFileVersion != "" && PokerTHStyleFileVersion.toInt() == POKERTH_CD_STYLE_FILE_VERSION) {
|
||||
myState = CD_STYLE_OK;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
//check for style file version
|
||||
if(PokerTHStyleFileVersion != "" && PokerTHStyleFileVersion.toInt() != POKERTH_CD_STYLE_FILE_VERSION) {
|
||||
myState = CD_STYLE_OUTDATED;
|
||||
@@ -153,8 +152,7 @@ void CardDeckStyleReader::readStyleFile(QString file)
|
||||
}
|
||||
loadedSuccessfull = 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
loadedSuccessfull = 0;
|
||||
MyMessageBox::warning(myW, tr("Card Deck Style Error"),
|
||||
tr("Cannot load card deck style file: %1 \n\nPlease check the style file or choose another style!").arg(currentFileName),
|
||||
|
||||
@@ -1253,8 +1253,7 @@ void GameTableStyleReader::readStyleFile(QString file)
|
||||
}
|
||||
loadedSuccessfull = 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
loadedSuccessfull = 0;
|
||||
MyMessageBox::warning(myW, tr("Game Table Style Error"),
|
||||
tr("Cannot load game table style file: %1 \n\nPlease check the style file or choose another style!").arg(currentFileName),
|
||||
|
||||
@@ -1393,8 +1393,7 @@ void
|
||||
ClientStateWaitStart::InternalHandlePacket(boost::shared_ptr<ClientThread> client, boost::shared_ptr<NetPacket> tmpPacket)
|
||||
{
|
||||
if (tmpPacket->GetMsg()->messagetype() == PokerTHMessage::Type_GameStartInitialMessage
|
||||
|| tmpPacket->GetMsg()->messagetype() == PokerTHMessage::Type_GameStartRejoinMessage)
|
||||
{
|
||||
|| tmpPacket->GetMsg()->messagetype() == PokerTHMessage::Type_GameStartRejoinMessage) {
|
||||
PlayerIdList tmpPlayerList;
|
||||
unsigned tmpHandId = 0;
|
||||
|
||||
|
||||
@@ -85,8 +85,7 @@ ReceiveBuffer::ScanPackets()
|
||||
uint32_t nativeVal;
|
||||
memcpy(&nativeVal, &recvBuf[0], sizeof(uint32_t));
|
||||
size_t packetSize = ntohl(nativeVal);
|
||||
if (recvBufUsed >= packetSize + NET_HEADER_SIZE)
|
||||
{
|
||||
if (recvBufUsed >= packetSize + NET_HEADER_SIZE) {
|
||||
try {
|
||||
tmpPacket = NetPacket::Create(&recvBuf[NET_HEADER_SIZE], packetSize);
|
||||
if (tmpPacket) {
|
||||
|
||||
Reference in New Issue
Block a user