GEOM::GEOM_Object_var aFace = aBlocksOperations->MakeQuad4Vertices(P1,P2,P3,P4);
getDisplayer()->SetDisplayMode(3);
- getDisplayer()->SetTexture(theImgFileName.toStdString());
+ const QByteArray asc = theImgFileName.toUtf8();
+ getDisplayer()->SetTexture( std::string( asc.constData(), asc.length() ) );
if ( !aFace->_is_nil() )
{
// Texture from properties
QString aTexture = propMap.value( GEOM::propertyName( GEOM::Texture ) ).toString();
if ( !aTexture.isEmpty() ) {
- AISShape->SetTextureFileName( TCollection_AsciiString( aTexture.toStdString().c_str() ) );
+ AISShape->SetTextureFileName( TCollection_AsciiString( aTexture.toUtf8().constData() ) );
textureAdded = true;
}
}
GEOM::ListOfFields_var fields;
GEOM::GEOM_IInsertOperations_var ieOp = GEOM::GEOM_IInsertOperations::_narrow(getOperation());
- res = ieOp->ImportXAO(fileName.toStdString().c_str(), shape, subShapes, groups, fields);
+ res = ieOp->ImportXAO(fileName.toUtf8().constData(), shape, subShapes, groups, fields);
if (!shape->_is_nil())
{