X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSalomeApp%2FSalomeApp_NoteBook.cxx;h=5467ef600ae5e70bb5d5bf8d48d6feb9bb3a1a47;hb=331294345d3e1716fbf79ae25a2851011729be79;hp=64d75941f1a2bc7996fd903d6e258720d1c8e282;hpb=4bcb2f56e92b7eab9f660cb78e8a52121194b0ff;p=modules%2Fgui.git diff --git a/src/SalomeApp/SalomeApp_NoteBook.cxx b/src/SalomeApp/SalomeApp_NoteBook.cxx index 64d75941f..5467ef600 100644 --- a/src/SalomeApp/SalomeApp_NoteBook.cxx +++ b/src/SalomeApp/SalomeApp_NoteBook.cxx @@ -564,7 +564,7 @@ void NoteBook_Table::onItemChanged(QTableWidgetItem* theItem) if( myVariableMap.contains( anIndex ) ) { const NoteBoox_Variable& aVariable = myVariableMap[ anIndex ]; - if( !aVariable.Name.isEmpty() && SalomeApp_Application::getStudy()->IsVariableUsed( std::string( aVariable.Name.toLatin1().constData() ) ) ) + if( !aVariable.Name.isEmpty() && SalomeApp_Application::getStudy()->IsVariableUsed( std::string( aVariable.Name.toUtf8().constData() ) ) ) { if( QMessageBox::warning( parentWidget(), tr( "WARNING" ), tr( "RENAME_VARIABLE_IS_USED" ).arg( aVariable.Name ), @@ -677,7 +677,7 @@ void NoteBook_Table::RemoveSelected() else { int nRow = row(aSelectedItems[i]); - if( aStudy->IsVariableUsed( std::string( aRow->GetName().toLatin1().constData() ) ) ) + if( aStudy->IsVariableUsed( std::string( aRow->GetName().toUtf8().constData() ) ) ) { if( QMessageBox::warning( parentWidget(), tr( "WARNING" ), tr( "REMOVE_VARIABLE_IS_USED" ).arg( aRow->GetName() ), @@ -695,7 +695,7 @@ void NoteBook_Table::RemoveSelected() myVariableMap.remove( index ); removeRow(nRow); myRows.removeAt(nRow); - if(aStudy->IsVariable(aVarName.toLatin1().constData())) + if(aStudy->IsVariable(aVarName.toUtf8().constData())) removedFromStudy = true; } } @@ -849,7 +849,7 @@ void SalomeApp_NoteBook::onApply() if( aVariableMapRef.contains( anIndex ) ) { QString aRemovedVariable = aVariableMapRef[ anIndex ].Name; - aStudy->RemoveVariable( std::string( aRemovedVariable.toLatin1().constData() ) ); + aStudy->RemoveVariable( std::string( aRemovedVariable.toUtf8().constData() ) ); } } @@ -871,22 +871,22 @@ void SalomeApp_NoteBook::onApply() if( !aNameRef.isEmpty() && !aValueRef.isEmpty() && aNameRef != aName ) { - aStudy->RenameVariable( std::string( aNameRef.toLatin1().constData() ), - std::string( aName.toLatin1().constData() ) ); + aStudy->RenameVariable( std::string( aNameRef.toUtf8().constData() ), + std::string( aName.toUtf8().constData() ) ); } } if( NoteBook_TableRow::IsIntegerValue(aValue,&anIVal) ) - aStudy->SetInteger(std::string(aName.toLatin1().constData()),anIVal); + aStudy->SetInteger(std::string(aName.toUtf8().constData()),anIVal); else if( NoteBook_TableRow::IsRealValue(aValue,&aDVal) ) - aStudy->SetReal(std::string(aName.toLatin1().constData()),aDVal); + aStudy->SetReal(std::string(aName.toUtf8().constData()),aDVal); else if( NoteBook_TableRow::IsBooleanValue(aValue,&aBVal) ) - aStudy->SetBoolean(std::string(aName.toLatin1().constData()),aBVal); + aStudy->SetBoolean(std::string(aName.toUtf8().constData()),aBVal); else - aStudy->SetString(std::string(aName.toLatin1().constData()),aValue.toStdString()); + aStudy->SetString(std::string(aName.toUtf8().constData()),aValue.toStdString()); } } myTable->ResetMaps();