equal
deleted
inserted
replaced
320 void SelWeaponWidget::copy() |
320 void SelWeaponWidget::copy() |
321 { |
321 { |
322 if(wconf->contains(curWeaponsName)) |
322 if(wconf->contains(curWeaponsName)) |
323 { |
323 { |
324 QString ammo = getWeaponsString(curWeaponsName); |
324 QString ammo = getWeaponsString(curWeaponsName); |
325 QString newName = tr("copy of") + " " + curWeaponsName; |
325 QString newName = tr("copy of %1").arg(curWeaponsName); |
326 if(wconf->contains(newName)) |
326 if(wconf->contains(newName)) |
327 { |
327 { |
328 //name already used -> look for an appropriate name: |
328 //name already used -> look for an appropriate name: |
329 int i=2; |
329 int i=2; |
330 while(wconf->contains(newName = tr("copy of") + " " + curWeaponsName+QString::number(i++))) ; |
330 while(wconf->contains(newName = tr("copy of %1").arg(curWeaponsName+QString::number(i++)))); |
331 } |
331 } |
332 setWeaponsName(newName); |
332 setWeaponsName(newName); |
333 setWeapons(ammo); |
333 setWeapons(ammo); |
334 } |
334 } |
335 } |
335 } |