#include <boost/thread/thread.hpp>
#include <boost/bind.hpp>
+#include <QStringList>
+
#include <strstream>
#ifdef _DEBUG_
NO_IOR,
"Parts",
NO_PERFSITENT_REF,
- aComment.latin1(),
+ aComment.toLatin1().data(),
false);
}
MultiResult_i::TPartInfo aPartInfo = GetPartInfo(aMultiprObj, aPartName);
QFileInfo aFileInfo(aPartInfo.myFileName.c_str());
- aPartInfos[aFileInfo.fileName()] = aPartInfo;
+ aPartInfos[aFileInfo.fileName().toLatin1().data()] = aPartInfo;
aPartName2FileName[aPartInfo.myName] = aPartInfo.myFileName;
BEGMSG(MYDEBUG, "aPartName2FileName['"<<aPartInfo.myName<<"'] = '"<<aPartInfo.myFileName<<"'\n");
NO_IOR,
aPartInfo.myName,
NO_PERFSITENT_REF,
- aComment.latin1(),
+ aComment.toLatin1().data(),
true);
aPartName2Resolution[aPartInfo.myName] = aResolution;
BEGMSG(MYDEBUG, "aPartName2Resolution['"<<aPartInfo.myName<<"'] = '"<<aResoltutionsString<<"'\n");
try {
myMultiprObj.create(theFileName);
if ( myMultiprObj.isValidDistributedMEDFile() ) {
- aTargetFileName = myMultiprObj.getSequentialMEDFilename();
- SetInitFileName(aFileInfo.filePath().latin1());
- SetName(VISU::GenerateName(aFileInfo.fileName()).latin1(), false);
+ aTargetFileName = myMultiprObj.getSequentialMEDFilename().c_str();
+ SetInitFileName(aFileInfo.filePath().toLatin1().data());
+ SetName(VISU::GenerateName(aFileInfo.fileName().toLatin1().data()).toLatin1().data(), false);
myIsBuildParts = true;
}
}catch(std::exception& exc){
}
}
- return TSuperClass::Create(aTargetFileName);
+ return TSuperClass::Create(aTargetFileName.toLatin1().data());
}
BEGMSG(MYDEBUG, "aPrefix = '"<<aPrefix<<"'\n");
// To get a common prefix used in the multi file
- QFileInfo aFileInfo(myMultiprObj.getSequentialMEDFilename());
- std::string aFilePrefix = aFileInfo.baseName(TRUE).latin1();
+ QFileInfo aFileInfo(myMultiprObj.getSequentialMEDFilename().c_str());
+ std::string aFilePrefix = aFileInfo.completeBaseName().toLatin1().data();
MultiResult_i::TPartNames aPartNames = myMultiprObj.getParts();
for (size_t aPartID = 0 ; aPartID < aPartNames.size() ; aPartID++) {
MultiResult_i::TPartInfo aPartInfo = GetPartInfo(myMultiprObj, aPartName);
QFileInfo aFileInfo(aPartInfo.myFileName.c_str());
- std::string aFile = aFileInfo.absFilePath().latin1();
+ std::string aFile = aFileInfo.absoluteFilePath().toLatin1().data();
- std::string aFileName = aFileInfo.fileName().latin1();
+ std::string aFileName = aFileInfo.fileName().toLatin1().data();
VISU::TSubString(aFileName, aFilePrefix) = aPrefix;
VISU::TSubString(aFileName, aSuffix) = "";
aFileName = aFileName + aSuffix;
VISU::SplitName(GetFileName(), aBase, aSuffix);
INITMSG(MYDEBUG, "aBase = '"<<aBase<<"'; aSuffix = '"<<aSuffix<<"'\n");
- QFileInfo aFileInfo(myMultiprObj.getSequentialMEDFilename());
- std::string aFilePrefix = aFileInfo.baseName(TRUE).latin1();
+ QFileInfo aFileInfo(myMultiprObj.getSequentialMEDFilename().c_str());
+ std::string aFilePrefix = aFileInfo.completeBaseName().toLatin1().data();
BEGMSG(MYDEBUG, "aFilePrefix = '"<<aFilePrefix<<"'\n");
std::ostringstream aPartInfos;
MultiResult_i::TPartInfo aPartInfo = GetPartInfo(myMultiprObj, aPartName);
QFileInfo aFileInfo(aPartInfo.myFileName.c_str());
- std::string aFileName = aFileInfo.fileName().latin1();
+ std::string aFileName = aFileInfo.fileName().toLatin1().data();
VISU::TSubString(aFileName, aFilePrefix + "_") = "";
VISU::TSubString(aFileName, aSuffix) = "";
aPartInfo.myFileName = aFileName + aSuffix;
if(!myIsBuildParts)
return this;
- QStringList aResolutions = QStringList::split("|", VISU::Storable::FindValue(theMap, "myResolutions"));
- QStringList aPartNames = QStringList::split("|",VISU::Storable::FindValue(theMap, "myPartNames") );
+ QStringList aResolutions = VISU::Storable::FindValue(theMap, "myResolutions").split("|", QString::SkipEmptyParts);
+ QStringList aPartNames = VISU::Storable::FindValue(theMap, "myPartNames").split("|", QString::SkipEmptyParts);
for(size_t anId = 0, anEnd = aPartNames.size(); anId < anEnd; anId++){
const QString& aPartName = aPartNames[anId];
VISU::Result::Resolution aResolution = VISU::Result::Resolution(aResolutions[anId].toInt());
- myPartName2Resolution[aPartName.latin1()] = aResolution;
- INITMSG(MYDEBUG, "aPartName = '"<<aPartName<<"' = "<<aResolution<<"\n");
+ myPartName2Resolution[aPartName.toLatin1().data()] = aResolution;
+ INITMSG(MYDEBUG, "aPartName = '"<<aPartName.toLatin1().data()<<"' = "<<aResolution<<"\n");
}
std::string aBase, aSuffix;
SplitName(GetFileName(), aBase, aSuffix);
INITMSGA(MYDEBUG, 0, "aBase = '"<<aBase<<"'; aSuffix = '"<<aSuffix<<"'\n");
- std::string aSourceFileName = GetFileInfo().absFilePath().latin1();
+ std::string aSourceFileName = GetFileInfo().absoluteFilePath().toLatin1().data();
BEGMSG(MYDEBUG, "aSourceFileName = '"<<aSourceFileName<<"'\n");
std::string aPrefix = aSourceFileName;
aMultiFileStream<<"# [SOURCE]="<<aSourceFileName<<"\n";
aMultiFileStream<<"#\n";
- QStringList aPartInfos = QStringList::split("|", VISU::Storable::FindValue(theMap, "myPartInfos"));
+ QStringList aPartInfos = VISU::Storable::FindValue(theMap, "myPartInfos").split("|", QString::SkipEmptyParts);
aMultiFileStream<<aPartInfos.size()<<"\n";
for(size_t anId = 0, anEnd = aPartInfos.size(); anId < anEnd; anId++){
- MultiResult_i::TPartInfo aPartInfo = GetPartInfo(aPartInfos[anId].latin1());
+ MultiResult_i::TPartInfo aPartInfo = GetPartInfo(aPartInfos[anId].toLatin1().data());
aPartInfo.myFileName = aPrefix + "_" + aPartInfo.myFileName;
INITMSG(MYDEBUG, "aPartInfo.myFileName = '"<<aPartInfo.myFileName<<"'\n");
aMultiFileStream<<aPartInfo<<"\n";
anOutputStream<<"myComment=PART;";
anOutputStream<<"myName="<<thePartName<<";";
anOutputStream<<"myMeshName="<<theMeshName<<";";
- anOutputStream<<"myResolutions="<<aRestoringMap["myResolutions"]<<";";
+ anOutputStream<<"myResolutions="<<aRestoringMap["myResolutions"].toLatin1().data()<<";";
anOutputStream<<"myState="<<theResolution;
anOutputStream<<ends;