QTfrontend/gameuiconfig.cpp
changeset 140 50ccde437ea1
parent 127 ca70467bd0a8
child 183 57c2ef19f719
--- a/QTfrontend/gameuiconfig.cpp	Sun Sep 03 18:01:34 2006 +0000
+++ b/QTfrontend/gameuiconfig.cpp	Sat Sep 09 16:59:10 2006 +0000
@@ -94,7 +94,13 @@
 
 QStringList GameUIConfig::GetTeamsList()
 {
-	return cfgdir->entryList(QStringList("*.cfg"));
+	QStringList teamslist = cfgdir->entryList(QStringList("*.cfg"));
+	QStringList cleanedList;
+	for (QStringList::Iterator it = teamslist.begin(); it != teamslist.end(); ++it ) {
+	  QString tmpTeamStr=(*it).replace(QRegExp("^(.*).cfg$"), "\\1");
+	  cleanedList.push_back(tmpTeamStr);
+	}
+	return cleanedList;
 }
 
 void GameUIConfig::SaveOptions()