[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdegames/kpat
From:       Inge Wallin <inge () lysator ! liu ! se>
Date:       2004-10-14 20:09:49
Message-ID: 20041014200949.231CB16D20 () office ! kde ! org
[Download RAW message or body]

CVS commit by ingwa: 

Fix bug 87451: crash in patience when selecting 'unknown' as game type

 - renumber the following patiences: Golf, Klondike (draw 3), Spider
   Easy, Spider Medium, Spider Hard.

This bug was due to the fact that Stephan Kulow wasn't thorough enough
when he disabled the Kings patience because of bug 84819.  

Well, now it seems to be really disabled.  Now all that remains is to
actually *fix* 84819. :-)

I will find out if this fix needs backporting.

CCMAIL: 84819@bugs.kde.org
CCMAIL: 87451-done@bugs.kde.org


  M +3 -0      CHANGES   1.10
  M +1 -1      golf.cpp   1.11
  M +7 -0      kings.cpp   1.12
  M +1 -1      klondike.cpp   1.47
  M +1 -0      main.cpp   1.38
  M +5 -5      pwidget.cpp   1.116
  M +3 -3      spider.cpp   1.4


--- kdegames/kpat/CHANGES  #1.9:1.10
@@ -1,4 +1,7 @@
 2004-10-14 Inge Wallin <inge@lysator.liu.se>
 
+        - fix bug 87451: crash in patience when selecting 'unknown' as game type
+        ---- CVS commit here ----
+
         - fix bug 89755: Aces up move counter doesn't work (idiot.cpp)
         - bump version to 2.2.1

--- kdegames/kpat/golf.cpp  #1.10:1.11
@@ -158,5 +158,5 @@ static class LocalDealerInfo13 : public 
 {
 public:
-    LocalDealerInfo13() : DealerInfo(I18N_NOOP("Go&lf"), 13) {}
+    LocalDealerInfo13() : DealerInfo(I18N_NOOP("Go&lf"), 12) {}
     virtual Dealer *createGame(KMainWindow *parent) { return new Golf(parent); }
 } ldi13;

--- kdegames/kpat/kings.cpp  #1.11:1.12
@@ -114,4 +114,11 @@ bool Kings::isGameLost() const {
 
 #if 0
+NOTE: When this is reenabled, renumber the following patiences back again:
+Golf
+Klondike, draw 3
+Spider Easy
+Spider Medium
+Spider Hard
+
 static class LocalDealerInfo12 : public DealerInfo
 {

--- kdegames/kpat/klondike.cpp  #1.46:1.47
@@ -489,5 +489,5 @@ static class LocalDealerInfo14 : public 
 {
 public:
-    LocalDealerInfo14() : DealerInfo(I18N_NOOP("Klondike (&draw 3)"), 14) {}
+    LocalDealerInfo14() : DealerInfo(I18N_NOOP("Klondike (&draw 3)"), 13) {}
     virtual Dealer *createGame(KMainWindow *parent) { return new Klondike(false, parent); }
 } ldi14;

--- kdegames/kpat/main.cpp  #1.37:1.38
@@ -52,4 +52,5 @@ int main( int argc, char **argv )
     aboutData.addAuthor("Josh Metzler", I18N_NOOP("Spider Implementation"), "joshdeb@metzlers.org");
     aboutData.addAuthor("Maren Pakura", I18N_NOOP("Documentation"), "maren@kde.org");
+    aboutData.addAuthor("Inge Wallin", I18N_NOOP("Bug fixes"), "inge@lysator.liu.se");
 
     KCmdLineArgs::init( argc, argv, &aboutData );

--- kdegames/kpat/pwidget.cpp  #1.115:1.116
@@ -330,4 +330,9 @@ void pWidget::newGameType()
     }
 
+    if (!dill) {
+        kdError() << "unimplemented game type " << id << endl;
+        dill = DealerInfoList::self()->games().first()->createGame(this);
+    }
+
     connect(dill, SIGNAL(undoPossible(bool)), SLOT(undoPossible(bool)));
     connect(dill, SIGNAL(gameWon(bool)), SLOT(gameWon(bool)));
@@ -340,9 +345,4 @@ void pWidget::newGameType()
     dill->takeState();
 
-    if (!dill) {
-        kdError() << "unimplemented game type " << id << endl;
-        dill = DealerInfoList::self()->games().first()->createGame(this);
-    }
-
     dill->resetMoves();
 

--- kdegames/kpat/spider.cpp  #1.3:1.4
@@ -459,5 +459,5 @@ static class LocalDealerInfo15 : public 
 {
 public:
-    LocalDealerInfo15() : DealerInfo(I18N_NOOP("S&pider (Easy)"), 15) {}
+    LocalDealerInfo15() : DealerInfo(I18N_NOOP("S&pider (Easy)"), 14) {}
     virtual Dealer *createGame(KMainWindow *parent) { return new Spider(1, parent); }
 } ldi15;
@@ -466,5 +466,5 @@ static class LocalDealerInfo16 : public 
 {
 public:
-    LocalDealerInfo16() : DealerInfo(I18N_NOOP("Spider (&Medium)"), 16) {}
+    LocalDealerInfo16() : DealerInfo(I18N_NOOP("Spider (&Medium)"), 15) {}
     virtual Dealer *createGame(KMainWindow *parent) { return new Spider(2, parent); }
 } ldi16;
@@ -473,5 +473,5 @@ static class LocalDealerInfo17 : public 
 {
 public:
-    LocalDealerInfo17() : DealerInfo(I18N_NOOP("Spider (&Hard)"), 17) {}
+    LocalDealerInfo17() : DealerInfo(I18N_NOOP("Spider (&Hard)"), 16) {}
     virtual Dealer *createGame(KMainWindow *parent) { return new Spider(4, parent); }
 } ldi17;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic