Using QString now,
fileinfo works now
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user