summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-01-23 13:32:28 (UTC)
committer mickeyl <mickeyl>2003-01-23 13:32:28 (UTC)
commit5100d4dc5012d5ff65bf1afc814e0552fe2d98fa (patch) (side-by-side diff)
treeaf63cda30bb372a080f9533c2bf5e5e882264298
parentc50f0f454936d5552bd05e55ac6934d2e63d1743 (diff)
downloadopie-5100d4dc5012d5ff65bf1afc814e0552fe2d98fa.zip
opie-5100d4dc5012d5ff65bf1afc814e0552fe2d98fa.tar.gz
opie-5100d4dc5012d5ff65bf1afc814e0552fe2d98fa.tar.bz2
g++ 3.2 fix... repeat after me: "I won't hide method parameters"
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/chess/chess.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/noncore/games/chess/chess.cpp b/noncore/games/chess/chess.cpp
index 96a838a..29c96bb 100644
--- a/noncore/games/chess/chess.cpp
+++ b/noncore/games/chess/chess.cpp
@@ -8,32 +8,34 @@
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
// human is not offered a promotion yet
+#include <stdlib.h>
+
#include <qcanvas.h>
#include <qmainwindow.h>
#include <qlist.h>
#include <qimage.h>
#include <qpainter.h>
#include <qmessagebox.h>
#include <qregexp.h>
#include <qpe/config.h>
#include <qpe/resource.h>
#include "chess.h"
#define CHESS_DEBUG
int pieceSize = 40;
@@ -325,34 +327,34 @@ void BoardView::swapSides()
{
if (activeSide == humanSide && playingGame) {
humanSide = !humanSide;
crafty->writeToStdin("savepos\ngo\n");
} else
emitErrorMessage();
}
BoardView::BoardView(QCanvas *c, QWidget *w, const char *name)
: QCanvasView(c, w, name) {
humanSide = sideWhite;
activeSide = sideWhite;
playingGame = TRUE;
activePiece = 0;
list.setAutoDelete(TRUE);
setCanvas(new QCanvas());
- Config c("Chess", Config::User);
- c.setGroup("Theme");
- QString theme = c.readEntry("imagefile", "simple-28");
+ Config conf("Chess", Config::User);
+ conf.setGroup("Theme");
+ QString theme = conf.readEntry("imagefile", "simple-28");
setTheme(theme);
crafty = new CraftyProcess(this);
crafty->addArgument("crafty");
if (!crafty->start()) {
QMessageBox::critical(0,
tr("Could not find crafty chess engine"),
tr("Quit"));
exit(-1);
}
connect(crafty, SIGNAL(readyReadStdout()), this, SLOT(readStdout()));
connect(crafty, SIGNAL(processExited()), this, SLOT(craftyDied()));
// crafty->writeToStdin("xboard\nics\nkibitz=2\n");
newGame();
}