# HG changeset patch # User displacer # Date 1136930261 0 # Node ID 1ef9546971ffc5dfd828d53aa93db6c022eed93c # Parent e297fea1a2f3546dab03056bceb7e67e84a4a04f added default team on loading diff -r e297fea1a2f3 -r 1ef9546971ff QTfrontend/hwform.cpp --- 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)) {