QTfrontend/hwform.cpp
changeset 8140 a098374b847b
parent 8136 c2196b1dccb4
child 8151 25b95d6224fc
child 8157 695f1eef72c8
--- a/QTfrontend/hwform.cpp	Thu Nov 29 14:02:28 2012 +1300
+++ b/QTfrontend/hwform.cpp	Thu Nov 29 22:50:08 2012 +0400
@@ -439,23 +439,16 @@
     }
 }
 
-void HWForm::UpdateTeamsLists(const QStringList* editable_teams)
+void HWForm::UpdateTeamsLists()
 {
-    QStringList teamslist;
-    if(editable_teams)
-    {
-        teamslist =* editable_teams;
-    }
-    else
-    {
-        teamslist = config->GetTeamsList();
-    }
+    QStringList teamslist = config->GetTeamsList();
 
     if(teamslist.empty())
     {
         QString currentNickName = gameSettings->value("net/nick","").toString().toUtf8();
         QString teamName;
-        if (currentNickName == "")
+
+        if (currentNickName.isEmpty())
         {
             teamName = tr("DefaultTeam");
         }
@@ -463,6 +456,7 @@
         {
             teamName = tr("%1's Team").arg(currentNickName);
         }
+
         HWTeam defaultTeam(teamName);
         defaultTeam.saveToFile();
         teamslist.push_back(teamName);