QString aName;
const string tmp (theUnits.size(),' ');
if (theUnits == "" || theUnits == tmp)
- aName.sprintf("%s, -",theName.c_str());
+ aName = QString("%1, -").arg(theName.c_str());
else
- aName.sprintf("%s, %s",theName.c_str(),theUnits.c_str());
+ aName = QString("%1, %2").arg(theName.c_str()).arg(theUnits.c_str());
aName = aName.simplifyWhiteSpace();
return aName.latin1();
}
const TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap;
if(aMeshOnEntityMap.empty())
continue;
- aComment.sprintf("myComment=MESH;myName=%s;myDim=%d",
- aMeshName.c_str(),
- aMesh->myDim);
+ aComment = QString("myComment=MESH;myName=%1;myDim=%2");
+ aComment = aComment.arg(aMeshName.c_str());
+ aComment = aComment.arg(aMesh->myDim);
aMesh->myEntry =
CreateAttributes(theStudy,
theResultEntry,
aComment.latin1(),
true);
- aComment.sprintf("myComment=FAMILIES;myMeshName=%s",
- aMeshName.c_str());
+ aComment = QString("myComment=FAMILIES;myMeshName=%1").arg(aMeshName.c_str());
std::string aSubMeshesEntry =
CreateAttributes(theStudy,
aMesh->myEntry,
continue;
}
- aComment.sprintf("myComment=ENTITY;myMeshName=%s;myId=%d",
- aMeshName.c_str(),
- anEntity);
+ aComment = QString("myComment=ENTITY;myMeshName=%1;myId=%2");
+ aComment = aComment.arg(aMeshName.c_str());
+ aComment = aComment.arg(anEntity);
aMeshOnEntity->myEntry =
CreateAttributes(theStudy,
for(; aFamilyMapIter != aFamilyMap.end(); aFamilyMapIter++){
const string& aFamilyName = aFamilyMapIter->first;
const PFamily& aFamily = aFamilyMapIter->second;
- aComment.sprintf("myComment=FAMILY;myMeshName=%s;myEntityId=%d;myName=%s",
- aMeshName.c_str(),
- anEntity,
- aFamilyName.c_str());
-
+ aComment=QString("myComment=FAMILY;myMeshName=%1;myEntityId=%2;myName=%3");
+ aComment=aComment.arg(aMeshName.c_str());
+ aComment=aComment.arg(anEntity);
+ aComment=aComment.arg(aFamilyName.c_str());
+ SCRUTE(aComment);
aFamily->myEntry =
CreateAttributes(theStudy,
aMeshOnEntity->myEntry,
//Importing groups
const TGroupMap& aGroupMap = aMesh->myGroupMap;
if(!aGroupMap.empty()){
- aComment.sprintf("myComment=GROUPS;myMeshName=%s",
- aMeshName.c_str());
+ aComment = QString("myComment=GROUPS;myMeshName=%1").arg(aMeshName.c_str());
CreateAttributes(theStudy,
aMesh->myGroupsEntry,
for(; aGroupMapIter != aGroupMap.end(); aGroupMapIter++){
const string& aGroupName = aGroupMapIter->first;
const PGroup& aGroup = aGroupMapIter->second;
- aComment.sprintf("myComment=GROUP;myMeshName=%s;myName=%s",
- aMeshName.c_str(),
- aGroupName.c_str());
+ aComment = QString("myComment=GROUP;myMeshName=%1;myName=%2").arg(aMeshName.c_str()).arg(aGroupName.c_str());
aGroup->myEntry =
CreateAttributes(theStudy,
aMesh->myGroupsEntry,
const PField& aField = aFieldMapIter->second;
const TValField& aValField = aField->myValField;
QString aFieldNameWithUnit = GenerateFieldName(aFieldName,aField->myUnitNames[0]);
- aComment.sprintf("myComment=FIELD;myMeshName=%s;myEntityId=%d;myName=%s;myNbTimeStamps=%d;myNumComponent=%d",
- aMeshName.c_str(),
- anEntity,
- aFieldName.c_str(),
- aValField.size(),
- aField->myNbComp);
+ aComment = QString("myComment=FIELD;myMeshName=%1;myEntityId=%2;myName=%3;myNbTimeStamps=%4;myNumComponent=%5");
+ aComment = aComment.arg(aMeshName.c_str());
+ aComment = aComment.arg(anEntity);
+ aComment = aComment.arg(aFieldName.c_str());
+ aComment = aComment.arg(aValField.size());
+ aComment = aComment.arg(aField->myNbComp);
aField->myEntry = CreateAttributes(theStudy,
aMesh->myFieldsEntry,
{
int aTimeStamp = aValFieldIter->first;
const PValForTime& aValForTime = aValFieldIter->second;
- aComment.sprintf("myComment=TIMESTAMP;myMeshName=%s;myEntityId=%d;myFieldName=%s;myTimeStampId=%d;myNumComponent=%d",
- aMeshName.c_str(),
- anEntity,
- aFieldName.c_str(),
- aTimeStamp,
- aField->myNbComp);
+ aComment = QString("myComment=TIMESTAMP;myMeshName=%1;myEntityId=%2;myFieldName=%3;myTimeStampId=%4;myNumComponent=%5");
+ aComment = aComment.arg(aMeshName.c_str());
+ aComment = aComment.arg(anEntity);
+ aComment = aComment.arg(aFieldName.c_str());
+ aComment = aComment.arg(aTimeStamp);
+ aComment = aComment.arg(aField->myNbComp);
string aTimeStampId = VISU_Convertor::GenerateName(aValForTime->myTime);