QTfrontend/gameuiconfig.cpp
changeset 140 50ccde437ea1
parent 127 ca70467bd0a8
child 183 57c2ef19f719
equal deleted inserted replaced
139:340ded7cc336 140:50ccde437ea1
    92 	}
    92 	}
    93 }
    93 }
    94 
    94 
    95 QStringList GameUIConfig::GetTeamsList()
    95 QStringList GameUIConfig::GetTeamsList()
    96 {
    96 {
    97 	return cfgdir->entryList(QStringList("*.cfg"));
    97 	QStringList teamslist = cfgdir->entryList(QStringList("*.cfg"));
       
    98 	QStringList cleanedList;
       
    99 	for (QStringList::Iterator it = teamslist.begin(); it != teamslist.end(); ++it ) {
       
   100 	  QString tmpTeamStr=(*it).replace(QRegExp("^(.*).cfg$"), "\\1");
       
   101 	  cleanedList.push_back(tmpTeamStr);
       
   102 	}
       
   103 	return cleanedList;
    98 }
   104 }
    99 
   105 
   100 void GameUIConfig::SaveOptions()
   106 void GameUIConfig::SaveOptions()
   101 {
   107 {
   102 	QFile settings(cfgdir->absolutePath() + "/options");
   108 	QFile settings(cfgdir->absolutePath() + "/options");