Wizard model name saved to current model. Diacritics filtered out.

This commit is contained in:
Kjell Kernen
2014-03-04 00:56:31 +01:00
parent 898496a85d
commit e648cb7542
+11 -1
View File
@@ -188,7 +188,17 @@ void MdiChild::wizardEdit()
WizardDialog *wizard = new WizardDialog(this);
wizard->exec();
if (wizard->mix.complete){
//TODO Save data accessible in wizard->mix.
ModelData &model = radioData.models[row - 1];
// Remove dicritics and filter off anything but chars from the new model name
QString newName(wizard->mix.name.normalized(QString::NormalizationForm_D));
newName = newName.replace(QRegExp("[^a-zA-Z\\s]"), "");
strncpy(model.name, newName.toAscii(), sizeof(model.name));
model.name[sizeof(model.name)-1]=0;
//TODO Save the rest of the wizard->mix data to model.
setModified();
}
}
}