From afac3e067e1bd6c7390b9e7015383a2093a9bcf6 Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 22 Jan 2018 11:55:44 +0300 Subject: [PATCH] Unicode support: correct handling of unicode on GUI level --- .../AdvancedGUI_DividedCylinderDlg.cxx | 2 +- .../AdvancedGUI_DividedDiskDlg.cxx | 4 ++-- src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx | 2 +- .../AdvancedGUI_SmoothingSurfaceDlg.cxx | 2 +- src/BasicGUI/BasicGUI_CircleDlg.cxx | 2 +- src/BasicGUI/BasicGUI_CurveDlg.cxx | 20 ++++++++--------- src/BasicGUI/BasicGUI_EllipseDlg.cxx | 2 +- src/BasicGUI/BasicGUI_PlaneDlg.cxx | 2 +- src/BasicGUI/BasicGUI_PointDlg.cxx | 2 +- src/BasicGUI/BasicGUI_VectorDlg.cxx | 2 +- src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx | 4 ++-- src/BlocksGUI/BlocksGUI_TrsfDlg.cxx | 4 ++-- src/BuildGUI/BuildGUI_EdgeDlg.cxx | 4 ++-- src/DependencyTree/DependencyTree_View.cxx | 2 +- src/EntityGUI/EntityGUI_3DSketcherDlg.cxx | 4 ++-- src/EntityGUI/EntityGUI_FieldDlg.cxx | 22 +++++++++---------- src/EntityGUI/EntityGUI_SketcherDlg.cxx | 4 ++-- src/EntityGUI/EntityGUI_SubShapeDlg.cxx | 4 ++-- src/GEOMBase/GEOMBase.cxx | 6 ++--- src/GEOMBase/GEOMBase_Helper.cxx | 22 +++++++++---------- .../GEOM_PreviewFilter.cxx | 2 +- src/GEOMGUI/GEOMGUI_AnnotationMgr.cxx | 2 +- src/GEOMGUI/GEOMGUI_OCCSelector.cxx | 10 ++++----- src/GEOMGUI/GEOMGUI_Selection.cxx | 14 ++++++------ src/GEOMGUI/GEOMGUI_TextTreeWdg.cxx | 2 +- src/GEOMGUI/GEOM_Displayer.cxx | 12 +++++----- src/GEOMGUI/GeometryGUI.cxx | 22 +++++++++---------- src/GEOMToolsGUI/GEOMToolsGUI.cxx | 10 ++++----- src/GEOMToolsGUI/GEOMToolsGUI_1.cxx | 2 +- .../GEOMToolsGUI_LineWidthDlg.cxx | 2 +- src/GEOMToolsGUI/GEOMToolsGUI_MarkerDlg.cxx | 2 +- src/GEOMToolsGUI/GEOMToolsGUI_PublishDlg.cxx | 10 ++++----- src/GEOM_SWIG_WITHIHM/libGEOM_Swig.cxx | 2 +- .../GenerationGUI_FillingDlg.cxx | 2 +- src/GenerationGUI/GenerationGUI_PrismDlg.cxx | 4 ++-- src/GenerationGUI/GenerationGUI_RevolDlg.cxx | 2 +- src/GroupGUI/GroupGUI_GroupDlg.cxx | 12 +++++----- src/MeasureGUI/MeasureGUI_AngleDlg.cxx | 4 ++-- src/OBJECT/GEOM_AISShape.cxx | 2 +- .../OperationGUI_ExtractionDlg.cxx | 6 ++--- .../OperationGUI_ExtrudedFeatureDlg.cxx | 2 +- src/OperationGUI/OperationGUI_FilletDlg.cxx | 2 +- src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx | 2 +- src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx | 4 ++-- src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx | 8 +++---- src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx | 4 ++-- src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx | 4 ++-- src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx | 4 ++-- src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx | 4 ++-- src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx | 2 +- src/RepairGUI/RepairGUI_GlueDlg.cxx | 6 ++--- src/RepairGUI/RepairGUI_InspectObjectDlg.cxx | 2 +- src/RepairGUI/RepairGUI_LimitToleranceDlg.cxx | 4 ++-- src/RepairGUI/RepairGUI_SewingDlg.cxx | 2 +- src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx | 2 +- src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx | 2 +- .../TransformationGUI_MultiRotationDlg.cxx | 2 +- .../TransformationGUI_MultiTranslationDlg.cxx | 2 +- .../TransformationGUI_OffsetDlg.cxx | 2 +- .../TransformationGUI_RotationDlg.cxx | 4 ++-- .../TransformationGUI_ScaleDlg.cxx | 4 ++-- .../TransformationGUI_TranslationDlg.cxx | 6 ++--- src/XAOPlugin/XAOPlugin_ImportDlg.cxx | 2 +- 63 files changed, 158 insertions(+), 158 deletions(-) diff --git a/src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.cxx b/src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.cxx index 353bb7b36..3bb33df38 100644 --- a/src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.cxx +++ b/src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.cxx @@ -256,7 +256,7 @@ bool AdvancedGUI_DividedCylinderDlg::execute (ObjectList& objects) QStringList aParameters; aParameters << GroupParams->SpinBox_DX->text(); // R parameter aParameters << GroupParams->SpinBox_DY->text(); // H parameter - if ( aParameters.count() > 0 ) anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + if ( aParameters.count() > 0 ) anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } if (res) diff --git a/src/AdvancedGUI/AdvancedGUI_DividedDiskDlg.cxx b/src/AdvancedGUI/AdvancedGUI_DividedDiskDlg.cxx index 557a0666b..0098d1261 100644 --- a/src/AdvancedGUI/AdvancedGUI_DividedDiskDlg.cxx +++ b/src/AdvancedGUI/AdvancedGUI_DividedDiskDlg.cxx @@ -434,7 +434,7 @@ bool AdvancedGUI_DividedDiskDlg::execute (ObjectList& objects) { QStringList aParameters; aParameters << GroupParams->SpinBox_DX->text(); - if ( aParameters.count() > 0 ) anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + if ( aParameters.count() > 0 ) anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } break; case 1: @@ -447,7 +447,7 @@ bool AdvancedGUI_DividedDiskDlg::execute (ObjectList& objects) { QStringList aParameters; aParameters << GroupPntVecR->SpinBox_DX->text(); - if ( aParameters.count() > 0 ) anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + if ( aParameters.count() > 0 ) anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } break; } diff --git a/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx b/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx index 5216a5b1f..fe3329ce4 100644 --- a/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx +++ b/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx @@ -1201,7 +1201,7 @@ bool AdvancedGUI_PipeTShapeDlg::executeNoCheck (ObjectList& objects) } if (aParameters.count() > 0) - anObj[0]->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj[0]->SetParameters(aParameters.join(":").toUtf8().constData()); } objects.push_back(anObj[0]._retn()); diff --git a/src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.cxx b/src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.cxx index c4e94322e..de9454fe2 100644 --- a/src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.cxx +++ b/src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.cxx @@ -245,7 +245,7 @@ bool AdvancedGUI_SmoothingSurfaceDlg::execute (ObjectList& objects) { QStringList aParameters; //@@ put stringified input parameters to the string list here to store in the data model for notebook @@// - if ( aParameters.count() > 0 ) anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + if ( aParameters.count() > 0 ) anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } if (res) diff --git a/src/BasicGUI/BasicGUI_CircleDlg.cxx b/src/BasicGUI/BasicGUI_CircleDlg.cxx index a94c7fcbe..37e25f992 100644 --- a/src/BasicGUI/BasicGUI_CircleDlg.cxx +++ b/src/BasicGUI/BasicGUI_CircleDlg.cxx @@ -592,7 +592,7 @@ bool BasicGUI_CircleDlg::execute( ObjectList& objects ) aParameters << GroupPntVecR->SpinBox_DX->text(); anObj = anOper->MakeCirclePntVecR( myPoint.get(), myDir.get(), getRadius() ); if ( !anObj->_is_nil() && !IsPreview() ) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); res = true; break; } diff --git a/src/BasicGUI/BasicGUI_CurveDlg.cxx b/src/BasicGUI/BasicGUI_CurveDlg.cxx index 2a363b49d..01942f7af 100644 --- a/src/BasicGUI/BasicGUI_CurveDlg.cxx +++ b/src/BasicGUI/BasicGUI_CurveDlg.cxx @@ -472,9 +472,9 @@ bool BasicGUI_CurveDlg::execute (ObjectList& objects) if (myBySelectionBtn->isChecked()) anObj = anOper->MakePolyline(points.in(), myGroupPoints->CheckButton1->isChecked()); else - anObj = anOper->MakeCurveParametricNew(qPrintable(myGroupParams->myXExpr->text()), - qPrintable(myGroupParams->myYExpr->text()), - qPrintable(myGroupParams->myZExpr->text()), + anObj = anOper->MakeCurveParametricNew(qUtf8Printable(myGroupParams->myXExpr->text()), + qUtf8Printable(myGroupParams->myYExpr->text()), + qUtf8Printable(myGroupParams->myZExpr->text()), myGroupParams->myPMin->value(), myGroupParams->myPMax->value(), myGroupParams->myPStep->value(), @@ -485,9 +485,9 @@ bool BasicGUI_CurveDlg::execute (ObjectList& objects) if (myBySelectionBtn->isChecked()) anObj = anOper->MakeSplineBezier(points.in(), myGroupPoints->CheckButton1->isChecked()); else - anObj = anOper->MakeCurveParametricNew(qPrintable(myGroupParams->myXExpr->text()), - qPrintable(myGroupParams->myYExpr->text()), - qPrintable(myGroupParams->myZExpr->text()), + anObj = anOper->MakeCurveParametricNew(qUtf8Printable(myGroupParams->myXExpr->text()), + qUtf8Printable(myGroupParams->myYExpr->text()), + qUtf8Printable(myGroupParams->myZExpr->text()), myGroupParams->myPMin->value(), myGroupParams->myPMax->value(), myGroupParams->myPStep->value(), @@ -506,9 +506,9 @@ bool BasicGUI_CurveDlg::execute (ObjectList& objects) myGroupPoints->CheckButton2->isChecked()); } else - anObj = anOper->MakeCurveParametricNew(qPrintable(myGroupParams->myXExpr->text()), - qPrintable(myGroupParams->myYExpr->text()), - qPrintable(myGroupParams->myZExpr->text()), + anObj = anOper->MakeCurveParametricNew(qUtf8Printable(myGroupParams->myXExpr->text()), + qUtf8Printable(myGroupParams->myYExpr->text()), + qUtf8Printable(myGroupParams->myZExpr->text()), myGroupParams->myPMin->value(), myGroupParams->myPMax->value(), myGroupParams->myPStep->value(), @@ -523,7 +523,7 @@ bool BasicGUI_CurveDlg::execute (ObjectList& objects) aParameters<myPMin->text(); aParameters<myPMax->text(); aParameters<myPStep->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } objects.push_back(anObj._retn()); } diff --git a/src/BasicGUI/BasicGUI_EllipseDlg.cxx b/src/BasicGUI/BasicGUI_EllipseDlg.cxx index 4fdea1811..284be1641 100644 --- a/src/BasicGUI/BasicGUI_EllipseDlg.cxx +++ b/src/BasicGUI/BasicGUI_EllipseDlg.cxx @@ -414,7 +414,7 @@ bool BasicGUI_EllipseDlg::execute( ObjectList& objects ) anOper->MakeEllipse ( myPoint.get(), myDir.get(), aMajorR, aMinorR ); if ( !anObj->_is_nil() ) { if ( !IsPreview() ) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); objects.push_back( anObj._retn() ); } return true; diff --git a/src/BasicGUI/BasicGUI_PlaneDlg.cxx b/src/BasicGUI/BasicGUI_PlaneDlg.cxx index 17d431515..190c2bb42 100644 --- a/src/BasicGUI/BasicGUI_PlaneDlg.cxx +++ b/src/BasicGUI/BasicGUI_PlaneDlg.cxx @@ -752,7 +752,7 @@ bool BasicGUI_PlaneDlg::execute( ObjectList& objects ) if ( !anObj->_is_nil() ) { if ( !IsPreview() ) - anObj->SetParameters(getSizeAsString().toLatin1().constData()); + anObj->SetParameters(getSizeAsString().toUtf8().constData()); objects.push_back( anObj._retn() ); } return res; diff --git a/src/BasicGUI/BasicGUI_PointDlg.cxx b/src/BasicGUI/BasicGUI_PointDlg.cxx index 196a624b6..a410cdbd7 100644 --- a/src/BasicGUI/BasicGUI_PointDlg.cxx +++ b/src/BasicGUI/BasicGUI_PointDlg.cxx @@ -889,7 +889,7 @@ bool BasicGUI_PointDlg::execute(ObjectList& objects) id == GEOM_POINT_REF || id == GEOM_POINT_EDGE || id == GEOM_POINT_SURF)) { - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } if (id == GEOM_POINT_REF || id == GEOM_POINT_EDGE || id == GEOM_POINT_SURF) { diff --git a/src/BasicGUI/BasicGUI_VectorDlg.cxx b/src/BasicGUI/BasicGUI_VectorDlg.cxx index d0eaa03ae..c4e43fd23 100644 --- a/src/BasicGUI/BasicGUI_VectorDlg.cxx +++ b/src/BasicGUI/BasicGUI_VectorDlg.cxx @@ -448,7 +448,7 @@ bool BasicGUI_VectorDlg::execute( ObjectList& objects ) anObj = anOper->MakeVectorDXDYDZ( dx, dy, dz ); if ( !anObj->_is_nil() && !IsPreview() ) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); res = true; break; diff --git a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx index f9f543b0f..8aede364e 100644 --- a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx @@ -454,7 +454,7 @@ bool BlocksGUI_ExplodeDlg::execute( ObjectList& objects ) if ( selected.contains( QString( objStr.in() ) ) ) { if ( !IsPreview() ) - (*anIter)->SetParameters(aParameters.join(":").toLatin1().constData()); + (*anIter)->SetParameters(aParameters.join(":").toUtf8().constData()); objects.push_back( *anIter ); } else @@ -474,7 +474,7 @@ bool BlocksGUI_ExplodeDlg::execute( ObjectList& objects ) { GEOM::GEOM_Object_var anObj = GEOM::GEOM_Object::_duplicate( aList[i] ); if ( !IsPreview() ) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); objects.push_back( anObj._retn() ); } } diff --git a/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx b/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx index d4e285aed..37ef959ea 100644 --- a/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx @@ -591,7 +591,7 @@ bool BlocksGUI_TrsfDlg::execute (ObjectList& objects) QStringList aParameters; aParameters << "" << ""; aParameters << mySpinBox[SpinBox1]->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; break; @@ -608,7 +608,7 @@ bool BlocksGUI_TrsfDlg::execute (ObjectList& objects) aParameters << mySpinBox[SpinBox2U]->text(); aParameters << "" << ""; aParameters << mySpinBox[SpinBox2V]->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; break; diff --git a/src/BuildGUI/BuildGUI_EdgeDlg.cxx b/src/BuildGUI/BuildGUI_EdgeDlg.cxx index ff807392b..de4c7097e 100644 --- a/src/BuildGUI/BuildGUI_EdgeDlg.cxx +++ b/src/BuildGUI/BuildGUI_EdgeDlg.cxx @@ -475,7 +475,7 @@ bool BuildGUI_EdgeDlg::execute (ObjectList& objects) anObj = anOper->MakeEdgeWire(myWire.get(), aLinearTolerance, anAngularTolerance); if (!anObj->_is_nil() && !IsPreview()) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); res = true; break; @@ -487,7 +487,7 @@ bool BuildGUI_EdgeDlg::execute (ObjectList& objects) anObj = anOper->MakeEdgeOnCurveByLength(myCurve.get(), aLength, myStartPoint.get()); if (!anObj->_is_nil() && !IsPreview()) - anObj->SetParameters(GroupOnCurve->SpinBox_DX->text().toLatin1().constData()); + anObj->SetParameters(GroupOnCurve->SpinBox_DX->text().toUtf8().constData()); res = true; break; diff --git a/src/DependencyTree/DependencyTree_View.cxx b/src/DependencyTree/DependencyTree_View.cxx index f782cd16f..bbd1f587d 100644 --- a/src/DependencyTree/DependencyTree_View.cxx +++ b/src/DependencyTree/DependencyTree_View.cxx @@ -773,7 +773,7 @@ void DependencyTree_View::getNewTreeModel( bool theUseSelectedObject, bool theUs GEOM::GEOM_Object_var geomObject = GEOM::GEOM_Object::_nil(); geomObject = GEOMBase::ConvertIOinGEOMObject( io ); QString entry = geomObject->GetEntry(); - objectsEntry[ iter ] = entry.toLatin1().constData(); + objectsEntry[ iter ] = entry.toUtf8().constData(); } } else { diff --git a/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx b/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx index 1a3f06fab..8f7b0220c 100755 --- a/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx @@ -995,10 +995,10 @@ bool EntityGUI_3DSketcherDlg::execute (ObjectList& objects) // MESSAGE("aCommands.last() = "<< aCommands.last().toStdString()); GEOM::GEOM_ICurvesOperations_var anOper = GEOM::GEOM_ICurvesOperations::_narrow(getOperation()); //GEOM::GEOM_Object_var anObj = anOper->Make3DSketcher(aCoordsArray); - GEOM::GEOM_Object_var anObj = anOper->Make3DSketcherCommand(aCommands.join(":").toLatin1().constData()); + GEOM::GEOM_Object_var anObj = anOper->Make3DSketcherCommand(aCommands.join(":").toUtf8().constData()); if (!anObj->_is_nil()) { - if (!IsPreview()) anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + if (!IsPreview()) anObj->SetParameters(aParameters.join(":").toUtf8().constData()); objects.push_back(anObj._retn()); } diff --git a/src/EntityGUI/EntityGUI_FieldDlg.cxx b/src/EntityGUI/EntityGUI_FieldDlg.cxx index 5deec627a..c66c0c2cb 100644 --- a/src/EntityGUI/EntityGUI_FieldDlg.cxx +++ b/src/EntityGUI/EntityGUI_FieldDlg.cxx @@ -753,7 +753,7 @@ void EntityGUI_FieldDlg::StepTable::setValues(GEOM::GEOM_FieldStep_var& step) vals->length( nbRows * nbComps ); for ( int iV = 0, iR = 0; iR < nbRows; ++iR ) for ( int iC = 1; iC < nbColumns; ++iC ) - vals[ iV++ ] = item( iR, iC )->text().toLatin1().constData(); + vals[ iV++ ] = item( iR, iC )->text().toUtf8().constData(); ss->SetValues( vals ); } } @@ -1477,7 +1477,7 @@ int EntityGUI_FieldDlg::getSelectedSubshapes (TColStd_IndexedMapOfInteger& theMa if (!appStudy) return 0; _PTR(Study) aStudy = appStudy->studyDS(); - _PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toLatin1().constData())); + _PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toUtf8().constData())); GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aSObj)); TopoDS_Shape aShape; @@ -1695,7 +1695,7 @@ void EntityGUI_FieldDlg::activateSelection() TopoDS_Shape aSubShape = myShapeMap( index ); QString anEntry = QString( "TEMP_" ) + aMainEntry.in() + QString("_%1").arg(index); Handle(SALOME_InteractiveObject) io = - new SALOME_InteractiveObject(anEntry.toLatin1(), "GEOM", "TEMP_IO"); + new SALOME_InteractiveObject(anEntry.toUtf8(), "GEOM", "TEMP_IO"); aDisplayer->SetColor( aCol ); SALOME_Prs* aPrs = aDisplayer->buildSubshapePresentation(aSubShape, anEntry, aView); if (aPrs) { @@ -1802,7 +1802,7 @@ void EntityGUI_FieldDlg::highlightSubShapes() if (anIds.Contains(anIndex)) { aSelList.Append(anIO); // if (childsMap.contains (anIndex)) { - // Handle(SALOME_InteractiveObject) tmpIO = new SALOME_InteractiveObject(childsMap.value(anIndex).toLatin1().constData(), "GEOM", "TEMP_IO"); + // Handle(SALOME_InteractiveObject) tmpIO = new SALOME_InteractiveObject(childsMap.value(anIndex).toUtf8().constData(), "GEOM", "TEMP_IO"); // aSelList.Append(tmpIO); // } } @@ -1870,11 +1870,11 @@ bool EntityGUI_FieldDlg::execute() GEOM::string_array_var compNames = new GEOM::string_array(); compNames->length( nbComps ); for ( int iC = 0; iC < nbComps; ++iC ) - compNames[ iC ] = columnNames[ iC+1 ].toLatin1().constData(); + compNames[ iC ] = columnNames[ iC+1 ].toUtf8().constData(); GEOM::GEOM_IFieldOperations_var anOper = GEOM::GEOM_IFieldOperations::_narrow(getOperation()); myField = anOper->CreateField( myShape, - aName.toLatin1().constData(), + aName.toUtf8().constData(), GEOM::field_data_type( getDataType() ), CORBA::Short( getDim() ), compNames ); @@ -1882,7 +1882,7 @@ bool EntityGUI_FieldDlg::execute() return false; SALOMEDS::SObject_wrap aSO = - getGeomEngine()->AddInStudy( myField, aName.toLatin1().constData(), myShape ); + getGeomEngine()->AddInStudy( myField, aName.toUtf8().constData(), myShape ); if ( !aSO->_is_nil() ) { myField->UnRegister(); CORBA::String_var entry = aSO->GetID(); @@ -1891,13 +1891,13 @@ bool EntityGUI_FieldDlg::execute() } else // update field name { - myField->SetName( aName.toLatin1().constData() ); + myField->SetName( aName.toUtf8().constData() ); CORBA::String_var entry = myField->GetStudyEntry(); if ( entry.in() ) { SALOMEDS::SObject_wrap SO = aStudyDS->FindObjectID( entry.in() ); if ( !SO->_is_nil() ) { - aBuilder->SetName(SO, aName.toLatin1().constData()); + aBuilder->SetName(SO, aName.toUtf8().constData()); } } } @@ -1918,7 +1918,7 @@ bool EntityGUI_FieldDlg::execute() step = myField->AddStep( tbl->getStepID(), tbl->getStamp() ); SALOMEDS::SObject_wrap aSO = - getGeomEngine()->AddInStudy( step, stepName.toLatin1().constData(), myField ); + getGeomEngine()->AddInStudy( step, stepName.toUtf8().constData(), myField ); if ( /*!myIsCreation &&*/ !aSO->_is_nil() ) { step->UnRegister(); CORBA::String_var entry = aSO->GetID(); @@ -1933,7 +1933,7 @@ bool EntityGUI_FieldDlg::execute() if ( entry.in() ) { SALOMEDS::SObject_wrap SO = aStudyDS->FindObjectID( entry.in() ); if ( !SO->_is_nil() ) - aBuilder->SetName( SO, stepName.toLatin1().constData() ); + aBuilder->SetName( SO, stepName.toUtf8().constData() ); } } diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.cxx b/src/EntityGUI/EntityGUI_SketcherDlg.cxx index 6f4b43a41..6c8f804c2 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_SketcherDlg.cxx @@ -2472,7 +2472,7 @@ bool EntityGUI_SketcherDlg::execute( ObjectList& objects ) if( !IsPreview() ) { QStringList aCurrentParameters = myParameters; aCurrentParameters << aParameters; - anObj->SetParameters(aCurrentParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aCurrentParameters.join(":").toUtf8().constData()); } objects.push_back( anObj._retn() ); @@ -2755,7 +2755,7 @@ void EntityGUI_SketcherDlg::FindLocalCS() return; _PTR(SComponent) fc = obj->GetFatherComponent(); QString geomComp = fc->GetID().c_str(); - _PTR(SObject) comp = aStudy->FindObjectID( geomComp.toLatin1().data() ); + _PTR(SObject) comp = aStudy->FindObjectID( geomComp.toUtf8().data() ); if ( !comp ) return; diff --git a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx index 5230c6ac5..8e4361760 100644 --- a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx +++ b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx @@ -693,7 +693,7 @@ int EntityGUI_SubShapeDlg::getSelectedSubshapes (TColStd_IndexedMapOfInteger& th if (!appStudy) return 0; _PTR(Study) aStudy = appStudy->studyDS(); - _PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toLatin1().constData())); + _PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toUtf8().constData())); GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aSObj)); TopoDS_Shape aShape; @@ -934,7 +934,7 @@ void EntityGUI_SubShapeDlg::ClickOnOkFilter() ( myLessFilterCheck->isChecked() && !myGreaterFilterCheck->isChecked() && isLess ) || ( myGreaterFilterCheck->isChecked() && !myLessFilterCheck->isChecked() && isGreater ) ) { Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject(); - io->setEntry( anEntry.toLatin1().constData() ); + io->setEntry( anEntry.toUtf8().constData() ); io->setName( myObject->GetName() ); toSelect.Append(io); } diff --git a/src/GEOMBase/GEOMBase.cxx b/src/GEOMBase/GEOMBase.cxx index d5862ced2..6bae916e3 100644 --- a/src/GEOMBase/GEOMBase.cxx +++ b/src/GEOMBase/GEOMBase.cxx @@ -626,7 +626,7 @@ bool GEOMBase::SelectionByNameInDialogs( QWidget* widget, const QString& objectU /* Create a SALOME_InteractiveObject with a SALOME::SObject */ Handle(SALOME_InteractiveObject) IO = new SALOME_InteractiveObject( listSO[0]->GetID().c_str(), "GEOM", - objectUserName.toLatin1().constData() ); + objectUserName.toUtf8().constData() ); /* Add as a selected object */ /* Clear any previous selection : */ @@ -710,7 +710,7 @@ void GEOMBase::ShowErrorMessage( const QString& errorCode, const QString& commen if ( !errorCode.isEmpty() ) text << QObject::tr( errorCode.toLatin1().constData() ); if ( !comment.isEmpty() ) - text << QObject::tr( comment.toLatin1().constData() ); + text << QObject::tr( comment.toUtf8().constData() ); SUIT_MessageBox::critical( SUIT_Session::session()->activeApplication()->desktop(), QObject::tr( "GEOM_ERROR" ), @@ -869,7 +869,7 @@ void GEOMBase::PublishSubObject( GEOM::GEOM_Object_ptr object, const QString& na QString fatherEntry = GetEntry( father ); if ( entry.isEmpty() && !CORBA::is_nil( father ) && !fatherEntry.isEmpty() ) { QString aName = !name.isEmpty() ? name : GetName( object ); - GeometryGUI::GetGeomGen()->AddInStudy( object, aName.toLatin1().data(), father.in() ); + GeometryGUI::GetGeomGen()->AddInStudy( object, aName.toUtf8().data(), father.in() ); } } } diff --git a/src/GEOMBase/GEOMBase_Helper.cxx b/src/GEOMBase/GEOMBase_Helper.cxx index 0e920345d..ba5260209 100755 --- a/src/GEOMBase/GEOMBase_Helper.cxx +++ b/src/GEOMBase/GEOMBase_Helper.cxx @@ -180,9 +180,9 @@ void GEOMBase_Helper::erase( GEOM::GEOM_Object_ptr object, const bool updateView if ( !object->_is_nil() ) { QString entry = getEntry( object ); QString name = GEOMBase::GetName( object ); - getDisplayer()->Erase ( new SALOME_InteractiveObject(entry.toLatin1().constData(), + getDisplayer()->Erase ( new SALOME_InteractiveObject(entry.toUtf8().constData(), "GEOM", - name.toLatin1().constData() ), + name.toUtf8().constData() ), true, updateView ); } } @@ -223,9 +223,9 @@ void GEOMBase_Helper::redisplay( GEOM::GEOM_Object_ptr object, QString entry = getEntry( object ); QString name = GEOMBase::GetName( object ); getDisplayer()->Redisplay - (new SALOME_InteractiveObject (entry.toLatin1().constData(), + (new SALOME_InteractiveObject (entry.toUtf8().constData(), "GEOM", - name.toLatin1().constData()), + name.toUtf8().constData()), false); } @@ -245,9 +245,9 @@ void GEOMBase_Helper::redisplay( GEOM::GEOM_Object_ptr object, QString entry = getEntry( aChild ); QString name = GEOMBase::GetName( aChild ); getDisplayer()->Redisplay - ( new SALOME_InteractiveObject( entry.toLatin1().constData(), + ( new SALOME_InteractiveObject( entry.toUtf8().constData(), "GEOM", - name.toLatin1().constData() ), + name.toUtf8().constData() ), false ); } } @@ -490,8 +490,8 @@ void GEOMBase_Helper::localSelection( const ObjectList& theObjs, const std::list if ( anEntry != "" ) { QString aName = GEOMBase::GetName( anObj ); - aListOfIO.Append( new SALOME_InteractiveObject( anEntry.toLatin1().constData(), - "GEOM", aName.toLatin1().constData() )); + aListOfIO.Append( new SALOME_InteractiveObject( anEntry.toUtf8().constData(), + "GEOM", aName.toUtf8().constData() )); } } @@ -702,7 +702,7 @@ QString GEOMBase_Helper::getEntry( GEOM::GEOM_Object_ptr object ) const if ( study ) { QString objIOR = GEOMBase::GetIORFromObject( object ); if ( objIOR != "" ) { - _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( objIOR.toLatin1().constData() ) ); + _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( objIOR.toUtf8().constData() ) ); if ( SO ) return QString::fromStdString(SO->GetID()); } @@ -906,7 +906,7 @@ bool GEOMBase_Helper::onAccept( const bool publish, const bool useTransaction, b aName = GEOMBase::GetDefaultName( getPrefix( obj ) ); } } - anEntryList << addInStudy( obj, aName.toLatin1().constData() ); + anEntryList << addInStudy( obj, aName.toUtf8().constData() ); // updateView=false if( isDisplayResult() ) display( obj, false ); @@ -1145,7 +1145,7 @@ GEOM::GEOM_Object_ptr GEOMBase_Helper::findObjectInFather (GEOM::GEOM_Object_ptr SalomeApp_Study* appStudy = dynamic_cast( app->activeStudy() ); _PTR(Study) aDStudy = appStudy->studyDS(); QString IOR = GEOMBase::GetIORFromObject( theFather ); - _PTR(SObject) SObj ( aDStudy->FindObjectIOR( IOR.toLatin1().constData() ) ); + _PTR(SObject) SObj ( aDStudy->FindObjectIOR( IOR.toUtf8().constData() ) ); bool inStudy = false; GEOM::GEOM_Object_var aReturnObject; diff --git a/src/GEOMFiltersSelection/GEOM_PreviewFilter.cxx b/src/GEOMFiltersSelection/GEOM_PreviewFilter.cxx index 45be84f78..2ee961d09 100644 --- a/src/GEOMFiltersSelection/GEOM_PreviewFilter.cxx +++ b/src/GEOMFiltersSelection/GEOM_PreviewFilter.cxx @@ -48,6 +48,6 @@ GEOM_PreviewFilter::~GEOM_PreviewFilter() bool GEOM_PreviewFilter::isOk( const SUIT_DataOwner* sOwner ) const { const LightApp_DataOwner* owner = dynamic_cast ( sOwner ); - return ( owner && strstr( owner->entry().toLatin1().constData(), "TEMP" ) ); + return ( owner && strstr( owner->entry().toUtf8().constData(), "TEMP" ) ); } diff --git a/src/GEOMGUI/GEOMGUI_AnnotationMgr.cxx b/src/GEOMGUI/GEOMGUI_AnnotationMgr.cxx index 1c2e59e50..fd75b5a4c 100755 --- a/src/GEOMGUI/GEOMGUI_AnnotationMgr.cxx +++ b/src/GEOMGUI/GEOMGUI_AnnotationMgr.cxx @@ -82,7 +82,7 @@ SALOME_Prs* GEOMGUI_AnnotationMgr::CreatePresentation( const GEOMGUI_AnnotationA if ( !theEntry.isEmpty() ) { // owner should be set to provide selection mechanizm Handle( SALOME_InteractiveObject ) anIO = new SALOME_InteractiveObject(); - anIO->setEntry( theEntry.toLatin1().constData() ); + anIO->setEntry( theEntry.toUtf8().constData() ); aPresentation->SetOwner( anIO ); } diff --git a/src/GEOMGUI/GEOMGUI_OCCSelector.cxx b/src/GEOMGUI/GEOMGUI_OCCSelector.cxx index 7ab8db1f9..9b7286fbd 100644 --- a/src/GEOMGUI/GEOMGUI_OCCSelector.cxx +++ b/src/GEOMGUI/GEOMGUI_OCCSelector.cxx @@ -225,9 +225,9 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) if ( subOwner ) { QString entry = subOwner->entry(); - if ( indexesMap.IsBound( TCollection_AsciiString(entry.toLatin1().data()))) + if ( indexesMap.IsBound( TCollection_AsciiString(entry.toUtf8().data()))) { - TColStd_IndexedMapOfInteger& subIndexes = indexesMap.ChangeFind(entry.toLatin1().data()); + TColStd_IndexedMapOfInteger& subIndexes = indexesMap.ChangeFind(entry.toUtf8().data()); subIndexes.Add( subOwner->index() ); //indexesMap.replace( entry, subIndexes ); } @@ -235,7 +235,7 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) { TColStd_IndexedMapOfInteger subIndexes; subIndexes.Add( subOwner->index() ); - indexesMap.Bind(entry.toLatin1().data(), subIndexes); + indexesMap.Bind(entry.toUtf8().data(), subIndexes); } } else // the owner is NOT a sub owner, maybe it is a DataOwner == GLOBAL selection @@ -279,7 +279,7 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) { // has a local selection Handle(AIS_Shape) aisShape = Handle(AIS_Shape)::DownCast( io ); - if (!aisShape.IsNull() && indexesMap.IsBound(entryStr.toLatin1().data())) + if (!aisShape.IsNull() && indexesMap.IsBound(entryStr.toUtf8().data())) { isLocal = true; TopoDS_Shape shape = aisShape->Shape(); @@ -318,7 +318,7 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) if (isLocal) { const TColStd_IndexedMapOfInteger& subIndexes = - indexesMap.ChangeFind(entryStr.toLatin1().data()); + indexesMap.ChangeFind(entryStr.toUtf8().data()); const TopoDS_Shape& aSubShape = anOwner->Shape(); int aSubShapeId = aMapOfShapes.FindIndex( aSubShape ); diff --git a/src/GEOMGUI/GEOMGUI_Selection.cxx b/src/GEOMGUI/GEOMGUI_Selection.cxx index 351bb017e..017e7c240 100644 --- a/src/GEOMGUI/GEOMGUI_Selection.cxx +++ b/src/GEOMGUI/GEOMGUI_Selection.cxx @@ -269,7 +269,7 @@ bool GEOMGUI_Selection::isVisible( const int index ) const GEOM::GEOM_Object_var obj = getObject( index ); SALOME_View* view = GEOM_Displayer::GetActiveView(); if ( !CORBA::is_nil( obj ) && view ) { - Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( entry( index ).toLatin1().constData(), "GEOM", "TEMP_IO" ); + Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( entry( index ).toUtf8().constData(), "GEOM", "TEMP_IO" ); res = view->isVisible( io ); } @@ -342,7 +342,7 @@ QString GEOMGUI_Selection::displayMode( const int index ) const SALOME_View* view = GEOM_Displayer::GetActiveView(); if ( view /*fix for 9320==>*/&& ( viewType == OCCViewer_Viewer::Type() || viewType == SVTK_Viewer::Type() ) ) { - SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() ); + SALOME_Prs* prs = view->CreatePrs( entry( index ).toUtf8().constData() ); if ( prs ) { if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC SOCC_Prs* occPrs = (SOCC_Prs*) prs; @@ -408,7 +408,7 @@ bool GEOMGUI_Selection::isVectorsMode( const int index ) const SALOME_View* view = GEOM_Displayer::GetActiveView(); QString viewType = activeViewType(); if ( view && ( viewType == OCCViewer_Viewer::Type() || viewType == SVTK_Viewer::Type() ) ) { - SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() ); + SALOME_Prs* prs = view->CreatePrs( entry( index ).toUtf8().constData() ); if ( prs ) { if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC SOCC_Prs* occPrs = (SOCC_Prs*) prs; @@ -455,7 +455,7 @@ bool GEOMGUI_Selection::isVerticesMode( const int index ) const SALOME_View* view = GEOM_Displayer::GetActiveView(); QString viewType = activeViewType(); if ( view && ( viewType == OCCViewer_Viewer::Type() || viewType == SVTK_Viewer::Type() ) ) { - SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() ); + SALOME_Prs* prs = view->CreatePrs( entry( index ).toUtf8().constData() ); if ( prs ) { if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC SOCC_Prs* occPrs = (SOCC_Prs*) prs; @@ -502,7 +502,7 @@ bool GEOMGUI_Selection::isNameMode( const int index ) const SALOME_View* view = GEOM_Displayer::GetActiveView(); QString viewType = activeViewType(); if ( view && ( viewType == OCCViewer_Viewer::Type() || viewType == SVTK_Viewer::Type() ) ) { - SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() ); + SALOME_Prs* prs = view->CreatePrs( entry( index ).toUtf8().constData() ); if ( prs ) { if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC SOCC_Prs* occPrs = (SOCC_Prs*) prs; @@ -716,7 +716,7 @@ bool GEOMGUI_Selection::topLevel( const int index ) const SALOME_View* view = GEOM_Displayer::GetActiveView(); QString viewType = activeViewType(); if ( view && viewType == OCCViewer_Viewer::Type() ) { - SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() ); + SALOME_Prs* prs = view->CreatePrs( entry( index ).toUtf8().constData() ); if ( prs ) { if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC SOCC_Prs* occPrs = (SOCC_Prs*) prs; @@ -752,7 +752,7 @@ bool GEOMGUI_Selection::isPhysicalMaterial( const int idx ) const SALOME_View* view = GEOM_Displayer::GetActiveView(); QString viewType = activeViewType(); if ( view ) { - SALOME_Prs* prs = view->CreatePrs( entry( idx ).toLatin1().constData() ); + SALOME_Prs* prs = view->CreatePrs( entry( idx ).toUtf8().constData() ); if ( prs ) { if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC SOCC_Prs* occPrs = (SOCC_Prs*) prs; diff --git a/src/GEOMGUI/GEOMGUI_TextTreeWdg.cxx b/src/GEOMGUI/GEOMGUI_TextTreeWdg.cxx index 93181d8f9..4ff3e7a85 100755 --- a/src/GEOMGUI/GEOMGUI_TextTreeWdg.cxx +++ b/src/GEOMGUI/GEOMGUI_TextTreeWdg.cxx @@ -826,7 +826,7 @@ bool GEOMGUI_TextTreeWdg::setShapeItemVisibility( QSharedPointer //================================================================================= void GEOMGUI_TextTreeWdg::redisplay( QString theEntry ) { - Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( theEntry.toLatin1().constData(), "GEOM", "TEMP_IO" ); + Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( theEntry.toUtf8().constData(), "GEOM", "TEMP_IO" ); myDisplayer.Redisplay( io ); } diff --git a/src/GEOMGUI/GEOM_Displayer.cxx b/src/GEOMGUI/GEOM_Displayer.cxx index 56e82b81e..9bf056315 100755 --- a/src/GEOMGUI/GEOM_Displayer.cxx +++ b/src/GEOMGUI/GEOM_Displayer.cxx @@ -776,7 +776,7 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap else if ( !myName.empty() ) { // workaround to allow selection of temporary objects static int tempId = 0; - anIO = new SALOME_InteractiveObject( QString( "TEMP_%1" ).arg( tempId++ ).toLatin1().data(), "GEOM", myName.c_str() ); + anIO = new SALOME_InteractiveObject( QString( "TEMP_%1" ).arg( tempId++ ).toUtf8().data(), "GEOM", myName.c_str() ); AISShape->setIO( anIO ); AISShape->SetOwner( anIO ); } @@ -1047,7 +1047,7 @@ void GEOM_Displayer::updateActorProperties( GEOM_Actor* actor, bool create ) else if ( !myName.empty() ) { // workaround to allow selection of temporary objects static int tempId = 0; - anIO = new SALOME_InteractiveObject( QString( "TEMP_VTK_%1" ).arg( tempId++ ).toLatin1().data(), "GEOM", myName.c_str() ); + anIO = new SALOME_InteractiveObject( QString( "TEMP_VTK_%1" ).arg( tempId++ ).toUtf8().data(), "GEOM", myName.c_str() ); actor->setIO( anIO ); } @@ -1742,7 +1742,7 @@ SALOME_Prs* GEOM_Displayer::buildPresentation( const QString& entry, if ( prs ) { Handle( SALOME_InteractiveObject ) theIO = new SALOME_InteractiveObject(); - theIO->setEntry( entry.toLatin1().constData() ); + theIO->setEntry( entry.toUtf8().constData() ); if ( !theIO.IsNull() ) { // set interactive object @@ -1821,7 +1821,7 @@ SALOME_Prs* GEOM_Displayer::buildSubshapePresentation(const TopoDS_Shape& aShape if (prs) { Handle(SALOME_InteractiveObject) theIO = new SALOME_InteractiveObject(); - theIO->setEntry(entry.toLatin1().constData()); + theIO->setEntry(entry.toUtf8().constData()); if (!theIO.IsNull()) { // set interactive object @@ -2357,7 +2357,7 @@ void GEOM_Displayer::setFieldStepInfo( const GEOM::field_data_type theFieldDataT bool GEOM_Displayer::canBeDisplayed( const QString& entry, const QString& viewer_type ) const { - _PTR(SObject) anObj = getStudy()->studyDS()->FindObjectID( (const char*)entry.toLatin1() ); + _PTR(SObject) anObj = getStudy()->studyDS()->FindObjectID( (const char*)entry.toUtf8() ); GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(anObj)); // enable displaying of GEOM objects GEOM::GEOM_FieldStep_var aFieldStepObj = GEOM::GEOM_FieldStep::_narrow(GeometryGUI::ClientSObjectToObject(anObj)); // enable displaying of GEOM field steps GEOM::GEOM_Gen_var aCompObj = GEOM::GEOM_Gen::_narrow(GeometryGUI::ClientSObjectToObject(anObj)); // enable displaying of whole GEOM component @@ -2746,7 +2746,7 @@ void GEOM_Displayer::EraseWithChildren(const Handle(SALOME_InteractiveObject)& t if(l_obj) foreach ( view, views ) { Handle(SALOME_InteractiveObject) anIO = - new SALOME_InteractiveObject(qPrintable(l_obj->entry()), "GEOM", ""); + new SALOME_InteractiveObject(qUtf8Printable(l_obj->entry()), "GEOM", ""); Erase(anIO, false, false, view); } } diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index 77eb58b35..51e9d0e3d 100755 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -276,7 +276,7 @@ GEOMGUI* GeometryGUI::getLibrary( const QString& libraryName ) while ( it.hasPrevious() ) { QFileInfo fi( Qtx::addSlash( it.previous() ) + libraryName ); if ( fi.exists() ) { - OSD_SharedLibrary aSharedLibrary( fi.fileName().toLatin1().constData() ); + OSD_SharedLibrary aSharedLibrary( fi.fileName().toUtf8().constData() ); bool res = aSharedLibrary.DlOpen( OSD_RTLD_LAZY ); if ( !res ) { MESSAGE( "Can't open library : " << aSharedLibrary.DlError() ); @@ -327,7 +327,7 @@ GEOMPluginGUI* GeometryGUI::getPluginLibrary( const QString& libraryName ) while ( it.hasPrevious() ) { QFileInfo fi( Qtx::addSlash( it.previous() ) + libraryName ); if ( fi.exists() ) { - OSD_SharedLibrary aSharedLibrary( fi.fileName().toLatin1().constData() ); + OSD_SharedLibrary aSharedLibrary( fi.fileName().toUtf8().constData() ); bool res = aSharedLibrary.DlOpen( OSD_RTLD_LAZY ); if ( !res ) { MESSAGE( "Can't open library : " << aSharedLibrary.DlError() ); @@ -2954,13 +2954,13 @@ void GeometryGUI::storeVisualParameters (int savePoint) const PropMap& aProps = o_it.value(); //Check that object exists in the study - _PTR(SObject) obj( studyDS->FindObjectID( o_it.key().toLatin1().data() ) ); + _PTR(SObject) obj( studyDS->FindObjectID( o_it.key().toUtf8().data() ) ); if ( !obj || !(aProps.count() > 0)) continue; // entry is "encoded" = it does NOT contain component address, since it is a // subject to change on next component loading - std::string entry = ip->encodeEntry(o_it.key().toLatin1().data(), componentName); + std::string entry = ip->encodeEntry(o_it.key().toUtf8().data(), componentName); _PTR(GenericAttribute) anAttr; if (!obj->FindAttribute(anAttr, "AttributeIOR")) @@ -3068,7 +3068,7 @@ void GeometryGUI::storeVisualParameters (int savePoint) if ( vType == SOCC_Viewer::Type() && aAnnotationMgr ) { std::string anAnnotationInfo = GetAnnotationMgr()->getDisplayedIndicesInfo( - o_it.key().toLatin1().data(), dynamic_cast(aView) ).toStdString(); + o_it.key().toUtf8().data(), dynamic_cast(aView) ).toStdString(); if (!anAnnotationInfo.empty()) { param = occParam + "ShapeAnnotationVisibleItems"; ip->setParameter(entry, param.toStdString(), anAnnotationInfo); @@ -3086,19 +3086,19 @@ void GeometryGUI::storeVisualParameters (int savePoint) QSet::ConstIterator aEntryIt = anEntriesToStoreShared.constBegin(); for ( ; aEntryIt != anEntriesToStoreShared.constEnd(); ++aEntryIt ) { - std::string aStudyEntry = (*aEntryIt).toLatin1().data(); + std::string aStudyEntry = (*aEntryIt).toUtf8().data(); std::string aStoreEntry = ip->encodeEntry( aStudyEntry, componentName ); // store dimension parameters GEOMGUI_DimensionProperty aDimensions( aStudyEntry ); if ( aDimensions.GetNumber() != 0 ) { - ip->setParameter( aStoreEntry, aDimensionParam.toStdString(), ((QString)aDimensions).toLatin1().data() ); + ip->setParameter( aStoreEntry, aDimensionParam.toStdString(), ((QString)aDimensions).toUtf8().data() ); } _PTR(SObject) aObj( studyDS->FindObjectID( aStudyEntry ) ); const Handle(GEOMGUI_AnnotationAttrs) aShapeAnnAttr = GEOMGUI_AnnotationAttrs::FindAttributes( aObj ); if ( !aShapeAnnAttr.IsNull() ) { - ip->setParameter( aStoreEntry, aAnnotationParam.toStdString(), aShapeAnnAttr->ExportAsPropertyString().toLatin1().data() ); + ip->setParameter( aStoreEntry, aAnnotationParam.toStdString(), aShapeAnnAttr->ExportAsPropertyString().toUtf8().data() ); } } } @@ -3136,7 +3136,7 @@ void GeometryGUI::restoreVisualParameters (int savePoint) // Check that the entry corresponds to a real object in the Study // as the object may be deleted or modified after the visual state is saved. - _PTR(SObject) so = studyDS->FindObjectID(entry.toLatin1().data()); + _PTR(SObject) so = studyDS->FindObjectID(entry.toUtf8().data()); if (!so) continue; //Skip the not existent entry std::vector paramNames = ip->getAllParameterNames( *entIt ); @@ -3180,7 +3180,7 @@ void GeometryGUI::restoreVisualParameters (int savePoint) if ( aParamNameStr == GEOM::propertyName( GEOM::Dimensions ) ) { GEOMGUI_DimensionProperty aDimensionProp( aValuesStr ); - aDimensionProp.SaveToAttribute( entry.toLatin1().data() ); + aDimensionProp.SaveToAttribute( entry.toUtf8().data() ); } else if ( aParamNameStr == GEOM::propertyName( GEOM::ShapeAnnotations ) ) { @@ -3519,7 +3519,7 @@ bool GeometryGUI::renameObject( const QString& entry, const QString& name) return result; } - _PTR(SObject) obj ( aStudy->FindObjectID(qPrintable(entry)) ); + _PTR(SObject) obj ( aStudy->FindObjectID(qUtf8Printable(entry)) ); _PTR(GenericAttribute) anAttr; if ( obj ) { if ( obj->FindAttribute(anAttr, "AttributeName") ) { diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index 1f5bc409d..8c47fce22 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -93,7 +93,7 @@ static bool inUse( const QString& component, const QMap& object std::list<_PTR(SObject)> aSelectedSO; for ( oit = objects.begin(); oit != objects.end(); ++oit ) { - _PTR(SObject) so = study->FindObjectID( oit.key().toLatin1().data() ); + _PTR(SObject) so = study->FindObjectID( oit.key().toUtf8().data() ); if ( !so ) continue; aSelectedSO.push_back(so); @@ -398,7 +398,7 @@ void GEOMToolsGUI::OnEditDelete() continue; // invalid object // ... QString entry = anIObject->getEntry(); - _PTR(SObject) obj = aStudy->FindObjectID( entry.toLatin1().data() ); + _PTR(SObject) obj = aStudy->FindObjectID( entry.toUtf8().data() ); // check parent component QString parentComp = getParentComponent( obj ); if ( parentComp != geomComp ) { @@ -471,7 +471,7 @@ void GEOMToolsGUI::OnEditDelete() if ( isComponentSelected ) { // GEOM component is selected: delete all objects recursively - _PTR(SObject) comp = aStudy->FindObjectID( geomComp.toLatin1().data() ); + _PTR(SObject) comp = aStudy->FindObjectID( geomComp.toUtf8().data() ); if ( !comp ) return; _PTR(ChildIterator) it ( aStudy->NewChildIterator( comp ) ); @@ -499,7 +499,7 @@ void GEOMToolsGUI::OnEditDelete() // ... and then delete all objects QMap::Iterator it; for ( it = toBeDeleted.begin(); it != toBeDeleted.end(); ++it ) { - _PTR(SObject) obj ( aStudy->FindObjectID( it.key().toLatin1().data() ) ); + _PTR(SObject) obj ( aStudy->FindObjectID( it.key().toUtf8().data() ) ); // remove object from GEOM engine removeObjectWithChildren( obj, views, &disp ); // remove objects from study @@ -509,7 +509,7 @@ void GEOMToolsGUI::OnEditDelete() } // ... and then delete all folders for ( it = toBeDelFolders.begin(); it != toBeDelFolders.end(); ++it ) { - _PTR(SObject) obj ( aStudy->FindObjectID( it.key().toLatin1().data() ) ); + _PTR(SObject) obj ( aStudy->FindObjectID( it.key().toUtf8().data() ) ); // remove object from GEOM engine removeObjectWithChildren( obj, views, &disp ); // remove objects from study diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx index bbce1f242..b5420a7bb 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx @@ -858,7 +858,7 @@ void GEOMToolsGUI::OnCreateFolder() _PTR(SObject) aFatherSO(aStudy->FindObjectID(anIObject->getEntry())); if ( !aFatherSO ) return; - GeometryGUI::GetGeomGen()->CreateFolder( tr("NEW_FOLDER_NAME").toLatin1().constData(), + GeometryGUI::GetGeomGen()->CreateFolder( tr("NEW_FOLDER_NAME").toUtf8().constData(), _CAST(SObject, aFatherSO)->GetSObject() ); app->updateObjectBrowser( false ); } diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_LineWidthDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_LineWidthDlg.cxx index 5d2067430..8b98fe1de 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_LineWidthDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_LineWidthDlg.cxx @@ -53,7 +53,7 @@ GEOMToolsGUI_LineWidthDlg::GEOMToolsGUI_LineWidthDlg (QWidget* parent, const QSt setObjectName("GEOMToolsGUI_LineWidthDlg"); setModal(true); - setWindowTitle(tr(title.toLatin1().constData())); + setWindowTitle(tr(title.toUtf8().constData())); setSizeGripEnabled(true); QGridLayout* MyDialogLayout = new QGridLayout(this); MyDialogLayout->setSpacing(6); diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_MarkerDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_MarkerDlg.cxx index 62177da18..2e0605de6 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_MarkerDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_MarkerDlg.cxx @@ -373,7 +373,7 @@ void GEOMToolsGUI_MarkerDlg::browse() filters << tr( "Texture files (*.dat)" ) << tr( "All files (*)" ); QString aFileName = SUIT_Session::session()->activeApplication()->getFileName( true, QString(), filters.join( ";;" ), tr( "LOAD_TEXTURE_TLT" ), this ); if ( !aFileName.isEmpty() ) { - addTexture( myOperation->LoadTexture( aFileName.toLatin1().constData() ), true ); + addTexture( myOperation->LoadTexture( aFileName.toUtf8().constData() ), true ); } } diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_PublishDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_PublishDlg.cxx index baedb6740..e3300d164 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_PublishDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_PublishDlg.cxx @@ -145,7 +145,7 @@ GEOMToolsGUI_PublishDlg::~GEOMToolsGUI_PublishDlg() QTreeWidgetItemIterator it( myTreeWidget ); while ( *it ) { QString entry = myEntryToItem.key( *it ); - _PTR(SObject) SO ( aStudy->FindObjectID( qPrintable( entry ) ) ); + _PTR(SObject) SO ( aStudy->FindObjectID( qUtf8Printable( entry ) ) ); if ( SO ) { GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) ); if ( CORBA::is_nil( aGeomObject ) ) continue; @@ -232,7 +232,7 @@ QTreeWidgetItem* GEOMToolsGUI_PublishDlg::findParentItem(SalomeApp_DataObject* t if( !(aResult = myEntryToItem.value(targetEntry)) ) { if( aParrent != myGeomRoot ) { QString aName; - _PTR(SObject) aSO ( SalomeApp_Application::getStudy()->FindObjectID(qPrintable(aParrent->entry()))); + _PTR(SObject) aSO ( SalomeApp_Application::getStudy()->FindObjectID(qUtf8Printable(aParrent->entry()))); _PTR(GenericAttribute) anAttr; if ( aSO->FindAttribute(anAttr, "AttributeName") ) { _PTR(AttributeName) anAttrName (anAttr); @@ -270,7 +270,7 @@ void GEOMToolsGUI_PublishDlg::buildTree(SalomeApp_DataObject* theItem) { //If object hasn't "AttributeDrawable" => it visible bool isDrawable = true; - _PTR(SObject) SO ( SalomeApp_Application::getStudy()->FindObjectID(qPrintable(theItem->entry()))); + _PTR(SObject) SO ( SalomeApp_Application::getStudy()->FindObjectID(qUtf8Printable(theItem->entry()))); _PTR(GenericAttribute) anAttr; if ( SO && SO->FindAttribute(anAttr, "AttributeDrawable") ) { _PTR(AttributeDrawable) aDrw (anAttr); @@ -323,7 +323,7 @@ void GEOMToolsGUI_PublishDlg::clickOnApply() { QTreeWidgetItem* item = toProcess[i]; if(item) { QString entry = myEntryToItem.key(item); - _PTR(SObject) SO ( aStudy->FindObjectID(qPrintable(entry)) ); + _PTR(SObject) SO ( aStudy->FindObjectID(qUtf8Printable(entry)) ); if(!SO) continue; _PTR(AttributeDrawable) aDrw = aBuilder->FindOrCreateAttribute( SO, "AttributeDrawable" ); aDrw->SetDrawable( true ); @@ -446,7 +446,7 @@ void GEOMToolsGUI_PublishDlg::onItemClicked(QTreeWidgetItem* theItem, int theCol _PTR(Study) aStudy = appStudy->studyDS(); if ( !aStudy ) return; QString entry = myEntryToItem.key( theItem ); - _PTR(SObject) SO ( aStudy->FindObjectID( qPrintable( entry ) ) ); + _PTR(SObject) SO ( aStudy->FindObjectID( qUtf8Printable( entry ) ) ); if ( !SO ) return; GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) ); if ( CORBA::is_nil( aGeomObject ) ) return; diff --git a/src/GEOM_SWIG_WITHIHM/libGEOM_Swig.cxx b/src/GEOM_SWIG_WITHIHM/libGEOM_Swig.cxx index b80e1b30f..21a3897d9 100644 --- a/src/GEOM_SWIG_WITHIHM/libGEOM_Swig.cxx +++ b/src/GEOM_SWIG_WITHIHM/libGEOM_Swig.cxx @@ -347,7 +347,7 @@ void TSetPropertyEvent::Execute() study->setObjectProperty( mgrId, myEntry, myProperty, myValue ); - Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.toLatin1().data(), "GEOM" ); + Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.toUtf8().data(), "GEOM" ); if ( window->isVisible( io ) ) displayer.Redisplay( io, myUpdateViewer ); } diff --git a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx index da51a7bee..c874c8be1 100644 --- a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx @@ -387,7 +387,7 @@ bool GenerationGUI_FillingDlg::execute(ObjectList& objects) aParameters << GroupPoints->SpinBox3->text(); aParameters << GroupPoints->SpinBox4->text(); aParameters << GroupPoints->SpinBox5->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } objects.push_back(anObj._retn()); } diff --git a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx index 379b1fd49..a3985917a 100644 --- a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx @@ -676,7 +676,7 @@ bool GenerationGUI_PrismDlg::execute (ObjectList& objects) if (!anObj->_is_nil() && !IsPreview()) { aParameters << GroupVecH->SpinBox_DX->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } break; case 1: @@ -709,7 +709,7 @@ bool GenerationGUI_PrismDlg::execute (ObjectList& objects) aParameters << GroupDXDYDZ->SpinBox_DX->text(); aParameters << GroupDXDYDZ->SpinBox_DY->text(); aParameters << GroupDXDYDZ->SpinBox_DZ->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } break; } diff --git a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx index 5019de545..13ba637a3 100644 --- a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx @@ -329,7 +329,7 @@ bool GenerationGUI_RevolDlg::execute (ObjectList& objects) if (!IsPreview()) { QStringList aParameters; aParameters << GroupPoints->SpinBox_DX->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } objects.push_back(anObj._retn()); } diff --git a/src/GroupGUI/GroupGUI_GroupDlg.cxx b/src/GroupGUI/GroupGUI_GroupDlg.cxx index 7fe8f4f32..637c9e42a 100644 --- a/src/GroupGUI/GroupGUI_GroupDlg.cxx +++ b/src/GroupGUI/GroupGUI_GroupDlg.cxx @@ -875,7 +875,7 @@ int GroupGUI_GroupDlg::getSelectedSubshapes (TColStd_IndexedMapOfInteger& theMap if (!appStudy) return 0; _PTR(Study) aStudy = appStudy->studyDS(); - _PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toLatin1().constData())); + _PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toUtf8().constData())); GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aSObj)); TopoDS_Shape aShape; @@ -1098,7 +1098,7 @@ void GroupGUI_GroupDlg::activateSelection() int index = aSubShapesMap.FindIndex(aSubShape); QString anEntry = QString( "TEMP_" ) + anEntryBase + QString("_%1").arg(index); Handle(SALOME_InteractiveObject) io = - new SALOME_InteractiveObject(anEntry.toLatin1(), "GEOM", "TEMP_IO"); + new SALOME_InteractiveObject(anEntry.toUtf8(), "GEOM", "TEMP_IO"); if ( myGroupIdList.contains( index ) ) { aDisplayer->SetColor( aCol ); } @@ -1259,7 +1259,7 @@ void GroupGUI_GroupDlg::highlightSubShapes() _PTR(Study) aStudy = appStudy->studyDS(); CORBA::String_var aMainEntry = myMainObj->GetStudyEntry(); QString anEntry = aMainEntry.in(); - _PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toLatin1().constData())); + _PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toUtf8().constData())); _PTR(ChildIterator) anIt (aStudy->NewChildIterator(aSObj)); for (anIt->InitEx(true); anIt->More(); anIt->Next()) { GEOM::GEOM_Object_var aChild = GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(anIt->Value())); @@ -1285,7 +1285,7 @@ void GroupGUI_GroupDlg::highlightSubShapes() if (anIds.Contains(anIndex)) { aSelList.Append(anIO); if (childsMap.contains (anIndex)) { - Handle(SALOME_InteractiveObject) tmpIO = new SALOME_InteractiveObject(childsMap.value(anIndex).toLatin1().constData(), "GEOM", "TEMP_IO"); + Handle(SALOME_InteractiveObject) tmpIO = new SALOME_InteractiveObject(childsMap.value(anIndex).toUtf8().constData(), "GEOM", "TEMP_IO"); aSelList.Append(tmpIO); } } @@ -1392,7 +1392,7 @@ bool GroupGUI_GroupDlg::execute(ObjectList& objects) _PTR(SObject) SO (study->studyDS()->FindObjectIOR(objIOR.toLatin1().constData())); if (SO) { _PTR(StudyBuilder) aBuilder (study->studyDS()->NewBuilder()); - aBuilder->SetName(SO, getNewObjectName().toLatin1().constData()); + aBuilder->SetName(SO, getNewObjectName().toUtf8().constData()); } } } @@ -1450,7 +1450,7 @@ void GroupGUI_GroupDlg::ClickOnOkFilter() ( myLessFilterCheck->isChecked() && !myGreaterFilterCheck->isChecked() && isLess ) || ( myGreaterFilterCheck->isChecked() && !myLessFilterCheck->isChecked() && isGreater ) ) { Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject(); - io->setEntry( anEntry.toLatin1().constData() ); + io->setEntry( anEntry.toUtf8().constData() ); toSelect.Append(io); } } diff --git a/src/MeasureGUI/MeasureGUI_AngleDlg.cxx b/src/MeasureGUI/MeasureGUI_AngleDlg.cxx index b964bcdab..aa408d561 100644 --- a/src/MeasureGUI/MeasureGUI_AngleDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_AngleDlg.cxx @@ -354,7 +354,7 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs() aDimensionStyle->MakeArrows3d( Standard_True ); anIO->SetDimensionAspect( aDimensionStyle ); - anIO->SetDisplayUnits( aUnitsAngle.toLatin1().data() ); + anIO->SetDisplayUnits( aUnitsAngle.toUtf8().data() ); if (aUnitsAngle == "rad") anIO->SetDisplaySpecialSymbol(AIS_DSS_No); @@ -372,7 +372,7 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs() anAngle *= 180. / M_PI; anAngleLabel = "GEOM_MEASURE_ANGLE_DEG"; } - myGrp->TextLabel3->setText(tr(anAngleLabel.toLatin1().data())); + myGrp->TextLabel3->setText(tr(anAngleLabel.toUtf8().data())); int aPrecision = resMgr->integerValue( "Geometry", "angle_precision", 6 ); myGrp->LineEdit3->setText(DlgRef::PrintDoubleValue(anAngle, aPrecision)); diff --git a/src/OBJECT/GEOM_AISShape.cxx b/src/OBJECT/GEOM_AISShape.cxx index d2cbff7b4..588c15a39 100644 --- a/src/OBJECT/GEOM_AISShape.cxx +++ b/src/OBJECT/GEOM_AISShape.cxx @@ -571,7 +571,7 @@ void GEOM_AISShape::drawField( const Handle(Prs3d_Presentation)& thePrs, anAspectText3d->SetColor( myLabelColor ); aGroup->SetPrimitivesAspect( anAspectText3d ); - aGroup->Text( aString.toLatin1().constData(), aVertex, 14 ); + aGroup->Text( aString.toUtf8().constData(), aVertex, 14 ); } } else diff --git a/src/OperationGUI/OperationGUI_ExtractionDlg.cxx b/src/OperationGUI/OperationGUI_ExtractionDlg.cxx index 7837cc027..7a9356bf5 100644 --- a/src/OperationGUI/OperationGUI_ExtractionDlg.cxx +++ b/src/OperationGUI/OperationGUI_ExtractionDlg.cxx @@ -799,7 +799,7 @@ void OperationGUI_ExtractionDlg::onListSelectionChanged() // Collect only displayed sub-shapes for selection in the viewer. QString anEntry = getSubShapeEntry(anIndex); Handle(SALOME_InteractiveObject) anIO = - createIO(anEntry.toLatin1().data()); + createIO(anEntry.toUtf8().data()); anIOList.Append(anIO); } @@ -815,7 +815,7 @@ void OperationGUI_ExtractionDlg::onListSelectionChanged() // Collect only displayed sub-shapes for selection in the viewer. QString anEntry = getSubShapeEntry(anIndex); Handle(SALOME_InteractiveObject) anIO = - createIO(anEntry.toLatin1().data()); + createIO(anEntry.toUtf8().data()); anIOList.Append(anIO); } @@ -1286,7 +1286,7 @@ void OperationGUI_ExtractionDlg::eraseSubShape(const int theId) { QString anEntry = getSubShapeEntry(theId); Handle(SALOME_InteractiveObject) anIO = - createIO(anEntry.toLatin1().data()); + createIO(anEntry.toUtf8().data()); getDisplayer()->Erase(anIO, false, false); myMapDisplayedIDs.Remove(theId); diff --git a/src/OperationGUI/OperationGUI_ExtrudedFeatureDlg.cxx b/src/OperationGUI/OperationGUI_ExtrudedFeatureDlg.cxx index eed2eab83..02ca9b747 100644 --- a/src/OperationGUI/OperationGUI_ExtrudedFeatureDlg.cxx +++ b/src/OperationGUI/OperationGUI_ExtrudedFeatureDlg.cxx @@ -383,7 +383,7 @@ bool OperationGUI_ExtrudedFeatureDlg::execute (ObjectList& objects) aParameters << myGroup->SpinBox_DX->text(); if (myGroup->PushButton3->isChecked()) aParameters << myGroup->SpinBox_DY->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } objects.push_back(anObj._retn()); } diff --git a/src/OperationGUI/OperationGUI_FilletDlg.cxx b/src/OperationGUI/OperationGUI_FilletDlg.cxx index 148546a23..816f1ac81 100644 --- a/src/OperationGUI/OperationGUI_FilletDlg.cxx +++ b/src/OperationGUI/OperationGUI_FilletDlg.cxx @@ -702,7 +702,7 @@ bool OperationGUI_FilletDlg::execute (ObjectList& objects) if (!anObj->_is_nil()) { if (!IsPreview()) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); objects.push_back(anObj._retn()); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx index 799b0dba1..a3b2e6396 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx @@ -415,7 +415,7 @@ bool PrimitiveGUI_BoxDlg::execute (ObjectList& objects) aParameters << GroupDimensions->SpinBox_DX->text(); aParameters << GroupDimensions->SpinBox_DY->text(); aParameters << GroupDimensions->SpinBox_DZ->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; } diff --git a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx index f0ac02fab..ecc0edc92 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx @@ -420,7 +420,7 @@ bool PrimitiveGUI_ConeDlg::execute (ObjectList& objects) aParameters << GroupPoints->SpinBox_DX->text(); aParameters << GroupPoints->SpinBox_DY->text(); aParameters << GroupPoints->SpinBox_DZ->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; } @@ -433,7 +433,7 @@ bool PrimitiveGUI_ConeDlg::execute (ObjectList& objects) aParameters << GroupDimensions->SpinBox_DX->text(); aParameters << GroupDimensions->SpinBox_DY->text(); aParameters << GroupDimensions->SpinBox_DZ->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; break; diff --git a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx index 580335979..45b248870 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx @@ -446,7 +446,7 @@ bool PrimitiveGUI_CylinderDlg::execute (ObjectList& objects) aParameters << GroupPoints->SpinBox_DX->text(); aParameters << GroupPoints->SpinBox_DY->text(); aParameters << GroupPoints->SpinBox_DZ->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; } @@ -457,7 +457,7 @@ bool PrimitiveGUI_CylinderDlg::execute (ObjectList& objects) QStringList aParameters; aParameters << GroupPoints->SpinBox_DX->text(); aParameters << GroupPoints->SpinBox_DY->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; } @@ -472,7 +472,7 @@ bool PrimitiveGUI_CylinderDlg::execute (ObjectList& objects) aParameters << GroupDimensions->SpinBox_DX->text(); aParameters << GroupDimensions->SpinBox_DY->text(); aParameters << GroupDimensions->SpinBox_DZ->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; } @@ -483,7 +483,7 @@ bool PrimitiveGUI_CylinderDlg::execute (ObjectList& objects) QStringList aParameters; aParameters << GroupDimensions->SpinBox_DX->text(); aParameters << GroupDimensions->SpinBox_DY->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; } diff --git a/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx index 720ca7605..cfc199337 100755 --- a/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx @@ -501,7 +501,7 @@ bool PrimitiveGUI_DiskDlg::execute (ObjectList& objects) if (!anObj->_is_nil() && !IsPreview()) { aParameters << GroupDimensions->SpinBox_DX->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; break; @@ -510,7 +510,7 @@ bool PrimitiveGUI_DiskDlg::execute (ObjectList& objects) if (!anObj->_is_nil() && !IsPreview()) { aParameters << GroupPntVecR->SpinBox_DX->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; break; diff --git a/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx index 004692a3e..a99a94c86 100755 --- a/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx @@ -453,7 +453,7 @@ bool PrimitiveGUI_FaceDlg::execute (ObjectList& objects) { aParameters << GroupDimensions->SpinBox_DX->text(); aParameters << GroupDimensions->SpinBox_DY->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; break; @@ -465,7 +465,7 @@ bool PrimitiveGUI_FaceDlg::execute (ObjectList& objects) { aParameters << GroupPlane->SpinBox_DX->text(); aParameters << GroupPlane->SpinBox_DY->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; break; diff --git a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx index 83173ce3f..b76a60d1a 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx @@ -364,7 +364,7 @@ bool PrimitiveGUI_SphereDlg::execute( ObjectList& objects ) { QStringList aParameters; aParameters << GroupPoints->SpinBox_DX->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; } @@ -377,7 +377,7 @@ bool PrimitiveGUI_SphereDlg::execute( ObjectList& objects ) { QStringList aParameters; aParameters << GroupDimensions->SpinBox_DX->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; break; diff --git a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx index f7c4373f1..e6cb17e78 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx @@ -404,7 +404,7 @@ bool PrimitiveGUI_TorusDlg::execute (ObjectList& objects) QStringList aParameters; aParameters << GroupPoints->SpinBox_DX->text(); aParameters << GroupPoints->SpinBox_DY->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; } @@ -416,7 +416,7 @@ bool PrimitiveGUI_TorusDlg::execute (ObjectList& objects) QStringList aParameters; aParameters << GroupDimensions->SpinBox_DX->text(); aParameters << GroupDimensions->SpinBox_DY->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; break; diff --git a/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx b/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx index ba22d601f..b6487a530 100644 --- a/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx +++ b/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx @@ -525,7 +525,7 @@ bool RepairGUI_DivideEdgeDlg::execute( ObjectList& objects ) aParameters << ""; aParameters << myValEdt->text(); aParameters << ""; - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } if ( !IsPreview() ) RepairGUI::ShowStatistics( anOper, this ); diff --git a/src/RepairGUI/RepairGUI_GlueDlg.cxx b/src/RepairGUI/RepairGUI_GlueDlg.cxx index 251426baa..3144f0a58 100644 --- a/src/RepairGUI/RepairGUI_GlueDlg.cxx +++ b/src/RepairGUI/RepairGUI_GlueDlg.cxx @@ -462,7 +462,7 @@ bool RepairGUI_GlueDlg::execute(ObjectList& objects) { QStringList aParameters; aParameters << myTolEdt->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); objects.push_back(anObj._retn()); } @@ -521,7 +521,7 @@ bool RepairGUI_GlueDlg::execute(ObjectList& objects) if (!IsPreview()) { QStringList aParameters; aParameters << myTolEdt2->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } objects.push_back(anObj._retn()); } @@ -640,7 +640,7 @@ bool RepairGUI_GlueDlg::onAcceptLocal() if (aName.isEmpty()) aName = GEOMBase::GetDefaultName(getPrefix(*it)); } - addInStudy(*it, aName.toLatin1().data()); + addInStudy(*it, aName.toUtf8().data()); display(*it, false); } diff --git a/src/RepairGUI/RepairGUI_InspectObjectDlg.cxx b/src/RepairGUI/RepairGUI_InspectObjectDlg.cxx index 8b61bcf19..5f1328f6c 100644 --- a/src/RepairGUI/RepairGUI_InspectObjectDlg.cxx +++ b/src/RepairGUI/RepairGUI_InspectObjectDlg.cxx @@ -145,7 +145,7 @@ RepairGUI_InspectObjectDlg::TreeWidgetItem::TreeWidgetItem myShape( shape ), myTolerance (theTolerance) { - myIO = new SALOME_InteractiveObject( entry.toLatin1(), "GEOM", "TEMP_IO" ); + myIO = new SALOME_InteractiveObject( entry.toUtf8(), "GEOM", "TEMP_IO" ); setFlags( flags() | Qt::ItemIsEditable ); } diff --git a/src/RepairGUI/RepairGUI_LimitToleranceDlg.cxx b/src/RepairGUI/RepairGUI_LimitToleranceDlg.cxx index 179358553..daddabfd9 100644 --- a/src/RepairGUI/RepairGUI_LimitToleranceDlg.cxx +++ b/src/RepairGUI/RepairGUI_LimitToleranceDlg.cxx @@ -304,7 +304,7 @@ bool RepairGUI_LimitToleranceDlg::execute(ObjectList& objects) if (aResult) { QStringList aParameters; aParameters << myTolEdt->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); if ( !IsPreview() ) RepairGUI::ShowStatistics( anOper, this ); objects.push_back(anObj._retn()); @@ -364,7 +364,7 @@ bool RepairGUI_LimitToleranceDlg::onAcceptLocal() if (aName.isEmpty()) aName = GEOMBase::GetDefaultName(getPrefix(*it)); } - addInStudy(*it, aName.toLatin1().data()); + addInStudy(*it, aName.toUtf8().data()); display(*it, false); } diff --git a/src/RepairGUI/RepairGUI_SewingDlg.cxx b/src/RepairGUI/RepairGUI_SewingDlg.cxx index 0050245b9..4a4873d3d 100644 --- a/src/RepairGUI/RepairGUI_SewingDlg.cxx +++ b/src/RepairGUI/RepairGUI_SewingDlg.cxx @@ -319,7 +319,7 @@ bool RepairGUI_SewingDlg::execute( ObjectList& objects ) { QStringList aParameters; aParameters << myTolEdt->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } objects.push_back( anObj._retn() ); } diff --git a/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx b/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx index f6df0de29..5117536f0 100755 --- a/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx +++ b/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx @@ -703,7 +703,7 @@ bool RepairGUI_ShapeProcessDlg::execute( ObjectList& objects ) aParameters << QString( aParams[i] ); aParameters << getTexts( aParams ); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); RepairGUI::ShowStatistics( anOper, this ); } diff --git a/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx b/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx index b34504186..da59033d1 100644 --- a/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx +++ b/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx @@ -223,7 +223,7 @@ void RepairGUI_SuppressFacesDlg::SelectionIntoArgument() Handle(SALOME_InteractiveObject) anIO = anIter.Value(); QString anEntry = anIO->getEntry(); - _PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toLatin1().constData())); + _PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toUtf8().constData())); GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aSObj)); TopoDS_Shape aShape; diff --git a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx index ecf1f3cd1..599f43bb7 100644 --- a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx @@ -527,7 +527,7 @@ bool TransformationGUI_MultiRotationDlg::execute (ObjectList& objects) if (!anObj->_is_nil()) { if (!IsPreview()) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); objects.push_back(anObj._retn()); } diff --git a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx index c867be1d7..413a501e9 100644 --- a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx @@ -687,7 +687,7 @@ bool TransformationGUI_MultiTranslationDlg::execute (ObjectList& objects) if (!anObj->_is_nil()) { if (!IsPreview()) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); objects.push_back(anObj._retn()); } diff --git a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx index 64d262057..1c6da59e2 100644 --- a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx @@ -271,7 +271,7 @@ bool TransformationGUI_OffsetDlg::execute( ObjectList& objects ) anObj = anOper->OffsetShapeCopy( myObjects[i].get(), GetOffset(), GetIsJoinByPipes() ); if ( !anObj->_is_nil() ) { if(!IsPreview()) { - anObj->SetParameters(GroupPoints->SpinBox_DX->text().toLatin1().constData()); + anObj->SetParameters(GroupPoints->SpinBox_DX->text().toUtf8().constData()); } objects.push_back( anObj._retn() ); } diff --git a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx index d7cf7b6b2..97fda2329 100644 --- a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx @@ -497,7 +497,7 @@ bool TransformationGUI_RotationDlg::execute (ObjectList& objects) anObj = anOper->RotateCopy(myObjects[i].get(), myAxis.get(), GetAngle() * M_PI / 180.); if (!anObj->_is_nil()) { if(!IsPreview()) { - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } objects.push_back(anObj._retn()); } @@ -509,7 +509,7 @@ bool TransformationGUI_RotationDlg::execute (ObjectList& objects) anObj = anOper->Rotate(myObjects[i].get(), myAxis.get(), GetAngle() * M_PI / 180.); if (!anObj->_is_nil()) { if(!IsPreview()) { - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); updateAttributes(anObj, aParameters); } objects.push_back(anObj._retn()); diff --git a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx index 5a8930bd7..6aab80728 100644 --- a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx @@ -442,7 +442,7 @@ bool TransformationGUI_ScaleDlg::execute (ObjectList& objects) anObj = anOper->ScaleShapeCopy(myObjects[i].get(), myPoint.get(), SpinBox_FX->value()); if (!anObj->_is_nil()) { if(!IsPreview()) - anObj->SetParameters(SpinBox_FX->text().toLatin1().constData()); + anObj->SetParameters(SpinBox_FX->text().toUtf8().constData()); objects.push_back(anObj._retn()); } } @@ -472,7 +472,7 @@ bool TransformationGUI_ScaleDlg::execute (ObjectList& objects) aParameters<text(); aParameters<text(); aParameters<text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } objects.push_back(anObj._retn()); } diff --git a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx index 6057a591f..33ebec246 100644 --- a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx @@ -511,7 +511,7 @@ bool TransformationGUI_TranslationDlg::execute (ObjectList& objects) anObj = anOper->TranslateDXDYDZCopy(myObjects[i].get(), dx, dy, dz); if (!anObj->_is_nil()) { if(!IsPreview()) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); objects.push_back(anObj._retn()); } } @@ -522,7 +522,7 @@ bool TransformationGUI_TranslationDlg::execute (ObjectList& objects) anObj = anOper->TranslateDXDYDZ(myObjects[i].get(), dx, dy, dz); if (!anObj->_is_nil()) { if(!IsPreview()) { - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); updateAttributes(anObj, aParameters); } objects.push_back(anObj._retn()); @@ -567,7 +567,7 @@ bool TransformationGUI_TranslationDlg::execute (ObjectList& objects) anObj = anOper->TranslateVectorDistance(myObjects[i].get(), myVector.get(), aDistance, toCreateCopy); if (!anObj->_is_nil()) { if(!IsPreview()) { - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); if (!toCreateCopy) updateAttributes(anObj, aParameters); } diff --git a/src/XAOPlugin/XAOPlugin_ImportDlg.cxx b/src/XAOPlugin/XAOPlugin_ImportDlg.cxx index 398c670b6..4aa4aed83 100644 --- a/src/XAOPlugin/XAOPlugin_ImportDlg.cxx +++ b/src/XAOPlugin/XAOPlugin_ImportDlg.cxx @@ -332,7 +332,7 @@ QString XAOPlugin_ImportDlg::addFieldInStudy( GEOM::GEOM_Field_ptr theField, GEO GEOM::GEOM_FieldStep_ptr step = theField->GetStep(steps[i]); QString stepName = (tr("XAOPLUGIN_STEP") + " %1 %2").arg( step->GetID() ).arg( step->GetStamp() ); SALOMEDS::SObject_wrap aSOField = - getGeomEngine()->AddInStudy( step, stepName.toLatin1().constData(), theField ); + getGeomEngine()->AddInStudy( step, stepName.toUtf8().constData(), theField ); step->UnRegister(); } -- 2.39.2