[Kde-games-devel] KDE/kdegames/libkdegames/highscore
Nicolas Roffet
nicolas-kde at roffet.com
Fri Aug 17 00:40:25 CEST 2007
SVN commit 700979 by roffet:
Fixed a bug in the highscore dialog.
If you opened it with some tabs and then closed it and played a game of a group that was NOT one of these tabs, if you won, the the dialog and the game crashed... -> not nice.
However, I discovered other serious bugs in this dialog like:
- wrong tag displayed ( -> not the one where you have to type your name!...)
- click on "Close" before "Enter" do not save the highscore
And I'm not writing about the wanted improvements... -> A lot of work for KDE 4.1! ,o)
CCMAIL:kde-games-devel at kde.org
M +7 -2 kscoredialog.cpp
--- trunk/KDE/kdegames/libkdegames/highscore/kscoredialog.cpp #700978:700979
@@ -83,6 +83,7 @@
void saveScores();
void setupDialog();
+ void setupGroup(QString& groupName);
void aboutToShow();
};
@@ -172,7 +173,11 @@
tabWidget->clear();
foreach(QString groupName, scores.keys())
- {
+ setupGroup(groupName);
+}
+
+void KScoreDialog::KScoreDialogPrivate::setupGroup(QString& groupName)
+{
if(groupName.isEmpty()) //If the group doesn't have a name, use a default.
tabWidget->addTab(new QWidget(q), i18n(DEFAULT_GROUP_NAME));
else
@@ -240,7 +245,6 @@
}
}
}
- }
}
void KScoreDialog::KScoreDialogPrivate::aboutToShow()
@@ -355,6 +359,7 @@
{
kDebug(11002) << "The current high score group \"" << configGroup << "\" isn't in the list, adding it";
groupList << configGroup;
+ setupGroup(configGroup);
}
foreach(QString groupName, groupList)
More information about the kde-games-devel
mailing list