Salome HOME
Unicode support: correct handling of unicode on GUI level
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ComputeDlg.cxx
index fa746f19a679bbee85c03ec280dffcb652fd0213..74b9f61e37cbbf737308aec55b919136f71e9fe2 100644 (file)
@@ -1229,7 +1229,7 @@ void SMESHGUI_BaseComputeOp::showComputeResult( const bool theMemoryLack,
       currentCellChanged(); // to update buttons
     }
   }
-  // show dialog and wait, becase Compute can be invoked from Preview operation
+  // show dialog and wait, because Compute can be invoked from Preview operation
   //aCompDlg->exec(); // this way it becomes modal - impossible to rotate model in the Viewer
   aCompDlg->show();
 }
@@ -1280,7 +1280,7 @@ void SMESHGUI_BaseComputeOp::onPublishShape()
       {
         QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( myMainShape, "MAIN_SHAPE" ));
         SALOMEDS::SObject_wrap so = geomGen->AddInStudy( myMainShape,
-                                                         name.toLatin1().data(),
+                                                         name.toUtf8().data(),
                                                          GEOM::GEOM_Object::_nil());
         // look for myMainShape in the table
         for ( int r = 0, nr = table()->rowCount(); r < nr; ++r ) {
@@ -1299,7 +1299,7 @@ void SMESHGUI_BaseComputeOp::onPublishShape()
       }
       QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( shape, "ERROR_SHAPE" ));
       SALOMEDS::SObject_wrap so = geomGen->AddInStudy( shape,
-                                                       name.toLatin1().data(), myMainShape);
+                                                       name.toUtf8().data(), myMainShape);
       if ( !so->_is_nil() ) {
         CORBA::String_var name  = so->GetName();
         CORBA::String_var entry = so->GetID();
@@ -1370,7 +1370,7 @@ void SMESHGUI_BaseComputeOp::onGroupOfBadMesh()
       else                    grName = "bad mesh of " + grName;
       SMESH::SMESH_Gen_var gen = getSMESHGUI()->GetSMESHGen();
       SMESH::ListOfGroups_var groups
-        ( gen->MakeGroupsOfBadInputElements(myMesh,curSub,grName.toLatin1().data()) );
+        ( gen->MakeGroupsOfBadInputElements(myMesh,curSub,grName.toUtf8().data()) );
       update( UF_ObjBrowser | UF_Model );
       if( LightApp_Application* anApp = dynamic_cast<LightApp_Application*>( application() ))
       {
@@ -1535,7 +1535,7 @@ SMESHGUI_ComputeOp::SMESHGUI_ComputeOp()
 
 //================================================================================
 /*!
- * \brief Desctructor
+ * \brief Destructor
 */
 //================================================================================
 
@@ -1978,9 +1978,7 @@ void SMESHGUI_PrecomputeOp::onPreview()
   
   SMESH::long_array_var aShapesId = new SMESH::long_array();
   try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
     OCC_CATCH_SIGNALS;
-#endif
       
     SMESH::MeshPreviewStruct_var previewData =
       gen->Precompute(myMesh, myMainShape, (SMESH::Dimension)dim, aShapesId);
@@ -2003,9 +2001,7 @@ void SMESHGUI_PrecomputeOp::onPreview()
   }
 
   try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
     OCC_CATCH_SIGNALS;
-#endif
     aCompErrors = gen->GetComputeErrors( myMesh, myMainShape );
     // check if there are memory problems
     for ( CORBA::ULong i = 0; (i < aCompErrors->length()) && !memoryLack; ++i )
@@ -2152,7 +2148,7 @@ SMESHGUI_EvaluateOp::SMESHGUI_EvaluateOp()
 
 //================================================================================
 /*!
- * \brief Desctructor
+ * \brief Destructor
 */
 //================================================================================
 
@@ -2221,9 +2217,7 @@ void SMESHGUI_BaseComputeOp::evaluateMesh()
     }
     SUIT_OverrideCursor aWaitCursor;
     try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
       OCC_CATCH_SIGNALS;
-#endif
       aRes = gen->Evaluate(myMesh, myMainShape);
     }
     catch(const SALOME::SALOME_Exception & S_ex){
@@ -2231,9 +2225,7 @@ void SMESHGUI_BaseComputeOp::evaluateMesh()
     }
 
     try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
       OCC_CATCH_SIGNALS;
-#endif
       aCompErrors = gen->GetComputeErrors( myMesh, myMainShape );
     }
     catch(const SALOME::SALOME_Exception & S_ex){
@@ -2391,7 +2383,7 @@ void SMESHGUI_BaseComputeOp::showEvaluateResult(const SMESH::long_array& theRes,
       currentCellChanged(); // to update buttons
     }
   }
-  // show dialog and wait, becase Compute can be invoked from Preview operation
+  // show dialog and wait, because Compute can be invoked from Preview operation
   //aCompDlg->exec(); // this way it becomes modal - impossible to rotate model in the Viewer
   aCompDlg->show();
 }