Using QString now,

fileinfo works now
This commit is contained in:
Anakin
2017-01-07 15:59:16 +01:00
parent 8c2ca44f20
commit f5ee8a973d
10 changed files with 157 additions and 129 deletions

View File

@@ -8,7 +8,7 @@
/////////////////////////////////////////////////////////////////////////
// public constructor/destructor
MshFile::MshFile(const char * path, QObject * parent)
MshFile::MshFile(QString path, QObject * parent)
: FileInterface(path, parent)
{
import();
@@ -497,21 +497,13 @@ void MshFile::analyseClthChunks(Model * dataDestination, std::list<ChunkHeader*>
// search if it is already known
bool tmp_found(false);
for (unsigned int i = 0; i < m_textureNames->size(); i++)
{
if (!strcmp(buffer, m_textureNames->at(i).c_str()))
{
// if found, save the index and stop searching
new_segment->textureIndex = i;
tmp_found = true;
break;
}
}
// if it was not found add the texturename to the list
if (!tmp_found)
int index = m_textureNames->indexOf(QString::fromStdString(buffer));
if (index != -1)
new_segment->textureIndex = index;
else
{
m_textureNames->push_back(std::string(buffer));
m_textureNames->push_back(QString::fromStdString(buffer));
new_segment->textureIndex = m_textureNames->size() - 1;
}