Update of /home/kde/kdegames/atlantik/libatlantikui
In directory office:/tmp/cvs-serv13591/libatlantikui
Modified Files:
Tag: KDE_3_1_BRANCH
board.cpp board.h estateview.cpp portfolioview.h
Log Message:
backport of various fixes
Index: board.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikui/board.cpp,v
retrieving revision 1.96.6.8
retrieving revision 1.96.6.9
diff -u -d -r1.96.6.8 -r1.96.6.9
--- board.cpp 22 Jun 2003 00:08:06 -0000 1.96.6.8
+++ board.cpp 23 Jun 2003 02:54:54 -0000 1.96.6.9
@@ -1,4 +1,4 @@
-// Copyright (c) 2002 Rob Kaper <[email protected]>
+// Copyright (c) 2002-2003 Rob Kaper <[email protected]>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@ -80,6 +80,15 @@
AtlantikBoard::~AtlantikBoard()
{
+ reset();
+}
+
+void AtlantikBoard::reset()
+{
+ m_tokens.clear();
+ m_estateViews.clear();
+ m_displayQueue.clear();
+ m_lastServerDisplay = 0;
}
void AtlantikBoard::setViewProperties(bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects, bool animateTokens)
@@ -105,7 +114,7 @@
for (QPtrListIterator<EstateView> i(m_estateViews); *i; ++i)
{
estateView = dynamic_cast<EstateView*>(*i);
- if (estateView->estate() == estate)
+ if (estateView && estateView->estate() == estate)
return estateView;
}
return 0;
Index: board.h
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikui/board.h,v
retrieving revision 1.59.6.3
retrieving revision 1.59.6.4
diff -u -d -r1.59.6.3 -r1.59.6.4
--- board.h 9 Jun 2003 19:12:22 -0000 1.59.6.3
+++ board.h 23 Jun 2003 02:54:54 -0000 1.59.6.4
@@ -1,4 +1,4 @@
-// Copyright (c) 2002 Rob Kaper <[email protected]>
+// Copyright (c) 2002-2003 Rob Kaper <[email protected]>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@ -41,6 +41,7 @@
AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, DisplayMode mode, QWidget *parent, const char *name=0);
~AtlantikBoard();
+ void reset();
void setViewProperties(bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects, bool animateTokens);
int heightForWidth(int);
@@ -57,10 +58,10 @@
public slots:
void slotMoveToken();
void slotResizeAftermath();
+ void displayDefault();
private slots:
void playerChanged(Player *player);
- void displayDefault();
void displayButton(QString command, QString caption, bool enabled);
void prependEstateDetails(Estate *);
void insertDetails(QString text, bool clearText, bool clearButtons, Estate *estate = 0);
Index: estateview.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikui/estateview.cpp,v
retrieving revision 1.70.4.1
retrieving revision 1.70.4.2
diff -u -d -r1.70.4.1 -r1.70.4.2
--- estateview.cpp 22 Jun 2003 02:51:08 -0000 1.70.4.1
+++ estateview.cpp 23 Jun 2003 02:54:54 -0000 1.70.4.2
@@ -1,4 +1,4 @@
-// Copyright (c) 2002 Rob Kaper <[email protected]>
+// Copyright (c) 2002-2003 Rob Kaper <[email protected]>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@ -441,7 +441,10 @@
rmbMenu->insertItem(i18n("Request Trade with %1").arg(player->name()), 3);
}
- connect(dynamic_cast<KPopupMenu *>(rmbMenu), SIGNAL(activated(int)), this, SLOT(slotMenuAction(int)));
+ KPopupMenu *pm = dynamic_cast<KPopupMenu *>(rmbMenu);
+ if (pm) {
+ connect(pm, SIGNAL(activated(int)), this, SLOT(slotMenuAction(int)));
+ }
QPoint g = QCursor::pos();
rmbMenu->exec(g);
delete rmbMenu;
Index: portfolioview.h
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikui/portfolioview.h,v
retrieving revision 1.23.6.1
retrieving revision 1.23.6.2
diff -u -d -r1.23.6.1 -r1.23.6.2
--- portfolioview.h 21 Jan 2003 00:58:12 -0000 1.23.6.1
+++ portfolioview.h 23 Jun 2003 02:54:54 -0000 1.23.6.2
@@ -1,4 +1,4 @@
-// Copyright (c) 2002 Rob Kaper <[email protected]>
+// Copyright (c) 2002-2003 Rob Kaper <[email protected]>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@ -61,8 +61,6 @@
QPixmap *qpixmap;
bool b_recreate;
QMap<int, PortfolioEstate*> portfolioEstateMap;
- int x, y;
- QString m_lastGroup;
};
#endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.