equal
deleted
inserted
replaced
219 |
219 |
220 void HWTeam::setName(const QString & name) |
220 void HWTeam::setName(const QString & name) |
221 { |
221 { |
222 free(m_team->name); |
222 free(m_team->name); |
223 |
223 |
224 m_team->name = qstrdup(name.toUtf8().constData()); |
224 m_team->name = strdup(name.toUtf8().constData()); |
225 } |
225 } |
226 |
226 |
227 QString HWTeam::hedgehogName(int index) const |
227 QString HWTeam::hedgehogName(int index) const |
228 { |
228 { |
229 return QString::fromUtf8(m_team->hogs[index].name); |
229 return QString::fromUtf8(m_team->hogs[index].name); |
236 |
236 |
237 void HWTeam::setHedgehogName(int index, const QString & name) |
237 void HWTeam::setHedgehogName(int index, const QString & name) |
238 { |
238 { |
239 free(m_team->hogs[index].name); |
239 free(m_team->hogs[index].name); |
240 |
240 |
241 m_team->hogs[index].name = qstrdup(name.toUtf8().constData()); |
241 m_team->hogs[index].name = strdup(name.toUtf8().constData()); |
242 } |
242 } |
243 |
243 |
244 void HWTeam::setHedgehogHat(int index, const QString & hat) |
244 void HWTeam::setHedgehogHat(int index, const QString & hat) |
245 { |
245 { |
246 free(m_team->hogs[index].hat); |
246 free(m_team->hogs[index].hat); |
247 |
247 |
248 m_team->hogs[index].hat = qstrdup(hat.toUtf8().constData()); |
248 m_team->hogs[index].hat = strdup(hat.toUtf8().constData()); |
249 } |
249 } |
250 |
250 |
251 |
251 |
252 // owner |
252 // owner |
253 QString HWTeam::owner() const |
253 QString HWTeam::owner() const |
294 |
294 |
295 void HWTeam::bindKey(unsigned int idx, const QString & key) |
295 void HWTeam::bindKey(unsigned int idx, const QString & key) |
296 { |
296 { |
297 free(m_team->bindings[idx].binding); |
297 free(m_team->bindings[idx].binding); |
298 |
298 |
299 m_team->bindings[idx].binding = qstrdup(key.toUtf8().constData()); |
299 m_team->bindings[idx].binding = strdup(key.toUtf8().constData()); |
300 } |
300 } |
301 |
301 |
302 // flag |
302 // flag |
303 void HWTeam::setFlag(const QString & flag) |
303 void HWTeam::setFlag(const QString & flag) |
304 { |
304 { |
379 m_team->wins++; |
379 m_team->wins++; |
380 } |
380 } |
381 |
381 |
382 flib_team * HWTeam::toFlibTeam() |
382 flib_team * HWTeam::toFlibTeam() |
383 { |
383 { |
384 return m_team; |
384 return flib_team_copy(m_team); |
385 } |
385 } |