From 8550c38725a3b28324d788b5d5a5541dd717c428 Mon Sep 17 00:00:00 2001 From: Renaud Barate Date: Mon, 7 Jul 2014 17:15:35 +0200 Subject: [PATCH] Use UTF-8 also for AttributeString, AttributeComment and AttributePixMap for consistency --- src/SalomeApp/SalomeApp_DataObject.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SalomeApp/SalomeApp_DataObject.cxx b/src/SalomeApp/SalomeApp_DataObject.cxx index f4f622f61..468473a47 100644 --- a/src/SalomeApp/SalomeApp_DataObject.cxx +++ b/src/SalomeApp/SalomeApp_DataObject.cxx @@ -164,7 +164,7 @@ QPixmap SalomeApp_DataObject::icon( const int id ) const _PTR(AttributePixMap) aPixAttr ( anAttr ); if ( aPixAttr->HasPixMap() ) { QString componentType = componentDataType(); - QString pixmapID = aPixAttr->GetPixMap().c_str(); + QString pixmapID = QString::fromUtf8(aPixAttr->GetPixMap().c_str()); // select a plugin within a component QStringList plugin_pixmap = pixmapID.split( "::", QString::KeepEmptyParts ); if ( plugin_pixmap.size() == 2 ) { @@ -517,7 +517,7 @@ QString SalomeApp_DataObject::value( const _PTR(SObject)& obj ) const { _PTR(AttributeString) strAttr = attr; std::string str = strAttr->Value(); - QString aStrings = QString( str.c_str() ); + QString aStrings = QString::fromUtf8( str.c_str() ); //Special case to show NoteBook variables in the "Value" column of the OB if ( LightApp_RootObject* aRoot = dynamic_cast( root() ) ) @@ -585,7 +585,7 @@ QString SalomeApp_DataObject::value( const _PTR(SObject)& obj ) const { _PTR(AttributeComment) comm = attr; std::string str = comm->Value(); - val = QString( str.c_str() ); + val = QString::fromUtf8( str.c_str() ); } return val; -- 2.39.2