From: Gilles DAVID Date: Fri, 16 Jun 2023 21:39:22 +0000 (+0200) Subject: Remove some unused variables warnings X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f36dd7612232ba82c0c5a40ec2c42d7d701f543d;p=modules%2Fgui.git Remove some unused variables warnings --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 718efbd13..d18e541f5 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -2612,8 +2612,8 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) // .. "3D viewer" group <> QString formats; - int bgId; #ifndef DISABLE_OCCVIEWER + int bgId; // .. "OCC viewer" group <> int occGroup = pref->addPreference( tr( "PREF_GROUP_OCCVIEWER" ), salomeCat ); @@ -3268,10 +3268,10 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString if ( sec == QString( "3DViewer" ) && (param == QString( "trihedron_size" ) || param == QString( "relative_size" ))) { - double sz = resMgr->doubleValue( sec, "trihedron_size", -1 ); - bool relative = resMgr->booleanValue( sec, "relative_size", true ); QList lst; #ifndef DISABLE_OCCVIEWER + double sz = resMgr->doubleValue( sec, "trihedron_size", -1 ); + bool relative = resMgr->booleanValue( sec, "relative_size", true ); viewManagers( OCCViewer_Viewer::Type(), lst ); QListIterator itOCC( lst ); while ( itOCC.hasNext() && sz >= 0 ) @@ -3308,9 +3308,9 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString if ( sec == QString( "3DViewer" ) && param == QString( "show_static_trihedron" ) ) { - bool isVisible = resMgr->booleanValue( "3DViewer", "show_static_trihedron", true ); QList lst; #ifndef DISABLE_OCCVIEWER + bool isVisible = resMgr->booleanValue( "3DViewer", "show_static_trihedron", true ); viewManagers( OCCViewer_Viewer::Type(), lst ); QListIterator itOCC( lst ); while ( itOCC.hasNext() ) @@ -3349,9 +3349,9 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString if ( sec == QString( "3DViewer" ) && param == QString( "navigation_mode" ) ) { - int mode = resMgr->integerValue( "3DViewer", "navigation_mode", 0 ); QList lst; #ifndef DISABLE_OCCVIEWER + int mode = resMgr->integerValue( "3DViewer", "navigation_mode", 0 ); viewManagers( OCCViewer_Viewer::Type(), lst ); QListIterator itOCC( lst ); while ( itOCC.hasNext() ) @@ -3642,9 +3642,9 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString if ( sec == QString( "3DViewer" ) && param == QString( "zooming_mode" ) ) { - int mode = resMgr->integerValue( "3DViewer", "zooming_mode", 0 ); QList lst; #ifndef DISABLE_OCCVIEWER + int mode = resMgr->integerValue( "3DViewer", "zooming_mode", 0 ); viewManagers( OCCViewer_Viewer::Type(), lst ); QListIterator itOCC( lst ); while ( itOCC.hasNext() ) diff --git a/src/LightApp/LightApp_FullScreenHelper.cxx b/src/LightApp/LightApp_FullScreenHelper.cxx index f891f0686..70f949fa5 100644 --- a/src/LightApp/LightApp_FullScreenHelper.cxx +++ b/src/LightApp/LightApp_FullScreenHelper.cxx @@ -92,7 +92,9 @@ void LightApp_FullScreenHelper::switchToFullScreen() { QList aWindowList = desk->windows(); SUIT_ViewWindow* anActiveWindow = desk->activeWindow(); QList::const_iterator it = aWindowList.begin(); + #ifndef DISABLE_OCCVIEWER int aKey = 0; + #endif for ( ; it != aWindowList.end(); it++ ) { myWindowsList.push_back(*it); #ifndef DISABLE_OCCVIEWER @@ -214,7 +216,9 @@ void LightApp_FullScreenHelper::switchToNormalScreen() { //Show all toolbars and windows QList::const_iterator itr = myWindowsList.begin(); + #ifndef DISABLE_OCCVIEWER int aKey = 0; + #endif for ( ; itr != myWindowsList.end(); itr++ ) { #ifndef DISABLE_OCCVIEWER OCCViewer_ViewFrame* anActiveOCCFrame = dynamic_cast( *itr ); diff --git a/src/SALOME_SWIG/SALOMEGUI_Swig.cxx b/src/SALOME_SWIG/SALOMEGUI_Swig.cxx index b8e388ad8..a12cf9a6b 100644 --- a/src/SALOME_SWIG/SALOMEGUI_Swig.cxx +++ b/src/SALOME_SWIG/SALOMEGUI_Swig.cxx @@ -927,8 +927,8 @@ public: if ( LightApp_Application* anApp = getApplication() ) { SUIT_ViewManager* viewMgr = anApp->activeViewManager(); if (!viewMgr) return; - if ( SUIT_ViewWindow* window = viewMgr->getActiveView() ) { #ifndef DISABLE_VTKVIEWER + if ( SUIT_ViewWindow* window = viewMgr->getActiveView() ) { if ( SVTK_ViewWindow* svtk = dynamic_cast( window ) ) { if ( vtkRenderer* ren = svtk->getRenderer()) { if ( vtkCamera* camera = ren->GetActiveCamera() ) { @@ -948,8 +948,8 @@ public: } } } -#endif } +#endif } } }; @@ -993,8 +993,8 @@ static void setViewParameter( int parameter, QList& values ) { if ( LightApp_Application* anApp = getApplication() ) { SUIT_ViewManager* viewMgr = anApp->activeViewManager(); if (!viewMgr) return; - if ( SUIT_ViewWindow* window = viewMgr->getActiveView() ) { #ifndef DISABLE_VTKVIEWER + if ( SUIT_ViewWindow* window = viewMgr->getActiveView() ) { if ( SVTK_ViewWindow* svtk = dynamic_cast( window ) ) { if ( vtkRenderer* ren = svtk->getRenderer()) { if ( vtkCamera* camera = ren->GetActiveCamera() ) { @@ -1031,8 +1031,8 @@ static void setViewParameter( int parameter, QList& values ) { } svtk->Repaint(); } -#endif } +#endif } } };