From: sln Date: Tue, 13 Feb 2007 07:58:28 +0000 (+0000) Subject: Errors of Linux compilation was fixed X-Git-Tag: CTH_V12~19 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3664e4b9e18494632eb3e0e28c30d9b1bb8d95a0;p=modules%2Fgui.git Errors of Linux compilation was fixed --- diff --git a/src/DDS/DDS_DicGroup.cxx b/src/DDS/DDS_DicGroup.cxx index 56197a523..8f2312cc0 100644 --- a/src/DDS/DDS_DicGroup.cxx +++ b/src/DDS/DDS_DicGroup.cxx @@ -30,6 +30,8 @@ #include #include +#include + IMPLEMENT_STANDARD_HANDLE(DDS_DicGroup, MMgt_TShared) IMPLEMENT_STANDARD_RTTIEXT(DDS_DicGroup, MMgt_TShared) diff --git a/src/DDS/DDS_DicItem.cxx b/src/DDS/DDS_DicItem.cxx index 02cdefb93..7adf34aaf 100644 --- a/src/DDS/DDS_DicItem.cxx +++ b/src/DDS/DDS_DicItem.cxx @@ -32,6 +32,8 @@ #include #include +#include + IMPLEMENT_STANDARD_HANDLE(DDS_DicItem, MMgt_TShared) IMPLEMENT_STANDARD_RTTIEXT(DDS_DicItem, MMgt_TShared) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 04c25b2fa..483993506 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -682,7 +682,7 @@ QString LightApp_Application::defaultModule() const modules( aModuleNames, false ); // obtain a complete list of module names for the current configuration //! If there's the one and only module --> activate it automatically //! TODO: Possible improvement - default module can be taken from preferences - return aModuleNames.count() > 1 ? "" : ( aModuleNames.count() ? aModuleNames.first() : "" ); + return aModuleNames.count() > 1 ? QString( "" ) : ( aModuleNames.count() ? aModuleNames.first() : QString( "" ) ); } /*!On new window slot.*/ @@ -2538,7 +2538,7 @@ bool LightApp_Application::event( QEvent* e ) QCustomEvent* ce = ( QCustomEvent* )e; QString* d = ( QString* )ce->data(); if( SUIT_MessageBox::warn2(0, tr("WRN_WARNING"), - d ? *d : "", + d ? *d : QString( "" ), tr("BUT_OK"), tr("BUT_CANCEL"), 0, 1, 0 )==0 ) onPreferences(); if( d ) diff --git a/src/LightApp/LightApp_Dialog.cxx b/src/LightApp/LightApp_Dialog.cxx index 27219f5f1..4d66e83cb 100644 --- a/src/LightApp/LightApp_Dialog.cxx +++ b/src/LightApp/LightApp_Dialog.cxx @@ -264,7 +264,7 @@ QWidget* LightApp_Dialog::objectWg( const int theId, const int theWgId ) const */ QString LightApp_Dialog::objectText( const int theId ) const { - return myObjects.contains( theId ) ? myObjects[ theId ].myEdit->text() : ""; + return myObjects.contains( theId ) ? myObjects[ theId ].myEdit->text() : QString( "" ); } /*! diff --git a/src/Qtx/QtxListResourceEdit.cxx b/src/Qtx/QtxListResourceEdit.cxx index a075dc153..1afbcb3c1 100644 --- a/src/Qtx/QtxListResourceEdit.cxx +++ b/src/Qtx/QtxListResourceEdit.cxx @@ -1419,7 +1419,7 @@ void QtxListResourceEdit::FontItem::setSize( const int s ) cursize = defsize.toInt(); } - mySizes->setCurrentText( cursize>0 ? QString( "%1" ).arg( cursize ) : "" ); + mySizes->setCurrentText( cursize>0 ? QString( "%1" ).arg( cursize ) : QString( "" ) ); } /*! diff --git a/src/Qtx/QtxResourceMgr.h b/src/Qtx/QtxResourceMgr.h index ff72dd3c2..449b59087 100644 --- a/src/Qtx/QtxResourceMgr.h +++ b/src/Qtx/QtxResourceMgr.h @@ -271,7 +271,7 @@ template class QtxResourceMgr::IMapIterator { public: IMapIterator() : myMap( 0 ), myIndex( 0 ) { init(); } - IMapIterator( const IMap* m ) : myMap( const_cast< IMap* >( m ) ), myIndex( 0 ) { init(); } + IMapIterator( const QtxResourceMgr::IMap* m ) : myMap( const_cast< QtxResourceMgr::IMap* >( m ) ), myIndex( 0 ) { init(); } IMapIterator( const IMapIterator& i ) : myMap( i.myMap ), myIndex( i.myIndex ) { init(); } bool operator==( const IMapIterator& i ) { return !operator!=( i ); } @@ -291,15 +291,15 @@ public: IMapIterator operator--( int ) { IMapIterator i = *this; myIndex--; init(); return i; } private: - IMapIterator( const IMap* m, const int index ) : myMap( const_cast< IMap* >( m ) ), myIndex( index ) { init(); } + IMapIterator( const QtxResourceMgr::IMap* m, const int index ) : myMap( const_cast< QtxResourceMgr::IMap* >( m ) ), myIndex( index ) { init(); } void init() { if ( !myMap || myIndex >= myMap->count() ) myIndex = -1; } private: - IMap* myMap; + QtxResourceMgr::IMap* myMap; int myIndex; - friend class IMap; - friend class IMapConstIterator; + friend class QtxResourceMgr::IMap; + friend class QtxResourceMgr::IMapConstIterator; }; /*! @@ -310,9 +310,9 @@ template class QtxResourceMgr::IMapConstIterator { public: IMapConstIterator() : myMap( 0 ), myIndex( 0 ) { init(); } - IMapConstIterator( const IMap* m ) : myMap( const_cast< IMap* >( m ) ), myIndex( 0 ) { init(); } + IMapConstIterator( const QtxResourceMgr::IMap* m ) : myMap( const_cast< QtxResourceMgr::IMap* >( m ) ), myIndex( 0 ) { init(); } IMapConstIterator( const IMapConstIterator& i ) : myMap( i.myMap ), myIndex( i.myIndex ) { init(); } - IMapConstIterator( const IMapIterator& i ) : myMap( i.myMap ), myIndex( i.myIndex ) { init(); } + IMapConstIterator( const QtxResourceMgr::IMapIterator& i ) : myMap( i.myMap ), myIndex( i.myIndex ) { init(); } bool operator==( const IMapConstIterator& i ) { return !operator!=( i ); } bool operator!=( const IMapConstIterator& i ) { return !myMap || myMap != i.myMap || myIndex != i.myIndex; } @@ -330,14 +330,14 @@ public: IMapConstIterator operator--( int ) { IMapConstIterator i = *this; myIndex--; init(); return i; } private: - IMapConstIterator( const IMap* m, const int index ): myMap( const_cast< IMap* >( m ) ), myIndex( index ) { init(); } + IMapConstIterator( const QtxResourceMgr::IMap* m, const int index ): myMap( const_cast< QtxResourceMgr::IMap* >( m ) ), myIndex( index ) { init(); } void init() { if ( !myMap || myIndex >= myMap->count() ) myIndex = -1; } private: - IMap* myMap; + QtxResourceMgr::IMap* myMap; int myIndex; - friend class IMap; + friend class QtxResourceMgr::IMap; }; /*! @@ -347,8 +347,8 @@ private: template class QtxResourceMgr::IMap { public: - typedef IMapIterator Iterator; - typedef IMapConstIterator ConstIterator; + typedef QtxResourceMgr::IMapIterator Iterator; + typedef QtxResourceMgr::IMapConstIterator ConstIterator; public: IMap() {} @@ -443,8 +443,8 @@ private: Key dummyKey; Value dummyValue; - friend class IMapIterator; - friend class IMapConstIterator; + friend class QtxResourceMgr::IMapIterator; + friend class QtxResourceMgr::IMapConstIterator; }; #endif diff --git a/src/STD/STD_Application.cxx b/src/STD/STD_Application.cxx index 90690cad7..6c2566319 100755 --- a/src/STD/STD_Application.cxx +++ b/src/STD/STD_Application.cxx @@ -496,7 +496,7 @@ bool STD_Application::onSaveAsDoc() putInfo( tr( "INF_DOC_SAVING" ) + aName ); isOk = study->saveDocumentAs( aName ); - putInfo( isOk ? tr( "INF_DOC_SAVED" ).arg( aName ) : "" ); + putInfo( isOk ? tr( "INF_DOC_SAVED" ).arg( aName ) : QString( "" ) ); QApplication::restoreOverrideCursor(); diff --git a/src/SUIT/SUIT_ViewManager.cxx b/src/SUIT/SUIT_ViewManager.cxx index 9d2e7e186..853c3c823 100755 --- a/src/SUIT/SUIT_ViewManager.cxx +++ b/src/SUIT/SUIT_ViewManager.cxx @@ -321,7 +321,7 @@ void SUIT_ViewManager::closeAllViews() */ QString SUIT_ViewManager::getType() const { - return (!myViewModel)? "": myViewModel->getType(); + return (!myViewModel)? QString( "" ): myViewModel->getType(); } /*! diff --git a/src/SVTK/SVTK_RectPicker.cxx b/src/SVTK/SVTK_RectPicker.cxx index bf99c7b61..20fd3209d 100644 --- a/src/SVTK/SVTK_RectPicker.cxx +++ b/src/SVTK/SVTK_RectPicker.cxx @@ -167,19 +167,24 @@ namespace aDX[1] >= theSelection[1] && aDX[1] <= theSelection[3]) { //cout<<"aPntId "< 0) goto ADD_VISIBLE; if(aRet < 0) goto ADD_INVISIBLE; - static int aMaxRadius = 5; - for(int aRadius = 1; aRadius < aMaxRadius; aRadius++){ + for(aRadius = 1; aRadius < aMaxRadius; aRadius++){ int aStartDX[2] = {aDX0 - aRadius, aDX1 - aRadius}; for(int i = 0; i <= aRadius; i++){ int aRet = Check(aZPtr,theSelection,theTolerance,aDX[2],aStartDX[0]++,aStartDX[1]); diff --git a/src/VTKViewer/VTKViewer_ConvexTool.cxx b/src/VTKViewer/VTKViewer_ConvexTool.cxx index 6ba9ee187..8ab7578d1 100644 --- a/src/VTKViewer/VTKViewer_ConvexTool.cxx +++ b/src/VTKViewer/VTKViewer_ConvexTool.cxx @@ -32,9 +32,9 @@ #include #include -#ifdef WNT +//#ifdef WNT #include -#endif +//#endif #include #include diff --git a/src/VTKViewer/VTKViewer_ShrinkFilter.cxx b/src/VTKViewer/VTKViewer_ShrinkFilter.cxx index b4a7fb6a2..886671ec4 100755 --- a/src/VTKViewer/VTKViewer_ShrinkFilter.cxx +++ b/src/VTKViewer/VTKViewer_ShrinkFilter.cxx @@ -170,5 +170,5 @@ vtkIdType VTKViewer_ShrinkFilter::GetNodeObjId(int theVtkID) { if ( myVTK2ObjIds.empty() || theVtkID > (int)myVTK2ObjIds.size() ) return -1; - return myVTK2ObjIds.at(theVtkID); + return myVTK2ObjIds[theVtkID]; }