From: akl Date: Wed, 12 Feb 2014 13:39:34 +0000 (+0400) Subject: Fix of 0022463: [CEA 1044] xao import fails if the path contains some accented characters X-Git-Tag: V7_4_0a1~30 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c66c69abfdc68d628ee621bb2b5eced0d6c665d7;p=modules%2Fgeom.git Fix of 0022463: [CEA 1044] xao import fails if the path contains some accented characters --- diff --git a/src/EntityGUI/EntityGUI_PictureImportDlg.cxx b/src/EntityGUI/EntityGUI_PictureImportDlg.cxx index 3e521dfdb..cbda0bfc0 100644 --- a/src/EntityGUI/EntityGUI_PictureImportDlg.cxx +++ b/src/EntityGUI/EntityGUI_PictureImportDlg.cxx @@ -193,7 +193,8 @@ bool EntityGUI_PictureImportDlg::execute( ObjectList& objects ) 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() ) { diff --git a/src/GEOMGUI/GEOM_Displayer.cxx b/src/GEOMGUI/GEOM_Displayer.cxx index c01aa0e5c..58d3c3a60 100644 --- a/src/GEOMGUI/GEOM_Displayer.cxx +++ b/src/GEOMGUI/GEOM_Displayer.cxx @@ -751,7 +751,7 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap // 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; } } diff --git a/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx b/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx index 1a4118f74..ba5d065ee 100644 --- a/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx +++ b/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx @@ -254,7 +254,7 @@ bool ImportExportGUI_ImportXAODlg::execute() 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()) {