Salome HOME
Fixes for compilation errors.
authorstv <stv@opencascade.com>
Fri, 17 Jun 2005 07:33:08 +0000 (07:33 +0000)
committerstv <stv@opencascade.com>
Fri, 17 Jun 2005 07:33:08 +0000 (07:33 +0000)
src/VISUGUI/VisuGUI.cxx
src/VISUGUI/VisuGUI_Selection.cxx
src/VISUGUI/VisuGUI_TableDlg.cxx
src/VISUGUI/VisuGUI_Tools.cxx
src/VISU_I/VISUConfig.hh
src/VISU_I/VISU_View_i.cc

index be5ed4bc12eb45ee475ce0c60c96024d5ae4ff13..c3b0bbfef4b58f9272ba13bc93287d8acc0d1360 100644 (file)
@@ -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::Curve_i*>(VISU::GetServant(aCurve).in());
+              //VISU::Curve_i* pCurve = dynamic_cast<VISU::Curve_i*>(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);
 
index 2f59ddf6c58a1a1de0b0633dc369ecd8e4576e65..e31fe50820151db2f371f08415d323baae3ccf7c 100644 (file)
@@ -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);
       }
     }
index 1d211460aca846d4494b43d5ac601823ddebb1a8..24443ef7b6cdb5fa0e6972fd08a10d143b82876c 100644 (file)
@@ -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<string> 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
index 3b89ae5d1be1befacc2551344abe75c309869209..d48e9fc1a2f9965def09e2a3ae31355b4b36f287 100644 (file)
@@ -620,7 +620,7 @@ namespace VISU
     QList<Plot2d_Curve> 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() ) {
index 4b2f12b1c3816a336e7ef7bd6e0bb1c5627af8c9..895ee9592caa1d2a82fb3ecc8270523dba88cfab 100644 (file)
 // standard C++ headers
 #include <stdio.h>
 #include <iostream>
+
+#include <map>
 #include <string>
+
 #include <qstring.h> 
 #include <qthread.h> 
 #include <qfileinfo.h>
index 4f0ce8a53b50ca0caf35605a7402ec23179af7f4..00f75961c9f9cd6acd5298c15d23168d4958d0f8 100644 (file)
@@ -842,7 +842,7 @@ namespace VISU{
       }
       // is it Table ?
       if (Table_i* aTable = dynamic_cast<Table_i*>(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