if ( vals->length() == nbRows * nbComps )
for ( int iV = 0, iR = 0; iR < nbRows; ++iR )
for ( int iC = 1; iC < nbColumns; ++iC )
- setItem( iR, iC, new QTableWidgetItem( vals[ iV++ ].in() ));
+ setItem( iR, iC, new QTableWidgetItem( QString::fromUtf8( vals[ iV++ ].in() ) ) );
}
break;
}
myIsCreation = false;
CORBA::String_var fName = myField->GetName();
- myMainFrame->ResultName->setText( fName.in() );
+ myMainFrame->ResultName->setText( QString::fromUtf8( fName.in() ) );
myShape = myField->GetShape();
CORBA::String_var sName;
if ( !myShape->_is_nil() )
sName = myShape->GetName();
- myShapeName->setText( sName.in() ? sName.in() : "");
+ myShapeName->setText( QString::fromUtf8( sName.in() ? sName.in() : "" ) );
myTypeCombo->setCurrentIndex( myField->GetDataType() );
{
GEOM::string_array_var compNames = myField->GetComponents();
for ( int iC = 0; iC < compNames->length(); ++iC )
- headers << compNames[ iC ].in();
+ headers << QString::fromUtf8( compNames[ iC ].in() );
}
else
{
{
GEOM::string_array_var aValues = aGeomStringFieldStep->GetValues();
for( size_t i = 0, n = aValues->length(); i < n; i++ )
- aFieldStepData << QString( aValues[i] );
+ aFieldStepData << QString::fromUtf8( aValues[i].in() );
}
}
QString plugin_name;
for ( size_t i = 0; i < info->params.length(); ++i ) {
- myCreationInfoWdg->addParam( info->params[i].name.in(),
- info->params[i].value.in() );
+ myCreationInfoWdg->addParam( QString::fromUtf8( info->params[i].name.in() ),
+ QString::fromUtf8( info->params[i].value.in() ) );
QString value = info->params[i].name.in();
if( value == PLUGIN_NAME ) {
plugin_name = info->params[i].value.in();
if ( !comps.IsNull() )
{
compArr->length( comps->Length() );
- std::string entry;
int i, i0, nb;
for ( i = i0 = comps->Lower(), nb = comps->Upper(); i <= nb; ++i )
{
const TCollection_ExtendedString& anEntry = comps->Value( i );
- entry.resize( anEntry.LengthOfCString() );
- char* pstr = &entry[0];
- anEntry.ToUTF8CString( pstr );
- compArr[ i-i0 ] = CORBA::string_dup( entry.c_str() );
+ compArr[ i-i0 ] = CORBA::string_dup( TCollection_AsciiString( anEntry ).ToCString() );
}
}
return compArr._retn();
if ( !values.IsNull() )
{
resArray->length( values->Length() );
- std::string entry;
int i, i0, nb;
for ( i = i0 = values->Lower(), nb = values->Upper(); i <= nb; ++i )
{
const TCollection_ExtendedString& anEntry = values->Value( i );
- entry.resize( anEntry.LengthOfCString() );
- char* pstr = &entry[0];
- anEntry.ToUTF8CString( pstr );
- resArray[ i-i0 ] = CORBA::string_dup( entry.c_str() );
+ resArray[ i-i0 ] = CORBA::string_dup( TCollection_AsciiString( anEntry ).ToCString() );
}
}
return resArray._retn();
{
QListWidgetItem* item = new QListWidgetItem();
item->setData(Qt::UserRole, QVariant(i));
- item->setText(fields[i]->GetName());
+ item->setText(QString::fromUtf8(fields[i]->GetName()));
item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
item->setCheckState(Qt::Checked);
lstFields->addItem(item);
// call engine function
GEOM::IXAOOperations_var aXAOOp = GEOM::IXAOOperations::_narrow( getOperation() );
res = aXAOOp->ExportXAO(m_mainObj, groups, fields,
- author.toStdString().c_str(),
- fileName.toStdString().c_str());
+ author.toUtf8().data(),
+ fileName.toUtf8().data());
return res;
}