summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuchen Deng <loaden@gmail.com>2012-02-15 16:53:10 +1000
committerSarah Jane Smith <sarah.j.smith@nokia.com>2012-02-15 08:06:56 +0100
commitd5ee29a3dbe48c1c17fba472024be1284d0ab71e (patch)
tree4cecf838701e47ee72ba6ecfc7cc6b1f2b8901e9
parentf6d44c391d17521d95c60de16615e47f66968b62 (diff)
Build fix if use '-no-stl' configure option
error C2039: 'toStdString' : is not a member of 'QString' Also see http://codereview.qt-project.org/16366 Task-number: QTBUG-19270 Change-Id: I0ecd5574689295825436365324c4dbe81aa11667 Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
-rw-r--r--src/plugins/sceneformats/assimp/ailoaderiosystem.cpp2
-rw-r--r--src/plugins/sceneformats/assimp/qailoader.cpp16
-rw-r--r--src/plugins/sceneformats/assimp/qaimesh.cpp2
-rw-r--r--src/plugins/sceneformats/assimp/qaiscenehandler.cpp4
4 files changed, 12 insertions, 12 deletions
diff --git a/src/plugins/sceneformats/assimp/ailoaderiosystem.cpp b/src/plugins/sceneformats/assimp/ailoaderiosystem.cpp
index d89785966..f73977b37 100644
--- a/src/plugins/sceneformats/assimp/ailoaderiosystem.cpp
+++ b/src/plugins/sceneformats/assimp/ailoaderiosystem.cpp
@@ -141,7 +141,7 @@ Assimp::IOStream* AiLoaderIOSystem::Open(const char* pFile, const char* pMode)
if (!res)
{
std::string err("Error: could not open subsequent file:");
- err.append(pFile).append("--").append(f->errorString().toStdString());
+ err.append(pFile).append("--").append(qPrintable(f->errorString()));
Assimp::DefaultLogger::get()->warn(err);
delete f;
return 0;
diff --git a/src/plugins/sceneformats/assimp/qailoader.cpp b/src/plugins/sceneformats/assimp/qailoader.cpp
index 280ca1715..35e4dfb7d 100644
--- a/src/plugins/sceneformats/assimp/qailoader.cpp
+++ b/src/plugins/sceneformats/assimp/qailoader.cpp
@@ -130,7 +130,7 @@ void QAiLoader::loadMesh(aiMesh *mesh)
{
QString error = QLatin1String("Bad primitive type in mesh %1 : %2");
error = error.arg(name).arg(mesh->mPrimitiveTypes);
- Assimp::DefaultLogger::get()->warn(error.toStdString());
+ Assimp::DefaultLogger::get()->warn(error.toAscii().constData());
}
}
@@ -148,7 +148,7 @@ void QAiLoader::loadMesh(aiMesh *mesh)
"Found color information in mesh %1, channel %2"
"- per vertex color not yet supported");
error = error.arg(name).arg(i);
- Assimp::DefaultLogger::get()->warn(error.toStdString());
+ Assimp::DefaultLogger::get()->warn(error.toAscii().constData());
break;
}
}
@@ -158,14 +158,14 @@ void QAiLoader::loadMesh(aiMesh *mesh)
// TODO: Implement skeletal animation
QString error = QLatin1String("Bones in mesh %1 not yet supported");
error.arg(name);
- Assimp::DefaultLogger::get()->warn(error.toStdString());
+ Assimp::DefaultLogger::get()->warn(error.toAscii().constData());
}
if (mesh->HasTangentsAndBitangents())
{
// TODO: Implement normal maps - here and in the texture import
QString error = QLatin1String("Tangents for normal map in mesh %1 not yet supported");
error.arg(name);
- Assimp::DefaultLogger::get()->warn(error.toStdString());
+ Assimp::DefaultLogger::get()->warn(error.toAscii().constData());
}
}
}
@@ -281,7 +281,7 @@ QGLSceneNode *QAiLoader::loadMeshes()
QUrl url = m_handler->url();
message = message.arg(url.toString()).arg(m_meshes.size())
.arg(m_nodes.size()).arg(m_root->palette()->size());
- Assimp::DefaultLogger::get()->warn(message.toStdString());
+ Assimp::DefaultLogger::get()->warn(message.toAscii().constData());
}
//#define DEBUG_ME
@@ -424,7 +424,7 @@ void QAiLoader::loadTextures(aiMaterial *ma, QGLMaterial *mq)
{
QString error = QLatin1String("Unsupported texture type \"%1\" in material \"%2\".");
error = error.arg(typeNames[i]).arg(mq->objectName());
- Assimp::DefaultLogger::get()->warn(error.toStdString());
+ Assimp::DefaultLogger::get()->warn(error.toAscii().constData());
}
}
}
@@ -437,7 +437,7 @@ void QAiLoader::loadTextures(aiMaterial *ma, QGLMaterial *mq)
{
QString error = QLatin1String("Multi-textures not supported: \"%1\" has %2");
error.arg(mq->objectName()).arg(texCount);
- Assimp::DefaultLogger::get()->warn(error.toStdString());
+ Assimp::DefaultLogger::get()->warn(error.toAscii().constData());
}
else
{
@@ -451,7 +451,7 @@ void QAiLoader::loadTextures(aiMaterial *ma, QGLMaterial *mq)
{
QString error = QLatin1String("Could not load texture: %1 for material %2");
error.arg(url.toString()).arg(mq->objectName());
- Assimp::DefaultLogger::get()->warn(error.toStdString());
+ Assimp::DefaultLogger::get()->warn(error.toAscii().constData());
}
}
else
diff --git a/src/plugins/sceneformats/assimp/qaimesh.cpp b/src/plugins/sceneformats/assimp/qaimesh.cpp
index e7d4328e9..b299ea454 100644
--- a/src/plugins/sceneformats/assimp/qaimesh.cpp
+++ b/src/plugins/sceneformats/assimp/qaimesh.cpp
@@ -122,7 +122,7 @@ void QAiMesh::build(QGLBuilder &builder, bool showWarnings)
{
QString error = QLatin1String("Mesh %1 has zero vertex/face count");
error.arg(name.isEmpty() ? QString(QLatin1String("<unnamed mesh>")) : name);
- Assimp::DefaultLogger::get()->warn(error.toStdString());
+ Assimp::DefaultLogger::get()->warn(qPrintable(error));
}
return;
}
diff --git a/src/plugins/sceneformats/assimp/qaiscenehandler.cpp b/src/plugins/sceneformats/assimp/qaiscenehandler.cpp
index 5ae16c367..66d5d53ca 100644
--- a/src/plugins/sceneformats/assimp/qaiscenehandler.cpp
+++ b/src/plugins/sceneformats/assimp/qaiscenehandler.cpp
@@ -262,7 +262,7 @@ QGLAbstractScene *QAiSceneHandler::read()
// the importer owns the scene, so when the it goes out of scope on exiting
// this function the scene will get destroyed
- const aiScene* scene = m_importer.ReadFile(path.toStdString(), m_options);
+ const aiScene* scene = m_importer.ReadFile(path.toAscii().constData(), m_options);
if (!scene)
{
@@ -357,7 +357,7 @@ void QAiSceneHandler::downloadComplete(QByteArray sceneData)
log = Assimp::DefaultLogger::create("AssimpLog.txt", severity, streams);
}
- const aiScene* scene = m_importer.ReadFile(path.toStdString(), m_options);
+ const aiScene* scene = m_importer.ReadFile(qPrintable(path), m_options);
if (!scene)
{
// Notes on import success flags - according to assimp doco if validation