QTfrontend/selectWeapon.cpp
changeset 1967 213d368a002f
parent 1904 20348675b015
child 2369 c3eb11f1ab3a
equal deleted inserted replaced
1966:31e449e1d9dd 1967:213d368a002f
    73   QFrame(parent),
    73   QFrame(parent),
    74   m_numItems(numItems)
    74   m_numItems(numItems)
    75 {
    75 {
    76 	wconf = new QSettings(cfgdir->absolutePath() + "/weapons.ini", QSettings::IniFormat, this);
    76 	wconf = new QSettings(cfgdir->absolutePath() + "/weapons.ini", QSettings::IniFormat, this);
    77 
    77 
    78 	wconf->setValue("Default", *cDefaultAmmoStore);
    78 	for(int i = 0; i < cDefaultAmmos.size(); ++i)
       
    79 		wconf->setValue(cDefaultAmmos[i].first, cDefaultAmmos[i].second);
    79 
    80 
    80 	QStringList keys = wconf->allKeys();
    81 	QStringList keys = wconf->allKeys();
    81 	for(int i = 0; i < keys.size(); i++)
    82 	for(int i = 0; i < keys.size(); i++)
    82 	{
    83 	{
    83 		if (wconf->value(keys[i]).toString().size() != cDefaultAmmoStore->size())
    84 		if (wconf->value(keys[i]).toString().size() != cDefaultAmmoStore->size())