--- a/QTfrontend/hwform.cpp Tue Jan 10 19:53:18 2006 +0000
+++ b/QTfrontend/hwform.cpp Tue Jan 10 21:57:41 2006 +0000
@@ -115,12 +115,19 @@
cfgdir.cd(".hedgewars");
list = cfgdir.entryList(QStringList("*.cfg"));
+
+ if(list.empty()) {
+ HWTeam defaultTeam("DefaultTeam");
+ defaultTeam.SetCfgDir(cfgdir.absolutePath());
+ defaultTeam.SaveToFile();
+ list.push_back("DefaultTeam");
+ }
+
for (QStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
ui.CBTeamName->addItem((*it).replace(QRegExp("^(.*).cfg$"), "\\1"));
}
-
QFile settings(cfgdir.absolutePath() + "/options");
if (settings.open(QIODevice::ReadOnly))
{