From 1af3482f8d341f48642e0bd5c7eddd0172758f8e Mon Sep 17 00:00:00 2001 From: stv Date: Fri, 17 Jun 2005 07:33:08 +0000 Subject: [PATCH] Fixes for compilation errors. --- src/VISUGUI/VisuGUI.cxx | 10 +++++----- src/VISUGUI/VisuGUI_Selection.cxx | 2 +- src/VISUGUI/VisuGUI_TableDlg.cxx | 16 +++++++--------- src/VISUGUI/VisuGUI_Tools.cxx | 2 +- src/VISU_I/VISUConfig.hh | 3 +++ src/VISU_I/VISU_View_i.cc | 4 ++-- 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index be5ed4bc..c3b0bbfe 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -277,7 +277,7 @@ CreateCurves( SalomeApp_Module* theModule, return; _PTR(Study) aStudy = GetCStudy( GetAppStudy( theModule ) ); - _PTR(SObject) aSObject = aStudy->FindObjectID( thePrs->GetEntry() ); + _PTR(SObject) aSObject = aStudy->FindObjectID( thePrs->GetEntry().latin1() ); if ( !theCreate && aSObject ){ // Remove old Table @@ -1224,7 +1224,7 @@ OnDeleteObject() if (CORBA::is_nil(aChildObj)) continue; CORBA::Object_ptr aCurve = VISU::Curve::_narrow(aChildObj); if (CORBA::is_nil(aCurve)) continue; - VISU::Curve_i* pCurve = dynamic_cast(VISU::GetServant(aCurve).in()); + //VISU::Curve_i* pCurve = dynamic_cast(VISU::GetServant(aCurve).in()); //jfa tmp:DeleteCurve(this, pCurve, NULL); } break; @@ -1264,7 +1264,7 @@ OnPlotData() // get name of SObject if ( SO->FindAttribute( anAttr, "AttributeName" ) ) { aName = anAttr; - SOName = aName->Value(); + SOName = QString( aName->Value().c_str() ); } SPlot2d_SetupPlot2dDlg* dlg = new SPlot2d_SetupPlot2dDlg( SO, GetDesktop( this ) ); if ( dlg->exec() == QDialog::Accepted ) { @@ -1326,7 +1326,7 @@ OnPlotData() // get name of SObject if ( SO->FindAttribute( anAttr, "AttributeName" ) ) { aName = anAttr; - SOName = aName->Value(); + SOName = QString( aName->Value().c_str() ); } SPlot2d_SetupPlot2dDlg* dlg = new SPlot2d_SetupPlot2dDlg( SO, GetDesktop( this ) ); if ( dlg->exec() == QDialog::Accepted ) { @@ -1536,7 +1536,7 @@ OnRename() _PTR(GenericAttribute) anAttr; if (aSObj->FindAttribute(anAttr, "AttributeName")) { _PTR(AttributeName) aName (anAttr); - QString Name = VisuGUI_NameDlg::getName(GetDesktop(this), aName->Value()); + QString Name = VisuGUI_NameDlg::getName( GetDesktop( this ), aName->Value().c_str() ); if (!Name.isEmpty()) { QApplication::setOverrideCursor(Qt::waitCursor); diff --git a/src/VISUGUI/VisuGUI_Selection.cxx b/src/VISUGUI/VisuGUI_Selection.cxx index 2f59ddf6..e31fe508 100644 --- a/src/VISUGUI/VisuGUI_Selection.cxx +++ b/src/VISUGUI/VisuGUI_Selection.cxx @@ -387,7 +387,7 @@ void VisuGUI_SelectionDlg::onSelectionEvent() { if (aSObject->FindAttribute(anAttr, "AttributeComment")) { _PTR(AttributeComment) aComment (anAttr); std::string aString = aComment->Value(); - QString strIn (aString); + QString strIn( aString.c_str() ); VISU::Storable::StrToMap(strIn, aMap); } } diff --git a/src/VISUGUI/VisuGUI_TableDlg.cxx b/src/VISUGUI/VisuGUI_TableDlg.cxx index 1d211460..24443ef7 100644 --- a/src/VISUGUI/VisuGUI_TableDlg.cxx +++ b/src/VISUGUI/VisuGUI_TableDlg.cxx @@ -207,16 +207,16 @@ void VisuGUI_TableDlg::onOK() } if ( !bEmptyRow ) { // Skip rows with no data !!! // set row title - tblIntAttr->SetRowTitle( nRow+1, rowTitles[ i ].isNull() ? QString( "" ) : QString( rowTitles[ i ] ) ); + tblIntAttr->SetRowTitle( nRow+1, rowTitles[ i ].isNull() ? "" : rowTitles[ i ].latin1() ); // set row unit - tblIntAttr->SetRowUnit( nRow+1, units[ i ].isNull() ? QString( "" ) : QString( units[ i ] ) ); + tblIntAttr->SetRowUnit( nRow+1, units[ i ].isNull() ? "" : units[ i ].latin1() ); nRow++; } } if ( nRow > 0 ) { // Set columns only if table is not empty, otherwise exception is raised !!! // column titles for ( i = 0; i < colTitles.count(); i++ ) - tblIntAttr->SetColumnTitle( i+1, colTitles[ i ].isNull() ? QString( "" ) : QString( colTitles[ i ] ) ); + tblIntAttr->SetColumnTitle( i+1, colTitles[ i ].isNull() ? "" : colTitles[ i ].latin1() ); } } // title @@ -251,16 +251,16 @@ void VisuGUI_TableDlg::onOK() } if ( !bEmptyRow ) { // Skip rows with no data !!! // set row title - tblRealAttr->SetRowTitle( nRow+1, rowTitles[ i ].isNull() ? QString( "" ) : QString( rowTitles[ i ] ) ); + tblRealAttr->SetRowTitle( nRow+1, rowTitles[ i ].isNull() ? "" : rowTitles[ i ].latin1() ); // set row unit - tblRealAttr->SetRowUnit( nRow+1, units[ i ].isNull() ? QString( "" ) : QString( units[ i ] ) ); + tblRealAttr->SetRowUnit( nRow+1, units[ i ].isNull() ? "" : units[ i ].latin1() ); nRow++; } } if ( nRow > 0 ) { // Set columns only if table is not empty, otherwise exception is raised !!! // column titles for ( i = 0; i < colTitles.count(); i++ ) - tblRealAttr->SetColumnTitle( i+1, colTitles[ i ].isNull() ? QString( "" ) : QString( colTitles[ i ] ) ); + tblRealAttr->SetColumnTitle( i+1, colTitles[ i ].isNull() ? "" : colTitles[ i ].latin1() ); } } // title @@ -302,7 +302,6 @@ void VisuGUI_TableDlg::initDlg() // Table of integer if ( tblIntAttr && myIntTable ) { try { - VisuGUI_Table* tbl = myIntTable->getTable(); // title myIntTable->setTableTitle( tblIntAttr->GetTitle().c_str() ); // nb of rows & cols @@ -335,7 +334,7 @@ void VisuGUI_TableDlg::initDlg() vector rowUnits = tblIntAttr->GetRowUnits(); if ( rowUnits.size() > 0 ) { for ( i = 0; i < nbRows; i++ ) - strlist.append( rowUnits[i] ); + strlist.append( rowUnits[i].c_str() ); myIntTable->setUnits( strlist ); } // data @@ -358,7 +357,6 @@ void VisuGUI_TableDlg::initDlg() // Table of real if ( tblRealAttr && myRealTable ) { try { - VisuGUI_Table* tbl = myRealTable->getTable(); // title myRealTable->setTableTitle( tblRealAttr->GetTitle().c_str() ); // nb of rows & cols diff --git a/src/VISUGUI/VisuGUI_Tools.cxx b/src/VISUGUI/VisuGUI_Tools.cxx index 3b89ae5d..d48e9fc1 100644 --- a/src/VISUGUI/VisuGUI_Tools.cxx +++ b/src/VISUGUI/VisuGUI_Tools.cxx @@ -620,7 +620,7 @@ namespace VISU QList clist; aPlot->getCurves( clist ); _PTR(Study) aStudy = GetCStudy( GetAppStudy( theModule ) ); - _PTR(SObject) TableSO = aStudy->FindObjectID( table->GetEntry() ); + _PTR(SObject) TableSO = aStudy->FindObjectID( table->GetEntry().latin1() ); if ( TableSO ) { _PTR(ChildIterator) Iter = aStudy->NewChildIterator( TableSO ); for ( ; Iter->More(); Iter->Next() ) { diff --git a/src/VISU_I/VISUConfig.hh b/src/VISU_I/VISUConfig.hh index 4b2f12b1..895ee959 100644 --- a/src/VISU_I/VISUConfig.hh +++ b/src/VISU_I/VISUConfig.hh @@ -30,7 +30,10 @@ // standard C++ headers #include #include + +#include #include + #include #include #include diff --git a/src/VISU_I/VISU_View_i.cc b/src/VISU_I/VISU_View_i.cc index 4f0ce8a5..00f75961 100644 --- a/src/VISU_I/VISU_View_i.cc +++ b/src/VISU_I/VISU_View_i.cc @@ -842,7 +842,7 @@ namespace VISU{ } // is it Table ? if (Table_i* aTable = dynamic_cast(VISU::GetServant(myPrsObj).in())) { - _PTR(SObject) TableSO = myStudy->FindObjectID(aTable->GetEntry()); + _PTR(SObject) TableSO = myStudy->FindObjectID(aTable->GetEntry().latin1()); if (TableSO) { _PTR(ChildIterator) Iter = myStudy->NewChildIterator(TableSO); for (; Iter->More(); Iter->Next()) { @@ -1077,7 +1077,7 @@ namespace VISU{ if (MYDEBUG) MESSAGE("View3D_i::RestoreViewPoint - anEntry = " << anEntry); if (anObj->FindAttribute(anAttr, "AttributeComment")) { _PTR(AttributeComment) aCmnt (anAttr); - QString strIn (aCmnt->Value()); + QString strIn(aCmnt->Value().c_str()); Storable::TRestoringMap aMap; Storable::StrToMap(strIn, aMap); if (Storable::FindValue(aMap, "myComment").compare -- 2.30.2