diff options
Diffstat (limited to 'kpat/dealer.cpp')
-rw-r--r-- | kpat/dealer.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/kpat/dealer.cpp b/kpat/dealer.cpp index d49c3f15..dbd27787 100644 --- a/kpat/dealer.cpp +++ b/kpat/dealer.cpp @@ -1160,14 +1160,14 @@ void Dealer::won() { // wrap in own scope to make KConfigGroupSave work KConfig *config = kapp->config(); KConfigGroupSaver kcs(config, scores_group); - unsigned int n = config->readUnsignedNumEntry(TQString("won%1").tqarg(_id),0) + 1; - config->writeEntry(TQString("won%1").tqarg(_id),n); - n = config->readUnsignedNumEntry(TQString("winstreak%1").tqarg(_id),0) + 1; - config->writeEntry(TQString("winstreak%1").tqarg(_id),n); - unsigned int m = config->readUnsignedNumEntry(TQString("maxwinstreak%1").tqarg(_id),0); + unsigned int n = config->readUnsignedNumEntry(TQString("won%1").arg(_id),0) + 1; + config->writeEntry(TQString("won%1").arg(_id),n); + n = config->readUnsignedNumEntry(TQString("winstreak%1").arg(_id),0) + 1; + config->writeEntry(TQString("winstreak%1").arg(_id),n); + unsigned int m = config->readUnsignedNumEntry(TQString("maxwinstreak%1").arg(_id),0); if (n>m) - config->writeEntry(TQString("maxwinstreak%1").tqarg(_id),n); - config->writeEntry(TQString("loosestreak%1").tqarg(_id),0); + config->writeEntry(TQString("maxwinstreak%1").arg(_id),n); + config->writeEntry(TQString("loosestreak%1").arg(_id),0); } // sort cards by increasing z @@ -1430,9 +1430,9 @@ void Dealer::countGame() kdDebug(11111) << "counting game as played." << endl; KConfig *config = kapp->config(); KConfigGroupSaver kcs(config, scores_group); - unsigned int Total = config->readUnsignedNumEntry(TQString("total%1").tqarg(_id),0); + unsigned int Total = config->readUnsignedNumEntry(TQString("total%1").arg(_id),0); ++Total; - config->writeEntry(TQString("total%1").tqarg(_id),Total); + config->writeEntry(TQString("total%1").arg(_id),Total); _gameRecorded = true; } } @@ -1443,12 +1443,12 @@ void Dealer::countLoss() // update score KConfig *config = kapp->config(); KConfigGroupSaver kcs(config, scores_group); - unsigned int n = config->readUnsignedNumEntry(TQString("loosestreak%1").tqarg(_id),0) + 1; - config->writeEntry(TQString("loosestreak%1").tqarg(_id),n); - unsigned int m = config->readUnsignedNumEntry(TQString("maxloosestreak%1").tqarg(_id),0); + unsigned int n = config->readUnsignedNumEntry(TQString("loosestreak%1").arg(_id),0) + 1; + config->writeEntry(TQString("loosestreak%1").arg(_id),n); + unsigned int m = config->readUnsignedNumEntry(TQString("maxloosestreak%1").arg(_id),0); if (n>m) - config->writeEntry(TQString("maxloosestreak%1").tqarg(_id),n); - config->writeEntry(TQString("winstreak%1").tqarg(_id),0); + config->writeEntry(TQString("maxloosestreak%1").arg(_id),n); + config->writeEntry(TQString("winstreak%1").arg(_id),0); } } |