Salome HOME
#18963 Minimize compiler warnings
authorViktor Uzlov <viktor.uzlov@opencascade.com>
Fri, 14 Aug 2020 13:23:51 +0000 (16:23 +0300)
committervsr <vsr@opencascade.com>
Tue, 8 Dec 2020 09:35:44 +0000 (12:35 +0300)
242 files changed:
src/CAF/CAF_Study.cxx
src/CAM/CAM_Module.cxx
src/CASCatch/CASCatch_CatchSignals.cxx
src/DDS/DDS_DicGroup.cxx
src/DDS/DDS_DicItem.cxx
src/DDS/DDS_Dictionary.cxx
src/GLViewer/GLViewer_BaseObjects.cxx
src/GLViewer/GLViewer_Drawer.cxx
src/GLViewer/GLViewer_Grid.cxx
src/GLViewer/GLViewer_Group.cxx
src/GLViewer/GLViewer_Object.cxx
src/GLViewer/GLViewer_Selector2d.cxx
src/GLViewer/GLViewer_Text.cxx
src/GLViewer/GLViewer_ToolTip.cxx
src/GLViewer/GLViewer_Tools.cxx
src/GLViewer/GLViewer_ViewPort2d.cxx
src/GLViewer/GLViewer_Viewer.cxx
src/GLViewer/GLViewer_Viewer2d.cxx
src/GLViewer/GLViewer_Widget.cxx
src/GraphicsView/GraphicsView_Object.cxx
src/GraphicsView/GraphicsView_Object.h
src/GraphicsView/GraphicsView_Scene.cxx
src/GraphicsView/GraphicsView_Selector.cxx
src/GraphicsView/GraphicsView_ViewPort.cxx
src/GraphicsView/GraphicsView_ViewTransformer.cxx
src/GraphicsView/GraphicsView_Viewer.cxx
src/GuiHelpers/StandardApp_Module.cxx
src/HelpBrowser/HelpBrowser.cxx
src/HelpBrowser/qtsingleapplication.h
src/LightApp/LightApp_Application.cxx
src/LightApp/LightApp_DataModel.cxx
src/LightApp/LightApp_DataObject.cxx
src/LightApp/LightApp_Driver.cxx
src/LightApp/LightApp_GVSelector.cxx
src/LightApp/LightApp_Module.cxx
src/LightApp/LightApp_OBSelector.cxx
src/LightApp/LightApp_Plot2dSelector.cxx
src/LightApp/LightApp_Study.cxx
src/LightApp/LightApp_SwitchOp.cxx
src/LightApp/LightApp_VTKSelector.h
src/OCCViewer/OCCViewer.h
src/OCCViewer/OCCViewer_AISSelector.cxx
src/OCCViewer/OCCViewer_ClipPlane.cxx
src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx
src/OCCViewer/OCCViewer_ClippingDlg.cxx
src/OCCViewer/OCCViewer_CreateRestoreViewDlg.cxx
src/OCCViewer/OCCViewer_EnvTextureDlg.cxx
src/OCCViewer/OCCViewer_LightSourceDlg.cxx
src/OCCViewer/OCCViewer_SetRotationPointDlg.cxx
src/OCCViewer/OCCViewer_ToolTip.cxx
src/OCCViewer/OCCViewer_Utilities.cxx
src/OCCViewer/OCCViewer_VService.cxx
src/OCCViewer/OCCViewer_VService.h
src/OCCViewer/OCCViewer_ViewFrame.cxx
src/OCCViewer/OCCViewer_ViewFrame.h
src/OCCViewer/OCCViewer_ViewModel.cxx
src/OCCViewer/OCCViewer_ViewPort3d.cxx
src/OCCViewer/OCCViewer_ViewSketcher.cxx
src/OCCViewer/OCCViewer_ViewSketcher.h
src/OCCViewer/OCCViewer_ViewWindow.cxx
src/PVServerService/ServiceLoader/PVServer_ServiceLoader.cxx
src/PVServerService/ServiceLoader/PVServer_ServiceLoader.h
src/PVViewer/PVViewer_Behaviors.cxx
src/PVViewer/PVViewer_Core.cxx
src/PVViewer/PVViewer_OutputWindow.cxx
src/PVViewer/PVViewer_OutputWindow.h
src/Plot2d/Plot2d.cxx
src/Plot2d/Plot2d_AnalyticalCurve.cxx
src/Plot2d/Plot2d_AnalyticalParser.cxx
src/Plot2d/Plot2d_NormalizeAlgorithm.cxx
src/Plot2d/Plot2d_Object.cxx
src/Plot2d/Plot2d_PlotItems.cxx
src/Plot2d/Plot2d_ViewFrame.cxx
src/Plot2d/Plot2d_ViewModel.cxx
src/Prs/SALOME_Prs.h
src/QDS/QDS_ComboBox.cxx
src/QDS/QDS_Datum.cxx
src/QDS/QDS_RadioBox.cxx
src/QDS/QDS_Validator.cxx
src/Qtx/Qtx.cxx
src/Qtx/Qtx.h
src/Qtx/QtxBiColorTool.cxx
src/Qtx/QtxColorScale.cxx
src/Qtx/QtxDialog.cxx
src/Qtx/QtxDoubleSpinBox.cxx
src/Qtx/QtxEvalExpr.cxx
src/Qtx/QtxListAction.cxx
src/Qtx/QtxMainWindow.cxx
src/Qtx/QtxNotify.cxx
src/Qtx/QtxPagePrefMgr.cxx
src/Qtx/QtxPathListEdit.cxx
src/Qtx/QtxRubberBand.cxx
src/Qtx/QtxShortcutEdit.cxx
src/Qtx/QtxSplash.cxx
src/Qtx/QtxToolBar.cxx
src/Qtx/QtxToolButton.cxx
src/Qtx/QtxTranslator.cxx
src/Qtx/QtxWorkstack.cxx
src/Qtx/QtxWorkstackAction.cxx
src/QxScene/QxScene_ViewModel.cxx
src/QxScene/QxScene_ViewWindow.cxx
src/QxScene/QxScene_ViewWindow.h
src/SALOME_PY/SalomePy.cxx
src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h
src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_BorrowedDataObjectLight.cxx
src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_DataModelLight.cxx
src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_DataObjectLight.cxx
src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.cxx
src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.h
src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_PyModule.cxx
src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx
src/SOCC/SOCC_ViewModel.cxx
src/SOCC/SOCC_ViewWindow.cxx
src/SOCC/SOCC_ViewWindow.h
src/SPlot2d/SPlot2d_ViewModel.cxx
src/SPlot2d/SPlot2d_ViewModel.h
src/SPlot2d/SPlot2d_ViewWindow.h
src/STD/STD_Application.cxx
src/SUIT/SUIT_DataBrowser.cxx
src/SUIT/SUIT_TreeModel.cxx
src/SUIT/SUIT_ViewManager.cxx
src/SUIT/SUIT_ViewWindow.cxx
src/SUITApp/SUITApp.cxx
src/SUITApp/SUITApp_init_python.cxx
src/SVTK/SALOME_Actor.cxx
src/SVTK/SALOME_Actor.h
src/SVTK/SVTK_Actor.cxx
src/SVTK/SVTK_Actor.h
src/SVTK/SVTK_AreaPicker.cxx
src/SVTK/SVTK_AreaPicker.h
src/SVTK/SVTK_CubeAxesActor2D.cxx
src/SVTK/SVTK_CubeAxesActor2D.h
src/SVTK/SVTK_DeviceActor.cxx
src/SVTK/SVTK_DeviceActor.h
src/SVTK/SVTK_GenericRenderWindowInteractor.cxx
src/SVTK/SVTK_GenericRenderWindowInteractor.h
src/SVTK/SVTK_Hash.h
src/SVTK/SVTK_ImageWriterMgr.cxx
src/SVTK/SVTK_InteractorStyle.cxx
src/SVTK/SVTK_InteractorStyle.h
src/SVTK/SVTK_KeyFreeInteractorStyle.cxx
src/SVTK/SVTK_KeyFreeInteractorStyle.h
src/SVTK/SVTK_NonIsometricDlg.h
src/SVTK/SVTK_Recorder.cxx
src/SVTK/SVTK_Recorder.h
src/SVTK/SVTK_RenderWindowInteractor.cxx
src/SVTK/SVTK_RenderWindowInteractor.h
src/SVTK/SVTK_Renderer.cxx
src/SVTK/SVTK_Renderer.h
src/SVTK/SVTK_Selector.cxx
src/SVTK/SVTK_Selector.h
src/SVTK/SVTK_SetRotationPointDlg.cxx
src/SVTK/SVTK_SetRotationPointDlg.h
src/SVTK/SVTK_SpaceMouse.cxx
src/SVTK/SVTK_Trihedron.cxx
src/SVTK/SVTK_Trihedron.h
src/SVTK/SVTK_UpdateRateDlg.cxx
src/SVTK/SVTK_UpdateRateDlg.h
src/SVTK/SVTK_View.cxx
src/SVTK/SVTK_View.h
src/SVTK/SVTK_ViewModel.cxx
src/SVTK/SVTK_ViewModel.h
src/SVTK/SVTK_ViewModelBase.h
src/SVTK/SVTK_ViewParameterDlg.cxx
src/SVTK/SVTK_ViewParameterDlg.h
src/SVTK/SVTK_ViewWindow.cxx
src/SVTK/SVTK_ViewWindow.h
src/SVTK/salomevtkPVAxesActor.cxx
src/SVTK/salomevtkPVAxesActor.h
src/SVTK/salomevtkPVAxesWidget.cxx
src/SVTK/salomevtkPVAxesWidget.h
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/SalomeApp_DataModel.cxx
src/SalomeApp/SalomeApp_DataObject.cxx
src/SalomeApp/SalomeApp_Engine_i.cxx
src/SalomeApp/SalomeApp_Engine_i.h
src/SalomeApp/SalomeApp_ListView.cxx
src/SalomeApp/SalomeApp_Module.cxx
src/SalomeApp/SalomeApp_NoteBook.cxx
src/SalomeApp/SalomeApp_NoteBook.h
src/SalomeApp/SalomeApp_Study.cxx
src/SalomeApp/SalomeApp_StudyPropertiesDlg.cxx
src/SalomeApp/SalomeApp_VisualState.cxx
src/Session/SALOME_Session_Server.cxx
src/Session/Session_ServerThread.cxx
src/Session/Session_Session_i.cxx
src/Style/Style_Salome.cxx
src/Style/Style_Tools.cxx
src/TOOLSGUI/ToolsGUI.cxx
src/TOOLSGUI/ToolsGUI_RegWidget.cxx
src/TreeData/DataProcessor.hxx
src/TreeData/DockWidgets.cxx
src/TreeData/Test/tester.cxx
src/TreeData/TreeGuiManager.cxx
src/TreeData/TreeView.cxx
src/VTKViewer/VTKViewer_Actor.cxx
src/VTKViewer/VTKViewer_Actor.h
src/VTKViewer/VTKViewer_AppendFilter.cxx
src/VTKViewer/VTKViewer_AppendFilter.h
src/VTKViewer/VTKViewer_ArcBuilder.cxx
src/VTKViewer/VTKViewer_CellCenters.cxx
src/VTKViewer/VTKViewer_CellCenters.h
src/VTKViewer/VTKViewer_CellLocationsArray.cxx
src/VTKViewer/VTKViewer_CellLocationsArray.h
src/VTKViewer/VTKViewer_ConvexTool.cxx
src/VTKViewer/VTKViewer_DataSetMapper.cxx
src/VTKViewer/VTKViewer_DataSetMapper.h
src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx
src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.h
src/VTKViewer/VTKViewer_Filter.h
src/VTKViewer/VTKViewer_FramedTextActor.cxx
src/VTKViewer/VTKViewer_FramedTextActor.h
src/VTKViewer/VTKViewer_GeometryFilter.cxx
src/VTKViewer/VTKViewer_GeometryFilter.h
src/VTKViewer/VTKViewer_InteractorStyle.cxx
src/VTKViewer/VTKViewer_InteractorStyle.h
src/VTKViewer/VTKViewer_MarkerUtils.cxx
src/VTKViewer/VTKViewer_OpenGLHelper.cxx
src/VTKViewer/VTKViewer_OpenGLRenderer.cxx
src/VTKViewer/VTKViewer_OpenGLRenderer.h
src/VTKViewer/VTKViewer_PolyDataMapper.cxx
src/VTKViewer/VTKViewer_PolyDataMapper.h
src/VTKViewer/VTKViewer_RenderWindow.cxx
src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx
src/VTKViewer/VTKViewer_RenderWindowInteractor.h
src/VTKViewer/VTKViewer_ShrinkFilter.cxx
src/VTKViewer/VTKViewer_ShrinkFilter.h
src/VTKViewer/VTKViewer_Texture.cxx
src/VTKViewer/VTKViewer_Texture.h
src/VTKViewer/VTKViewer_Transform.cxx
src/VTKViewer/VTKViewer_Transform.h
src/VTKViewer/VTKViewer_TransformFilter.cxx
src/VTKViewer/VTKViewer_TransformFilter.h
src/VTKViewer/VTKViewer_Trihedron.cxx
src/VTKViewer/VTKViewer_Trihedron.h
src/ViewerTools/ViewerTools_DialogBase.h
src/ViewerTools/ViewerTools_FontWidgetBase.cxx
tools/CurvePlot/src/cpp/CurvePlot.cxx
tools/CurvePlot/src/cpp/test/test_curveplot.cxx
tools/PyConsole/src/PyConsole_Editor.h
tools/PyEditor/src/PyEditor_Widget.cxx
tools/PyInterp/src/PyInterp_Interp.cxx

index 183fbf6af27b75ca970f3a3b6452b6386c2499e6..08ca8708b7cb12a1d09a8313deb40c17590f1f8a 100644 (file)
@@ -113,7 +113,7 @@ bool CAF_Study::createDocument( const QString& doc )
       if ( !formats.IsEmpty() )
         app->stdApp()->NewDocument( formats.First(), myStdDoc );
     }
-    catch ( Standard_Failure ) {
+    catch ( Standard_Failure& ) {
       res = false;
     }
   }
@@ -149,7 +149,7 @@ bool CAF_Study::openDocument( const QString& fname )
     OCC_CATCH_SIGNALS;
     status = app->Open( CAF_Tools::toExtString( fname ), myStdDoc ) == PCDM_RS_OK;
   }
-  catch ( Standard_Failure ) {
+  catch ( Standard_Failure& ) {
     status = false;
   }
 
@@ -189,7 +189,7 @@ bool CAF_Study::saveDocumentAs( const QString& fname )
       status = app->SaveAs( stdDoc(), path ) == PCDM_SS_OK;
     }
   }
-  catch ( Standard_Failure ) {
+  catch ( Standard_Failure& ) {
     status = false;
   }
 
@@ -219,7 +219,7 @@ bool CAF_Study::openTransaction()
 
     myStdDoc->OpenCommand();
   }
-  catch ( Standard_Failure ) {
+  catch ( Standard_Failure& ) {
     res = false;
   }
 
@@ -241,7 +241,7 @@ bool CAF_Study::abortTransaction()
     myStdDoc->AbortCommand();
     update();
   }
-  catch ( Standard_Failure ) {
+  catch ( Standard_Failure& ) {
     res = false;
   }
   return res;
@@ -268,7 +268,7 @@ bool CAF_Study::commitTransaction( const QString& name )
         d->SetName( CAF_Tools::toExtString( name ) );
     }
   }
-  catch ( Standard_Failure ) {
+  catch ( Standard_Failure& ) {
     res = false;
   }
   return res;
@@ -365,7 +365,7 @@ bool CAF_Study::undo()
     myStdDoc->Undo();
     undoModified();     /* decrement modification counter */
   }
-  catch ( Standard_Failure ) {
+  catch ( Standard_Failure& ) {
     SUIT_MessageBox::critical(application()->desktop(), tr( "ERR_ERROR" ),
                               tr( "ERR_DOC_UNDO" ));
     return false;
@@ -387,7 +387,7 @@ bool CAF_Study::redo()
     myStdDoc->Redo();
     doModified();      /* increment modification counter */
   }
-  catch ( Standard_Failure ) {
+  catch ( Standard_Failure& ) {
     SUIT_MessageBox::critical( application()->desktop(), tr( "ERR_ERROR" ),
                                tr( "ERR_DOC_REDO" ) );
     return false;
index e68b56ac26f01e127024eb1c301f54c6544fd263..f5b7b43d51ba80be032d6a1be97997644e06ec64 100644 (file)
@@ -1144,7 +1144,7 @@ void CAM_Module::updateModuleVisibilityState() {
   This method is called from CAM_Application::startOperation().
   \param actionId is a numerical unique operation id.
 */
-bool CAM_Module::activateOperation( int actionId )
+bool CAM_Module::activateOperation( int /*actionId*/ )
 {
   return false;
 }
@@ -1154,7 +1154,7 @@ bool CAM_Module::activateOperation( int actionId )
   This method is called from CAM_Application::startOperation().
   \param actionId is a string unique operation id.
 */
-bool CAM_Module::activateOperation( const QString& actionId )
+bool CAM_Module::activateOperation( const QString& /*actionId*/ )
 {
   return false;
 }
@@ -1165,7 +1165,7 @@ bool CAM_Module::activateOperation( const QString& actionId )
   \param actionId is a string unique operation id.
   \param pluginName is a name of a plugin where the operation is implemented.
 */
-bool CAM_Module::activateOperation( const QString& actionId, const QString& pluginName )
+bool CAM_Module::activateOperation( const QString& /*actionId*/, const QString& /*pluginName*/ )
 {
   return false;
 }
index 2a17bc670e46c6148f553545bc5fa39203ea5b16..794d95a7c1e887755d0438d366c58763c76002d6 100644 (file)
@@ -105,13 +105,16 @@ static void Handler(const int theSig)
 }
 
 
-#ifdef SA_SIGINFO
 //================================================================================
 /*! Private -
  * \brief  handler for SIGSEGV signal
  */
 //================================================================================ 
+#ifdef SA_SIGINFO
 static void SegvHandler(const int, siginfo_t*, const Standard_Address)
+#else
+static void SegvHandler(const int)
+#endif
 {
   sigset_t set;
   sigemptyset(&set);
@@ -120,7 +123,6 @@ static void SegvHandler(const int, siginfo_t*, const Standard_Address)
 
   CASCatch_Failure::Raise("SIGSEGV detected");
 }
-#endif
 
 
 //================================================================================
@@ -138,32 +140,32 @@ void CASCatch_CatchSignals::Activate()
   for(; i<=MAX_HANDLER_NUMBER; i++)  
     mySigStates[i] = new struct sigaction(); //Initialize structures
 
-  int stat;
+  /*int stat;*/
   act.sa_handler =  (SIG_PFV) &Handler ;
   sigemptyset(&act.sa_mask) ;
 
-  stat = sigaction(SIGHUP,&act,(struct sigaction*)mySigStates[0]);   // ...... hangup
-  stat = sigaction(SIGFPE,&act,(struct sigaction*) mySigStates[1]);  // ...... floating point exception
-  stat = sigaction(SIGINT,&act,(struct sigaction*)mySigStates[2]);   // ...... interrupt
-  stat = sigaction(SIGQUIT,&act,(struct sigaction*)mySigStates[3]);  // ...... quit
-  stat = sigaction(SIGBUS,&act,(struct sigaction*)mySigStates[4]);   // ...... bus error
-  stat = sigaction(SIGILL,&act,(struct sigaction*)mySigStates[5]);   // ...... illegal instruction
+  /*stat = */sigaction(SIGHUP,&act,(struct sigaction*)mySigStates[0]);   // ...... hangup
+  /*stat = */sigaction(SIGFPE,&act,(struct sigaction*) mySigStates[1]);  // ...... floating point exception
+  /*stat = */sigaction(SIGINT,&act,(struct sigaction*)mySigStates[2]);   // ...... interrupt
+  /*stat = */sigaction(SIGQUIT,&act,(struct sigaction*)mySigStates[3]);  // ...... quit
+  /*stat = */sigaction(SIGBUS,&act,(struct sigaction*)mySigStates[4]);   // ...... bus error
+  /*stat = */sigaction(SIGILL,&act,(struct sigaction*)mySigStates[5]);   // ...... illegal instruction
 
 #ifdef SA_RESTART
   act.sa_flags   = SA_RESTART ;
 #else
   act.sa_flags   = 0 ;
 #endif
+#ifdef SA_SIGINFO
+  act.sa_sigaction = (void(*)(int, siginfo_t *, void*)) &SegvHandler ;
+#else
   act.sa_handler = (SIG_PFV) &SegvHandler ;
-
+# endif
 #ifdef SA_SIGINFO       // OSF,SOLARIS,IRIX
   act.sa_flags = act.sa_flags | SA_SIGINFO ;
-# ifdef SOLARIS
-  act.sa_sigaction = (void(*)(int, siginfo_t *, void*)) &SegvHandler ;
-# endif
 #endif
 
-  stat = sigaction( SIGSEGV , &act , (struct sigaction*)mySigStates[6]);    // ...... segmentation violation
+  /*stat = */sigaction( SIGSEGV , &act , (struct sigaction*)mySigStates[6]);    // ...... segmentation violation
 
   myIsActivated = Standard_True;
 }
@@ -179,15 +181,15 @@ void CASCatch_CatchSignals::Deactivate()
   if(!myIsActivated) return;
 
   struct sigaction oact;
-  int stat;
-
-  stat = sigaction(SIGHUP,(struct sigaction*)mySigStates[0],&oact);   // ...... hangup
-  stat = sigaction(SIGFPE,(struct sigaction*)mySigStates[1],&oact);   // ...... floating point exception
-  stat = sigaction(SIGINT,(struct sigaction*)mySigStates[2],&oact);   // ...... interrupt
-  stat = sigaction(SIGQUIT,(struct sigaction*)mySigStates[3],&oact);  // ...... quit
-  stat = sigaction(SIGBUS,(struct sigaction*)mySigStates[4],&oact);   // ...... bus error
-  stat = sigaction(SIGILL,(struct sigaction*)mySigStates[5],&oact);   // ...... illegal instruction
-  stat = sigaction(SIGSEGV,(struct sigaction*)mySigStates[6],&oact);  // ...... segmentation violation
+  /*int stat;*/
+
+  /*stat = */sigaction(SIGHUP,(struct sigaction*)mySigStates[0],&oact);   // ...... hangup
+  /*stat = */sigaction(SIGFPE,(struct sigaction*)mySigStates[1],&oact);   // ...... floating point exception
+  /*stat = */sigaction(SIGINT,(struct sigaction*)mySigStates[2],&oact);   // ...... interrupt
+  /*stat = */sigaction(SIGQUIT,(struct sigaction*)mySigStates[3],&oact);  // ...... quit
+  /*stat = */sigaction(SIGBUS,(struct sigaction*)mySigStates[4],&oact);   // ...... bus error
+  /*stat = */sigaction(SIGILL,(struct sigaction*)mySigStates[5],&oact);   // ...... illegal instruction
+  /*stat = */sigaction(SIGSEGV,(struct sigaction*)mySigStates[6],&oact);  // ...... segmentation violation
 
 
   Standard_Integer i = 0;
index 8936bd6621493b868d6966231d4bb1fbeaa3188c..a3876888d797fc8ee1317c003824a8ea71faa159 100644 (file)
@@ -57,6 +57,7 @@ DDS_DicGroup::DDS_DicGroup( const TCollection_AsciiString& name )
   \brief Copy constructor (put in private section to prevent object copying).
 */
 DDS_DicGroup::DDS_DicGroup( const DDS_DicGroup& )
+: Standard_Transient()
 {
 }
 
index a937f8c72d0e254169664123d6d313ffa6ac7411..6d0aff38e96260b7cba631503bebcf1226cf6f5f 100644 (file)
@@ -57,6 +57,7 @@ DDS_DicItem::DDS_DicItem()
   \brief Copy constructor (put in private section to prevent object copying).
 */
 DDS_DicItem::DDS_DicItem( const DDS_DicItem& )
+: Standard_Transient()
 {
 }
 
@@ -888,7 +889,7 @@ void DDS_DicItem::FillDataMap( TCollection_AsciiString theID, const LDOM_Element
       else if ( anUnitData.myUnits.ToCString()[0] ) // treat '%' as unit with scale 100
         anUnitData.myScale = 0.01;
     }
-          catch( Standard_Failure ) {
+    catch( Standard_Failure& ) {
       anUnitData.myUnits.Clear();
     }
 
index 7ff1ee53c63046933ea8657b1e02deafc9c140fb..4cf9249647e654dc6e106767c7a82f6245f4decc 100644 (file)
@@ -267,6 +267,7 @@ DDS_Dictionary::DDS_Dictionary()
   \brief Copy constructor (put in private section to prevent object copying).
 */
 DDS_Dictionary::DDS_Dictionary( const DDS_Dictionary& )
+: Standard_Transient()
 {
 }
 
@@ -555,7 +556,7 @@ Standard_Real DDS_Dictionary::ToSI( const Standard_Real theValue, const Standard
       OCC_CATCH_SIGNALS;
       aRetValue = UnitsAPI::AnyToSI( theValue, theUnits );
     }
-    catch( Standard_Failure ) {
+    catch( Standard_Failure& ) {
     }
   }
   else if ( theUnits && *theUnits )
@@ -580,7 +581,7 @@ Standard_Real DDS_Dictionary::FromSI( const Standard_Real theValue, const Standa
       OCC_CATCH_SIGNALS;
       aRetValue = UnitsAPI::AnyFromSI( theValue, theUnits );
     }
-    catch( Standard_Failure ) {
+    catch( Standard_Failure& ) {
     }
   }
   else if ( theUnits && *theUnits )
index db2c3875af96ef5cdf59b3377f384e8f96338ad0..c6e9bdb481a241dadcfe8f6a21a71af7878ba76c 100644 (file)
@@ -422,7 +422,7 @@ GLboolean GLViewer_MarkerSet::unhighlight()
   \param isCircle - true if sensitive area of detection is round
   \param isShift  - true if selection exec with append option
 */
-GLboolean GLViewer_MarkerSet::select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull,
+GLboolean GLViewer_MarkerSet::select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect /*rect*/, GLboolean /*isFull*/,
                                       GLboolean isCircle, GLboolean isShift )
 {
     if( !myIsVisible )
@@ -814,11 +814,11 @@ bool GLViewer_MarkerSet::initializeFromByteCopy( QByteArray theArray )
   \param size - size of polyline
   \param toolTip - tool tip of polyline
 */
-GLViewer_Polyline::GLViewer_Polyline( int number, float size, const QString& toolTip ):
+GLViewer_Polyline::GLViewer_Polyline( int number, float /*size*/, const QString& toolTip ):
   GLViewer_Object(),
-  myNumber( 0 ),
   myXCoord( 0 ),
-  myYCoord( 0 )       
+  myYCoord( 0 ),
+  myNumber( 0 )
 {
   myHighFlag = GL_TRUE;
 
@@ -1004,7 +1004,7 @@ GLViewer_Drawer* GLViewer_Polyline::createDrawer()
   \param isCircle - true if sensitive area of detection is round
   \return true if highlight status is changed
 */
-GLboolean GLViewer_Polyline::highlight( GLfloat x, GLfloat y, GLfloat tol, GLboolean isCircle )
+GLboolean GLViewer_Polyline::highlight( GLfloat x, GLfloat y, GLfloat /*tol*/, GLboolean /*isCircle*/ )
 {
     if( !myIsVisible )
         return false;
@@ -1088,8 +1088,8 @@ GLboolean GLViewer_Polyline::unhighlight()
   \param isCircle - true if sensitive area of detection is round
   \param isShift  - true if selection exec with append option
 */
-GLboolean GLViewer_Polyline::select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull,
-                                     GLboolean isCircle, GLboolean isShift )
+GLboolean GLViewer_Polyline::select( GLfloat x, GLfloat y, GLfloat /*tol*/, GLViewer_Rect /*rect*/, GLboolean /*isFull*/,
+                                     GLboolean /*isCircle*/, GLboolean /*isShift*/ )
 {
     if( !myIsVisible )
         return false;
@@ -1621,8 +1621,8 @@ GLboolean GLViewer_TextObject::unhighlight()
   \param isCircle - true if sensitive area of detection is round
   \param isShift  - true if selection exec with append option
 */
-GLboolean GLViewer_TextObject::select( GLfloat theX, GLfloat theY, GLfloat theTol, GLViewer_Rect rect,
-                                       GLboolean isFull, GLboolean isCircle, GLboolean isShift )
+GLboolean GLViewer_TextObject::select( GLfloat theX, GLfloat theY, GLfloat theTol, GLViewer_Rect /*rect*/,
+                                       GLboolean /*isFull*/, GLboolean isCircle, GLboolean /*isShift*/ )
 { 
     if( !myIsVisible )
         return false;
index d46b9182a2ab412c61426f29264f9971e5a7a0e2..d06b1571b4ea215222353fb0858e3a42917139f5 100644 (file)
@@ -77,7 +77,7 @@ void GLViewer_TexFont::clearTextBases()
   Default constructor
 */
 GLViewer_TexFont::GLViewer_TexFont()
-: myMaxRowWidth( 0 ), myFontHeight( 0 )
+: myFontHeight( 0 ), myMaxRowWidth( 0 )
 {
     myQFont = QApplication::font();//QFont::defaultFont();
     mySeparator = 2;
@@ -95,7 +95,7 @@ GLViewer_TexFont::GLViewer_TexFont()
   \param theMinMagFilter - min/mag filter, affects text sharpness
 */
 GLViewer_TexFont::GLViewer_TexFont( QFont* theFont, int theSeparator, bool theIsResizeable, GLuint theMinMagFilter )
-: myMaxRowWidth( 0 ), myFontHeight( 0 )
+: myFontHeight( 0 ), myMaxRowWidth( 0 )
 {
     myQFont = *theFont;
     mySeparator = theSeparator;
@@ -161,7 +161,7 @@ bool GLViewer_TexFont::generateTexture()
     aFindFont.myIsItal = myQFont.italic();
     aFindFont.myIsUndl = myQFont.underline();
     aFindFont.myPointSize = myQFont.pointSize();
-    aFindFont.myViewPortId = size_t(QGLContext::currentContext());
+    aFindFont.myViewPortId = (long)QGLContext::currentContext(); //!<TODO: conversion from "size_t" to "long"
         
     if( TexFontBase.contains( aFindFont ) )
     {
@@ -384,7 +384,7 @@ static GLuint displayListBase( QFont* theFont )
   if ( !ctx )
     return aList;  
   
-  aFindFont.myViewPortId = (int)ctx;
+  aFindFont.myViewPortId = (LONG_PTR)ctx;
 
   if ( GLViewer_TexFont::BitmapFontCache.contains( aFindFont ) )
     aList = GLViewer_TexFont::BitmapFontCache[aFindFont];
@@ -394,7 +394,7 @@ static GLuint displayListBase( QFont* theFont )
     QMap<GLViewer_TexFindId, GLuint>::iterator it = GLViewer_TexFont::BitmapFontCache.begin();
     for ( ; it != GLViewer_TexFont::BitmapFontCache.end(); ++it )
     {
-      if ( it.key().myViewPortId == (int)ctx && it.value() > listBase )
+      if ( it.key().myViewPortId == (LONG_PTR)ctx && it.value() > listBase )
         listBase = it.value();
     }
     listBase += 256;
@@ -451,7 +451,7 @@ static GLuint displayListBase( QFont* theFont )
     return aList;
   }
 
-  aFindFont.myViewPortId = size_t(aCont);
+  aFindFont.myViewPortId = (long)aCont;
 
   if ( GLViewer_TexFont::BitmapFontCache.contains( aFindFont ) )
     aList = GLViewer_TexFont::BitmapFontCache[aFindFont];
@@ -461,7 +461,7 @@ static GLuint displayListBase( QFont* theFont )
     QMap<GLViewer_TexFindId, GLuint>::iterator it = GLViewer_TexFont::BitmapFontCache.begin();
     for ( ; it != GLViewer_TexFont::BitmapFontCache.end(); ++it )
     {
-      if ( it.key().myViewPortId == size_t(aCont) && it.value() > listBase )
+      if ( it.key().myViewPortId == (long)aCont && it.value() > listBase )
         listBase = it.value();
     }
     listBase += 256;
index f8c8c4994606267f2b8916ca56aa735359a265b9..79538241ee134bfb132301df814051f047fba535 100644 (file)
@@ -56,11 +56,11 @@ GLViewer_Grid::GLViewer_Grid() :
   \param xPan and \param yPan     - offsets along x and y direction
   \param xScale and \param yScal  - scale factors along x and y direction
 */
-GLViewer_Grid::GLViewer_Grid( GLfloat width, GLfloat height,
-                              GLfloat winW, GLfloat winH,
-                              GLfloat xSize, GLfloat ySize,
-                              GLfloat xPan, GLfloat yPan,
-                              GLfloat xScale, GLfloat yScale ) :
+GLViewer_Grid::GLViewer_Grid( GLfloat /*width*/, GLfloat /*height*/,
+                              GLfloat /*winW*/, GLfloat /*winH*/,
+                              GLfloat /*xSize*/, GLfloat /*ySize*/,
+                              GLfloat /*xPan*/, GLfloat /*yPan*/,
+                              GLfloat /*xScale*/, GLfloat /*yScale*/ ) :
        myGridList( 0 ), myGridHeight( (GLfloat)0.0 ), myGridWidth( (GLfloat)0.0 ),
        myWinW( (GLfloat)0.0 ), myWinH( (GLfloat)0.0 ), myXSize( (GLfloat)0.0 ), myYSize( (GLfloat)0.0 ),
        myXPan( (GLfloat)0.0 ), myYPan( (GLfloat)0.0 ), myXScale( (GLfloat)1.0 ), myYScale( (GLfloat)1.0 ),
index 53e862876dd86656bbaaa3d089d239b76edcd5df..00c738d702b32d63e52f313625d917bfdf19d28d 100644 (file)
@@ -56,7 +56,7 @@ bool GLViewer_Group::isEmpty()
 */
 int GLViewer_Group::count()
 {
-  return myList.size();
+  return (int)myList.size(); //!< TODO: conversion from size_t to int
 }
 
 /*!
index bb2a4768ce8a2ee8f38f2a84ab1f10847e52be7a..5a0e543bc22c0bcfdaa71c57932dff7ee6b64c60 100644 (file)
@@ -196,7 +196,7 @@ QByteArray GLViewer_Object::getByteCopy()
 
     aCurPos += aGLText.size();
     aPointer = (char*)&myOwner;
-    for( i = 0; i < sizeof( SUIT_DataOwner* ); i++, aPointer++ )
+    for( i = 0; i < (int)sizeof( SUIT_DataOwner* ); i++, aPointer++ )
         aResult[ aCurPos + i ] = *aPointer;
 
     return aResult;
index e69441e5b6e13e8eb88bc9bd95bc30c75358b660..ca40d452d02066a4df7c3cba1f2f4a0126150c38 100644 (file)
@@ -170,7 +170,7 @@ void GLViewer_Selector2d::unselectAll()
   Checks selection state and emits  'selSelectionDone' or 'selSelectionCancel'     
   Should be called by after non-interactive selection.
 */
-void GLViewer_Selector2d::checkSelection( int selBefore, bool append, int aStatus )
+void GLViewer_Selector2d::checkSelection( int selBefore, bool /*append*/, int aStatus )
 {
     int selAfter = numSelected();
     if ( selBefore > 0 && selAfter < 1 )     
index e589e5a378b9fe56d58bd4c4fef5273d0761e894..ff94e238c32224e9f18886a249d48c25e79aa82d 100644 (file)
@@ -70,7 +70,7 @@ int GLViewer_Text::getWidth()
 {
     int aResult = 0;
     QFontMetrics aFM( myQFont );
-    for( uint i = 0; i < myText.length(); i++ )
+    for( int i = 0; i < myText.length(); i++ )
         aResult += aFM.width( myText.at(i) ) + mySeparator;
     return aResult;
 }
index a16897493630be235133c88b0e92d5e52a2d0f13..895d3bfdc0654b11380da370d311fac3e5c52be3 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-//  Author : OPEN CASCADE
-// File:      GLViewer_ToolTip.xx
-// Created:   March, 2005
-//#include "GLViewerAfx.h"
-//
 #include "GLViewer_Context.h"
 #include "GLViewer_ToolTip.h"
 #include "GLViewer_Viewer2d.h"
 */
 GLViewer_ObjectTip::GLViewer_ObjectTip( GLViewer_ViewPort2d* theParent )
 :QObject(),
- myText(),
  myPoint( -1, -1 )
 {
   mypViewPort = theParent;
-  //mypLabel = NULL;
   mypLabel = new QLabel( "Test", NULL, 
                          Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::Tool | Qt::X11BypassWindowManagerHint );
   mypLabel->setObjectName("ObjectTipText");
   mypLabel->setMargin( 1 );
-  //mypLabel->setAutoMask( false );
   mypLabel->setFrameStyle( QFrame::Plain | QFrame::Box );
   mypLabel->setLineWidth( 1 );
   mypLabel->setAlignment( Qt::AlignAbsolute | Qt::AlignTop );
   mypLabel->setIndent( 0 );
   mypLabel->ensurePolished();
   
-  //mypLabel->setPalette( QToolTip::palette() );
-
   mypTimer = new QTimer( this );
 
   connect( mypTimer, SIGNAL( timeout() ), this, SLOT( showTip() ) );
@@ -71,15 +61,8 @@ GLViewer_ObjectTip::GLViewer_ObjectTip( GLViewer_ViewPort2d* theParent )
 */
 GLViewer_ObjectTip::~GLViewer_ObjectTip()
 { 
-//  delete mypRect;
   if( mypLabel )
     delete mypLabel;
-
-  //if( mypPoint )
-  //  delete mypPoint;
-
-  //if( mypTimer )
-  //  delete mypTimer;
 }
 
 
@@ -87,29 +70,9 @@ GLViewer_ObjectTip::~GLViewer_ObjectTip()
   It is called when there is a possibility that a tool tip should be shown
   \param p - position of tooltip
 */
-bool GLViewer_ObjectTip::maybeTip( const QPoint &p )
+bool GLViewer_ObjectTip::maybeTip( const QPoint& /*p*/ )
 {
-
-
   GLViewer_Context* aContext = ((GLViewer_Viewer2d*)mypViewPort->getViewFrame()->getViewer())->getGLContext();
-
-  /*if( !aContext->currentObjectIsChanged() )
-    return false;
-  else
-    return true;
-  if( myPoint.x() == -1 && myPoint.y() == -1 || aContext->currentObjectIsChanged())
-  {
-    myPoint = p;
-  }
-  else/if( abs(myPoint.y() - p.y()) < 16 )
-  {
-    return;
-  }
-  else // > 16
-  {
-    myPoint = p;
-  }
-*/  
   GLViewer_Object* anObj = aContext->getCurrentObject();
   if( anObj )
   {
@@ -118,20 +81,6 @@ bool GLViewer_ObjectTip::maybeTip( const QPoint &p )
   }
 
   return false;
-  /*if( anObj )
-  {
-    //GLViewer_Rect* aRect = anObj->getRect();
-    //QRect aWinRect = mypViewPort->GLV2win( *aRect );
-    tip( QRect( p.x(), p.y(), 1, 1 ), anObj->getName() );
-    //QFontMetrics aFM( font() );    
-     //showTip( aWinRect, anObj->getName(), QRect( 0, 0, aFM.width( anObj->getName() + "  " ), aFM.height()*1.5 ) );
-    //tip( aWinRect, anObj->getName(), aWinRect( aFM.width( anObj->getName() + "  " ), aFM.height()*1.5 )  );
-  }
-//  else
-//    clear();
-    
-  //tip( QRect( 0, 0, mypViewPort->getGLWidget()->width(),mypViewPort->getGLWidget()->height() ) , "test Tool tip" );
-  */
 }
 
 /*!
@@ -142,34 +91,20 @@ bool GLViewer_ObjectTip::eventFilter( QObject* theObj, QEvent* e )
   hideTipAndSleep();
   switch( e->type() )
   {
-    /*case QEvent::MouseButtonPress:
-    case QEvent::MouseButtonRelease:
-    case QEvent::MouseButtonDblClick:
-    case QEvent::KeyPress:
-    case QEvent::KeyRelease:
-            // input - turn off tool tip mode
-            hideTipAndSleep();
-            break;*/
     case QEvent::MouseMove:
+    {
+      QWidget* aWidget = (QWidget*) theObj;
+      if( aWidget == mypViewPort->getGLWidget() )
       {
-        //hideTipAndSleep();
-        /*if( mypTimer->isActive() )
-        {
-          mypTimer->Stop();
-          wakeUp();
-        }*/
-        QWidget* aWidget = (QWidget*) theObj;
-        if( aWidget == mypViewPort->getGLWidget() )
-        {
-          wakeup();
-          QMouseEvent* m = (QMouseEvent *)e;
-          //if( !mypPoint )
-          //  mypPoint = new QPoint();
-
-          myPoint.setX( m->x() );
-          myPoint.setY( m->y() );
-        }
+        wakeup();
+        QMouseEvent* m = (QMouseEvent *)e;
+
+        myPoint.setX( m->x() );
+        myPoint.setY( m->y() );
       }
+    }
+    default:
+      break;
   }
   return false;
 }
@@ -179,15 +114,12 @@ bool GLViewer_ObjectTip::eventFilter( QObject* theObj, QEvent* e )
 */
 void GLViewer_ObjectTip::hideTipAndSleep()
 {
-  //if( mypPoint )
-  //  delete mypPoint;
   myPoint.setX(-1);
   myPoint.setY(-1);
 
   if( mypLabel )
   {
     mypLabel->hide();
-    //delete mypLabel;
   }
   mypTimer->stop();
 }
@@ -205,7 +137,6 @@ void GLViewer_ObjectTip::showTip()
     
     QPoint pos = mypViewPort->getGLWidget()->mapToGlobal( myPoint );
     
-    //mypLabel->show();
     int cur_height = 24;
     QCursor* aCursor = QApplication::overrideCursor();
     if( aCursor )
index 6fe7c717ff1613930c550cb680d80bf4277b7b5c..ea7955d27e5cca28692a482ef474ea75438609c7 100644 (file)
@@ -514,7 +514,7 @@ GLViewer_LineField::~GLViewer_LineField()
 /*!
   Adds line
 */
-void GLViewer_LineField::addLine( FieldDim theDim, GLViewer_LineList* )
+void GLViewer_LineField::addLine( FieldDim, GLViewer_LineList* )
 {
   //not implemented
 }
index 4a120be982476022b406cd81548880464305773a..3819758dd99ab5b857dd8f8d3586f348ee3a45a0 100644 (file)
@@ -73,7 +73,7 @@ void rotate_point( float& theX, float& theY, float theAngle )
 */
 GLViewer_ViewPort2d::GLViewer_ViewPort2d( QWidget* parent, GLViewer_ViewFrame* theViewFrame )
 : GLViewer_ViewPort( parent ),
-  myMargin( MARGIN ), myWidth( WIDTH ), myHeight( HEIGHT ),
+  myMargin( MARGIN ), myHeight( HEIGHT ), myWidth( WIDTH ),
   myXScale( 1.0 ), myYScale( 1.0 ), myXOldScale( 1.0 ), myYOldScale( 1.0 ),
   myXPan( 0.0 ), myYPan( 0.0 ),
   myIsMouseReleaseBlock( false ),
@@ -824,7 +824,7 @@ void GLViewer_ViewPort2d::fitSelect()
   Transform view by view borders
   \param keepScale - if it is true, zoom does not change
 */
-void GLViewer_ViewPort2d::fitAll( bool keepScale, bool withZ )
+void GLViewer_ViewPort2d::fitAll( bool keepScale, bool /*withZ*/ )
 {
     //cout << "GLViewer_ViewPort2d::fitAll" << endl;
 
@@ -1140,7 +1140,7 @@ void GLViewer_ViewPort2d::drawCompass()
 
     glEndList();
 
-    if ( aTextList != -1 )
+    if ( (int)aTextList != -1 )
         glCallList( aTextList );
 }
 
index 5d0ee87435f5391c3459507bf4bda20daf7d3931..cc3d8ea13533e4640b73e4ba2455e6cdf1c74927 100644 (file)
@@ -48,12 +48,12 @@ static QEvent* l_mbPressEvent = 0;
 /*!
     Constructor
 */
-GLViewer_Viewer::GLViewer_Viewer( const QString& title )
+GLViewer_Viewer::GLViewer_Viewer( const QString& /*title*/ )
 : SUIT_ViewModel(),
 mySelector( 0 ),
+mySelMode( NoSelection ),
 mySketcher( 0 ),
-myTransformer( 0 ),
-mySelMode( NoSelection )
+myTransformer( 0 )
 {
 }
 
@@ -333,7 +333,7 @@ bool GLViewer_Viewer::eventFilter( QObject* o, QEvent* e )
 /*!
     Called when smth is selected in this viewer. [ virtual protected slot ]
 */
-void GLViewer_Viewer::onSelectionDone( bool bAdded, SelectionChangeStatus status  )
+void GLViewer_Viewer::onSelectionDone( bool /*bAdded*/, SelectionChangeStatus status  )
 {
     emit selectionChanged( status );
 }
@@ -433,9 +433,9 @@ void GLViewer_Viewer::handleMousePress( QMouseEvent* e )
     if ( e->modifiers() & GLViewer_ViewTransformer::accelKey() )
     {
         Qt::MouseButton bs = e->button();
-        if ( bs == GLViewer_ViewTransformer::zoomButton() )
+        if ( (int)bs == GLViewer_ViewTransformer::zoomButton() ) // todo Qt::MouseButton is unsigned int: comparison of int with uint
             activateTransform( Zoom );
-        else if ( bs == GLViewer_ViewTransformer::panButton() )
+        else if ( (int)bs == GLViewer_ViewTransformer::panButton() ) // todo Qt::MouseButton is unsigned int: comparison of int with uint
             activateTransform( Pan );
     }
     else
@@ -472,7 +472,7 @@ void GLViewer_Viewer::handleMouseMove( QMouseEvent* e )
     }
     /* Try to activate default sketching
     */
-    else if ( e->button() == GLViewer_ViewSketcher::sketchButton() )
+    else if ( (int)e->button() == GLViewer_ViewSketcher::sketchButton() ) // todo Qt::MouseButton is unsigned int: comparison of int with uint
     {
         activateSketching( Rect );
         if ( mySketcher )
@@ -541,8 +541,8 @@ GLViewer_ViewTransformer::GLViewer_ViewTransformer( GLViewer_Viewer* v, int type
 : QObject( 0 ),
 myViewer( v ),
 myType( type ),
-myMajorBtn( Qt::NoButton ),
 myButtonState( 0 ),
+myMajorBtn( Qt::NoButton ),
 myRectBand( 0 )
 {
     if ( myType == GLViewer_Viewer::Pan ||
@@ -788,8 +788,8 @@ int GLViewer_ViewSketcher::sketchBtn = Qt::LeftButton;
 GLViewer_ViewSketcher::GLViewer_ViewSketcher( GLViewer_Viewer* viewer, int type )
 : QObject( 0 ),
 myViewer( viewer ),
-myData( 0 ),
 myType( type ),
+myData( 0 ),
 myRectBand( 0 )
 {
     if( !myViewer )
index 8cfad13b55587dd694e72747375340e4f5cff99b..ffb290df79375fe22fb2ce2e622a2c0b2e001468 100644 (file)
@@ -113,30 +113,8 @@ void GLViewer_Viewer2d::onChangeBgColor()
 /*!
   Updates colors for all drawers (does not work)
 */
-void GLViewer_Viewer2d::updateColors( QColor colorH, QColor colorS )
+void GLViewer_Viewer2d::updateColors( QColor /*colorH*/, QColor /*colorS*/ )
 {
-//  cout << "GLViewer_Viewer2d::updateColors" << endl;
-
-/*
-    for ( DrawerMap::Iterator it = myDrawers.begin(); it != myDrawers.end(); ++it )
-    {
-        it.key()->setHColor( colorH );
-        it.key()->setSColor( colorS );
-    }
-*/
-    /*
-    ObjList anObjects = myGLContext->getObjects();
-    ObjList::Iterator beginIt = anObjects.begin();
-    ObjList::Iterator endIt = anObjects.end();
-    for ( ObjList::Iterator it = beginIt; it != endIt; ++it )
-    {
-        //GLViewer_Drawer* aDrawer = (*it)->getDrawer();
-        //aDrawer->setHColor( colorH );
-        //aDrawer->setSColor( colorS );
-    }
-    */
-
-
   activateAllDrawers( true );
 }
 
@@ -215,12 +193,8 @@ void GLViewer_Viewer2d::updateAll()
 /*!
    \param onlyUpdate is passed to method activateAllDrawers drawers
 */
-void GLViewer_Viewer2d::updateDrawers( GLboolean update, GLfloat scX, GLfloat scY )
+void GLViewer_Viewer2d::updateDrawers( GLboolean update, GLfloat /*scX*/, GLfloat /*scY*/ )
 {
-//  cout << "GLViewer_Viewer2d::updateDrawers" << endl;
-
-    //myGLContext->updateScales( scX, scY );
-    //myGLSketcher->drawContour();
     activateAllDrawers( update );
 }
 
@@ -639,7 +613,7 @@ void GLViewer_Viewer2d::onMouseEvent( SUIT_ViewWindow*, QMouseEvent* e )
 */
 bool GLViewer_Viewer2d::testRotation( QMouseEvent* e )
 {
-    if ( ( e->button() == GLViewer_View2dTransformer::rotateButton() ) &&
+  if ( ( (int)e->button() == GLViewer_View2dTransformer::rotateButton() ) && // todo Qt::MouseButton is unsigned int: comparison of int with uint
          ( e->type() == QEvent::MouseButtonPress ) &&
          ( e->modifiers() & GLViewer_ViewTransformer::accelKey() ) )
     {
index ed455c711b53a62b3d4e098829db15de8cb0c013..9021ef00c45ad804127031ad934deaea3c21c605 100644 (file)
@@ -41,7 +41,7 @@
   A constructor
   Parameters using for QOGLWidget as is 
 */
-GLViewer_Widget::GLViewer_Widget( QWidget* parent, const char* name ):
+GLViewer_Widget::GLViewer_Widget( QWidget* parent, const char* /*name*/ ):
 QGLWidget( parent, 0/*, WRepaintNoErase | WResizeNoErase*/ )
 {
   myViewPort = ( GLViewer_ViewPort2d* )parent;
@@ -401,7 +401,7 @@ void GLViewer_Widget::mouseReleaseEvent( QMouseEvent* e )
 /*!
   Custom enter event handler
 */
-void GLViewer_Widget::enterEvent( QEvent* e )
+void GLViewer_Widget::enterEvent( QEvent* /*e*/ )
 {
   updateGL();
 }
@@ -409,7 +409,7 @@ void GLViewer_Widget::enterEvent( QEvent* e )
 /*!
   Custom leave event handler
 */
-void GLViewer_Widget::leaveEvent( QEvent* e )
+void GLViewer_Widget::leaveEvent( QEvent* /*e*/ )
 {
   updateGL();
 }
@@ -579,7 +579,7 @@ typedef unsigned int WORD;
         memcpy( dest, source, aSize/8 );
     else
     {
-        double r, g, b; WORD color;
+        double r=0, g=0, b=0; WORD color;
         for( int i=0; i<width; i++ )
         {
             color = 0;
index 159f795716193e3d2a45345e32cb96f854111d67..5ddccd747e2ea0ccfa89e1c48e4cbc702e395a0f 100644 (file)
@@ -99,7 +99,7 @@ QRectF GraphicsView_Object::getRect() const
 // Function : checkHighlight
 // Purpose  : 
 //================================================================
-bool GraphicsView_Object::checkHighlight( double theX, double theY, QCursor& theCursor ) const
+bool GraphicsView_Object::checkHighlight( double theX, double theY, QCursor& /*theCursor*/ ) const
 {
   return !getRect().isNull() && getRect().contains( theX, theY );
 }
@@ -111,7 +111,7 @@ bool GraphicsView_Object::checkHighlight( double theX, double theY, QCursor& the
 bool GraphicsView_Object::highlight( double theX, double theY )
 {
   QCursor aCursor;
-  if( myIsHighlighted = isVisible() )
+  if( (myIsHighlighted = isVisible()) )
     myIsHighlighted = checkHighlight( theX, theY, aCursor );
   return myIsHighlighted;
 }
@@ -132,7 +132,7 @@ void GraphicsView_Object::unhighlight()
 bool GraphicsView_Object::select( double theX, double theY, const QRectF& theRect )
 {
   QCursor aCursor;
-  if( myIsSelected = isVisible() )
+  if( (myIsSelected = isVisible()) )
   {
     if( !theRect.isNull() )
       myIsSelected = theRect.contains( getRect() );
index dd976fe6ff033429d1dce331a5924258b77cb534..a0900b28f346b0c06fd4bcc7bfc9d561a90e52e4 100644 (file)
@@ -74,10 +74,10 @@ public:
   virtual void               move( double theDX, double theDY, bool theIsAtOnce = false );
   virtual bool               finishMove( bool theStatus );
   virtual bool               isMoving() const { return myIsMoving; }
-  virtual bool               isMovingByXAllowed( double theDX ) { return true; }
-  virtual bool               isMovingByYAllowed( double theDY ) { return true; }
+  virtual bool               isMovingByXAllowed( double /*theDX*/ ) { return true; }
+  virtual bool               isMovingByYAllowed( double /*theDY*/ ) { return true; }
 
-  virtual bool               updateScale( bool theIsScaleUp, bool theIsCtrl ) { return false; }
+  virtual bool               updateScale( bool /*theIsScaleUp*/, bool /*theIsCtrl*/ ) { return false; }
 
   virtual QRectF             getPullingRect() const { return getRect(); }
   virtual bool               portContains( const QPointF& ) { return false; }
index 621fe0934ff2aaa64dfc479adfca017aff3e7b55..730eb940b46f4077b455bd92c3e1b98cd596910d 100644 (file)
@@ -76,6 +76,7 @@ void GraphicsView_Scene::processRectChanged()
 //================================================================
 void GraphicsView_Scene::onSceneRectChanged( const QRectF& theRect )
 {
+  (void)theRect; // unused in debug mode
 #ifdef VIEWER_DEBUG
   mySceneRectItem->setRect( theRect );
 #endif
@@ -170,7 +171,7 @@ void GraphicsView_Scene::contextMenuEvent( QGraphicsSceneContextMenuEvent* e )
 // Function : dragEnterEvent
 // Purpose  : 
 //================================================================
-void GraphicsView_Scene::dragEnterEvent( QGraphicsSceneDragDropEvent* e )
+void GraphicsView_Scene::dragEnterEvent( QGraphicsSceneDragDropEvent* /*e*/ ) //!< TODO: unused variable
 {
   //QGraphicsScene::dragEnterEvent( e ); // don't uncomment
 }
@@ -179,7 +180,7 @@ void GraphicsView_Scene::dragEnterEvent( QGraphicsSceneDragDropEvent* e )
 // Function : dragLeaveEvent
 // Purpose  : 
 //================================================================
-void GraphicsView_Scene::dragLeaveEvent( QGraphicsSceneDragDropEvent* e )
+void GraphicsView_Scene::dragLeaveEvent( QGraphicsSceneDragDropEvent* /*e*/ ) //!< TODO: unused variable
 {
   //QGraphicsScene::dragLeaveEvent( e ); // don't uncomment
 }
@@ -188,7 +189,7 @@ void GraphicsView_Scene::dragLeaveEvent( QGraphicsSceneDragDropEvent* e )
 // Function : dragMoveEvent
 // Purpose  : 
 //================================================================
-void GraphicsView_Scene::dragMoveEvent( QGraphicsSceneDragDropEvent* e )
+void GraphicsView_Scene::dragMoveEvent( QGraphicsSceneDragDropEvent* /*e*/ ) //!< TODO: unused variable
 {
   //QGraphicsScene::dragMoveEvent( e ); // don't uncomment
 }
@@ -197,7 +198,7 @@ void GraphicsView_Scene::dragMoveEvent( QGraphicsSceneDragDropEvent* e )
 // Function : dropEvent
 // Purpose  : 
 //================================================================
-void GraphicsView_Scene::dropEvent( QGraphicsSceneDragDropEvent* e )
+void GraphicsView_Scene::dropEvent( QGraphicsSceneDragDropEvent* /*e*/ ) //!< TODO: unused variable
 {
   //QGraphicsScene::dropEvent( e ); // don't uncomment
 }
index fa8c60a3ee0671df1e43308553e9f9c88c794576..fd57e5c4a41cc2badd63a3d73ae6d45cd64b412e 100644 (file)
@@ -103,7 +103,7 @@ void GraphicsView_Selector::unselectAll()
 // Function : checkSelection
 // Purpose  : 
 //================================================================
-void GraphicsView_Selector::checkSelection( int selBefore, bool append, int theStatus )
+void GraphicsView_Selector::checkSelection( int selBefore, bool /*append*/, int theStatus )
 {
   int selAfter = numSelected();
   if ( selBefore > 0 && selAfter < 1 )     
index 92ce3681e94cd263de9ae7f316f98f4052cd9174..42e06292c709e9873d9ffcc5783b79cce2c972aa 100644 (file)
@@ -285,7 +285,7 @@ void GraphicsView_ViewPort::addItem( QGraphicsItem* theItem )
 //================================================================
 bool GraphicsView_ViewPort::isItemAdded( QGraphicsItem* theItem )
 {
-  if( GraphicsView_Object* anObject = dynamic_cast<GraphicsView_Object*>( theItem ) )
+  if( dynamic_cast<GraphicsView_Object*>( theItem ) )
   {
     for( GraphicsView_ObjectList::iterator anIter = myObjects.begin(); anIter != myObjects.end(); anIter++ )
       if( theItem == *anIter )
@@ -1104,7 +1104,6 @@ void GraphicsView_ViewPort::highlight( double theX, double theY )
   bool anIsHighlighted = false;
   bool anIsOnObject = false;
 
-  GraphicsView_Object* aPreviousHighlightedObject = myHighlightedObject;
   GraphicsView_Object* aHighlightedObject = 0;
 
   QCursor aCursor;
@@ -1255,7 +1254,6 @@ int GraphicsView_ViewPort::select( const QRectF& theRect, bool theIsAppend )
   {
     aStatus = GVSS_NoChanged;
 
-    bool updateAll = false;
     if( !theIsAppend )
     {
       if( !mySelectedObjects.isEmpty() )
@@ -1605,8 +1603,8 @@ void GraphicsView_ViewPort::dragObjects( QGraphicsSceneMouseEvent* e )
     else
       anObjectsToMove.append( anObject );
   }
-  else if( ( hasInteractionFlag( DraggingByMiddleButton ) && ( e->buttons() & Qt::MidButton ) ||
-             isDraggingSelectedByLeftButton() && ( e->buttons() & Qt::LeftButton ) ) &&
+  else if( ( ( hasInteractionFlag( DraggingByMiddleButton ) && ( e->buttons() & Qt::MidButton ) ) ||
+             ( isDraggingSelectedByLeftButton() && ( e->buttons() & Qt::LeftButton ) ) ) &&
            nbSelected() )
   {
     for( initSelected(); moreSelected(); nextSelected() )
@@ -1802,8 +1800,8 @@ void GraphicsView_ViewPort::onMouseEvent( QGraphicsSceneMouseEvent* e )
         if( ( getHighlightedObject() &&
               getHighlightedObject()->isMovable() &&
               !( anAccel || e->button() != Qt::LeftButton ) ) ||
-            ( ( hasInteractionFlag( DraggingByMiddleButton ) && e->button() == Qt::MidButton ||
-                isDraggingSelectedByLeftButton() && e->button() == Qt::LeftButton ) &&
+            ( ( ( hasInteractionFlag( DraggingByMiddleButton ) && e->button() == Qt::MidButton ) ||
+                ( isDraggingSelectedByLeftButton() && e->button() == Qt::LeftButton ) ) &&
               nbSelected() && !anAccel ) )
         {
           myIsDragging = true;
index 51bce5e07c3c560e6cac4f5788aa1ec2148c96e1..e493321ea50b56b379ec0209d7b3edac0d33fbc8 100644 (file)
@@ -41,8 +41,8 @@ GraphicsView_ViewTransformer::GraphicsView_ViewTransformer( GraphicsView_Viewer*
 : QObject( 0 ),
   myViewer( v ),
   myType( type ),
-  myMajorBtn( Qt::NoButton ),
   myButtonState( 0 ),
+  myMajorBtn( Qt::NoButton ),
   myRectBand( 0 )
 {
   if( myType == GraphicsView_Viewer::Pan ||
index c57049b4fb505cabc008aefa9e3843544890ca1b..52819f3c3b0821c8947d94827baf8b6ed689e79f 100644 (file)
@@ -50,7 +50,7 @@
 // Name    : GraphicsView_Viewer
 // Purpose : Constructor
 //=======================================================================
-GraphicsView_Viewer::GraphicsView_Viewer( const QString& title, QWidget* widget )
+GraphicsView_Viewer::GraphicsView_Viewer( const QString& /*title*/, QWidget* widget )
 : SUIT_ViewModel(),
   mySelector( 0 ),
   myTransformer( 0 ),
@@ -364,7 +364,7 @@ void GraphicsView_Viewer::handleKeyPress( QKeyEvent* e )
 // Function : handleKeyRelease
 // Purpose  : 
 //================================================================
-void GraphicsView_Viewer::handleKeyRelease( QKeyEvent* e )
+void GraphicsView_Viewer::handleKeyRelease( QKeyEvent* /*e*/ ) //!< TODO: unused variable
 {
 }
 
@@ -378,9 +378,9 @@ void GraphicsView_Viewer::handleMousePress( QGraphicsSceneMouseEvent* e )
   if ( e->modifiers() & GraphicsView_ViewTransformer::accelKey() )
   {
     Qt::MouseButton bs = e->button();
-    if ( bs == GraphicsView_ViewTransformer::zoomButton() )
+    if ( (int)bs == GraphicsView_ViewTransformer::zoomButton() ) // todo Qt::MouseButton is unsigned int: comparison of int with uint
       activateTransform( Zoom );
-    else if ( bs == GraphicsView_ViewTransformer::panButton() )
+    else if ( (int)bs == GraphicsView_ViewTransformer::panButton() ) // todo Qt::MouseButton is unsigned int: comparison of int with uint
       activateTransform( Pan );
   }
   else // checking for other operations before selection in release event
@@ -407,8 +407,8 @@ void GraphicsView_Viewer::handleMousePress( QGraphicsSceneMouseEvent* e )
       else if( e->button() == Qt::LeftButton &&
                !( aViewPort->currentBlock() & GraphicsView_ViewPort::BS_Selection ) &&
                !aViewPort->getHighlightedObject() &&
-               ( !aViewPort->isDraggingSelectedByLeftButton() ||
-                 aViewPort->isDraggingSelectedByLeftButton() && aViewPort->nbSelected() == 0 ) )
+               ( ( !aViewPort->isDraggingSelectedByLeftButton() ) ||
+                 ( aViewPort->isDraggingSelectedByLeftButton() && aViewPort->nbSelected() == 0 ) ) )
       {
         // Start rectangular selection if pulling was not started
         QPoint p = aViewPort->mapFromScene( e->scenePos() );
@@ -563,7 +563,7 @@ void GraphicsView_Viewer::handleWheel( QGraphicsSceneWheelEvent* e )
 // Function : onSketchingFinished
 // Purpose  : 
 //================================================================
-void GraphicsView_Viewer::onSketchingFinished( QPainterPath thePath )
+void GraphicsView_Viewer::onSketchingFinished( QPainterPath /*thePath*/ )
 {
   // testing ImageViewer
   //onTestCropOperatorPerform( thePath );
index 491a5b379ba97dc513867f89d7d673fdff8d6dfd..1f104aaef3f05c234466ff44cd9402bf85b33ca1 100644 (file)
@@ -138,9 +138,9 @@ int StandardApp_Module::createStandardAction(const QString& label,
   }
 
   // Creating the action
-  QAction * action= this->createAction( effIdentifier, label, actionIcon,
-                                        label, effToolTip, 0, getApp()->desktop(),
-                                        false, slotobject, slotmember);
+  this->createAction( effIdentifier, label, actionIcon,
+                      label, effToolTip, 0, getApp()->desktop(),
+                      false, slotobject, slotmember);
 
   return effIdentifier;
 }
index 3a86c257a4c55a9d65150367a0a2aae8bdcbaacf..120ce8a3f85c0daeab18ceaa6427a06cd7e3b07d 100644 (file)
@@ -162,7 +162,6 @@ int main( int argc, char **argv )
 #if defined(WIN32) && defined(UNICODE)                   
   LPWSTR *szArglist = NULL;
   int nArgs;
-  int i;
   szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs);         
   helpfile = QString::fromWCharArray(szArglist[nArgs-1]);
   // Free memory allocated for CommandLineToArgvW arguments.
index cb2bfaf73171e1ccdb88670826d7171072987f19..3a8493790aede850302094a7e3102e1e97a5c898 100644 (file)
@@ -82,7 +82,7 @@ public:
 
     // Obsolete:
     void initialize(bool dummy = true)
-        { isRunning(); Q_UNUSED(dummy) }
+        { isRunning(); }
 
 public Q_SLOTS:
     bool sendMessage(const QString &message, int timeout = 5000);
index 983648dcf511b45151cb0381458a9fcb0a07aa66..1aa01cf53bf075d186cc28c3843646a311ebe0a4 100644 (file)
@@ -260,7 +260,7 @@ namespace
     int inputLen = input.length();
     QDataStream anInputData( &input, QIODevice::ReadOnly );
     while ( tmp < inputLen ) {
-      tmp = input.indexOf( QToolBarMarker, tmp + 1 );
+      tmp = input.indexOf( (uchar)QToolBarMarker, tmp + 1 );
       if ( tmp < 0 )
         break;
       anInputData.device()->seek( tmp );
@@ -1854,7 +1854,7 @@ void LightApp_Application::onStudySaved( SUIT_Study* s )
 }
 
 /*!Protected SLOT. On study closed.*/
-void LightApp_Application::onStudyClosed( SUIT_Study* s )
+void LightApp_Application::onStudyClosed( SUIT_Study* /*s*/ )
 {
   /*
   disconnect( this, SIGNAL( viewManagerRemoved( SUIT_ViewManager* ) ),
@@ -4937,7 +4937,7 @@ bool LightApp_Application::renameAllowed( const QString& /*entry*/) const {
   \param name new name of the object
   \brief Return \c true if rename operation finished successfully, \c false otherwise.
 */
-bool LightApp_Application::renameObject( const QString& entry, const QString& ) {
+bool LightApp_Application::renameObject( const QString& /*entry*/, const QString& /*name*/ ) {
   return false;
 }
 
@@ -5077,7 +5077,7 @@ QByteArray LightApp_Application::processState(QByteArray& input,
       return aRes;
     QDataStream anInputData(&input, QIODevice::ReadOnly);
 
-    int toolBarMarkerIndexDef;
+    int toolBarMarkerIndexDef = 0;
     if(hasDefaultState) {
       toolBarMarkerIndexDef = getToolbarMarkerIndex(defaultState, aNames);
       if(toolBarMarkerIndexDef < 0)
index ba1cc711cd839eaa514d61284f034ea54a0e580b..1d6be4f2af9f3526948328dcaf90d8538775dbd7 100644 (file)
@@ -55,7 +55,7 @@ LightApp_DataModel::~LightApp_DataModel()
 /*!
   Emit opened()
 */
-bool LightApp_DataModel::open( const QString&, CAM_Study* study, QStringList )
+bool LightApp_DataModel::open( const QString&, CAM_Study*, QStringList )
 {
   emit opened(); //TODO: is it really needed? to be removed maybe...
   return true;
index 9b3fa335d99353dabd5b4066bf20d9a71c8e0ce6..4fd462b3005dcd5144478cb9b5bf9f8c07632a63 100644 (file)
@@ -110,8 +110,8 @@ bool LightApp_DataObject::Key::isEqual( const SUIT_DataObjectKey* other ) const
 */
 LightApp_DataObject::LightApp_DataObject( SUIT_DataObject* parent )
 : CAM_DataObject( parent ),
-  myCompObject( 0 ),
-  myCompDataType( "" )
+  myCompDataType( "" ),
+  myCompObject( 0 )
 {
 }
 
index ea9ba59528850623fb92e8419eba3374a73df7ed..13bc99a01ef81d7523c80404f80317cdf29fe7f8 100644 (file)
@@ -74,7 +74,7 @@ bool LightApp_Driver::SaveDatasInFile( const char* theFileName, bool isMultiFile
   for (it = myMap.begin(); it != myMap.end(); ++it) {
     aModuleName[i] = const_cast<char*>(it->first.c_str());//(it->first);
     aFileBufferSize += 4;                                //Add 4 bytes: a length of the module name
-    aFileBufferSize += strlen(aModuleName[i])+1;
+    aFileBufferSize += (int)strlen(aModuleName[i])+1;          //!< TODO: conversion from size_t to int
     std::string aName(aModuleName[i]);
     PutFilesToStream(aName, aBuffer[i], aBufferSize[i], isMultiFile);
     aFileBufferSize += 8;                                //Add 8 bytes: a length of the buffer
@@ -99,7 +99,7 @@ bool LightApp_Driver::SaveDatasInFile( const char* theFileName, bool isMultiFile
 
   int aBufferNameSize = 0;
   for (i = 0; i < n; i++) {
-    aBufferNameSize = strlen(aModuleName[i])+1;
+    aBufferNameSize = (int)strlen(aModuleName[i])+1; //!< TODO: conversion from size_t to int
     //Initialize 4 bytes of the buffer by 0
     memset((aFileBuffer + aCurrentPos), 0, 4); 
     //Copy the length of the module name to the buffer
@@ -216,7 +216,7 @@ LightApp_Driver::ListOfFiles LightApp_Driver::GetListOfFiles( const char* theMod
   if (myMap.count(aName))
     aListOfFiles = myMap[aName];
 
-    return aListOfFiles;
+  return aListOfFiles;
 }
 
 /*!
@@ -238,7 +238,7 @@ void LightApp_Driver::PutFilesToStream( const std::string& theModuleName, unsign
   // aFiles must contain temporary directory name in its first item
   // and names of files (relatively the temporary directory) in the others
 
-  int i, aLength = aFiles.size() - 1;
+  int i, aLength = (int)aFiles.size() - 1; //!< TODO: conversion size_t to int
   if(aLength <= 0) {
     theBufferSize = 0;
     theBuffer = new unsigned char[theBufferSize];
@@ -273,7 +273,7 @@ void LightApp_Driver::PutFilesToStream( const std::string& theModuleName, unsign
       aFileSize[i] = aFile.tellg();
       aBufferSize += aFileSize[i];              //Add a space to store the file
     }
-    aFileNameSize[i] = strlen(aFName) + 1;
+    aFileNameSize[i] = (int)strlen(aFName) + 1;                //!< TODO: conversion from size_t to int
     aBufferSize += aFileNameSize[i];          //Add a space to store the file name
     aBufferSize += (theNamesOnly)?4:12;       //Add 4 bytes: a length of the file name,
                                               //    8 bytes: length of the file itself
@@ -409,7 +409,7 @@ LightApp_Driver::ListOfFiles LightApp_Driver::PutStreamToFiles( const unsigned c
 */
 void LightApp_Driver::RemoveFiles( const ListOfFiles& theFiles, const bool IsDirDeleted)
 {
-  int i, aLength = theFiles.size() - 1;
+  int i, aLength = (int)theFiles.size() - 1; //!< TODO: conversion size_t to int
   if(aLength <= 0) {
     return;
   }
index 5cf89653d85ce7b45046d1fc76e682737dcdf0f7..61a18f96d3c51a56c0e0af704bf853ebbb5f8f8b 100644 (file)
@@ -50,7 +50,7 @@ void LightApp_GVSelector::getSelection( SUIT_DataOwnerPtrList& theList ) const
       theList.append( new LightApp_DataOwner( aViewport->selectedObject()->getName() ) );
 }
 
-void LightApp_GVSelector::setSelection( const SUIT_DataOwnerPtrList& theList )
+void LightApp_GVSelector::setSelection( const SUIT_DataOwnerPtrList& /*theList*/ )
 {
 }
 
index da1d8a70c681e499621a75a6232d78210002dc8e..ff19dc9c4f078bdcb447307aad8055b6e3728b6e 100644 (file)
@@ -700,7 +700,7 @@ LightApp_Operation* LightApp_Module::operation( const int id ) const
 /*!
   virtual method called to manage the same operations
 */
-bool LightApp_Module::reusableOperation( const int id )
+bool LightApp_Module::reusableOperation( const int /*id*/ )
 {
  return true;
 } 
index 6f94f1327bb59c0e92eaae46586ed58bec7223ca..4a69a07a08db3ce3ef56b3e4614b0f78319d10d3 100644 (file)
@@ -101,11 +101,13 @@ void LightApp_OBSelector::setModified()
 */
 void LightApp_OBSelector::onSelectionChanged()
 {
+#ifdef _DEBUG_
   QTime t1 = QTime::currentTime();
+#endif
   mySelectedList.clear();
   selectionChanged();
-  QTime t2 = QTime::currentTime();
 #ifdef _DEBUG_
+  QTime t2 = QTime::currentTime();
   qDebug( QString( "selection time = %1 msecs" ).arg( t1.msecsTo( t2 ) ).toLatin1().constData() );
 #endif
 }
index b80b701afc4f41a097c4459e8eaec222ea0f705c..857985fe2f68910342cab558cc5c6c4c96a33d3c 100644 (file)
@@ -38,9 +38,10 @@ LightApp_Plot2dSelector::LightApp_Plot2dSelector( Plot2d_Viewer* v, SUIT_Selecti
   : SUIT_Selector( mgr, v ),
     myViewer(v)
 {
-  if ( v )
+  if ( v ) {
     connect( v, SIGNAL( legendSelected( const QString& ) ), this, SLOT( onSelectionChanged( const QString& ) ) );
     connect( v, SIGNAL( clearSelected() ), this, SLOT( onClearSelected( ) ) );
+  }
 }
 
 /*!
index c51f5bbdde166c343507495e96cbf2c6223ffad3..1a91cc437c4e15c03122e1e940b0b07efb5e070c 100644 (file)
@@ -167,7 +167,7 @@ bool LightApp_Study::saveDocumentAs( const QString& theFileName )
     
     std::set<std::string> aNewNames;
     std::set<std::string> toRemove;
-    int i, n;
+    size_t i, n;
     for( i = 0, n = aNewList.size(); i < n; i++ )
       aNewNames.insert( aNewList[ i ] );
     for( i = 0, n = anOldList.size(); i < n; i++ )
@@ -319,7 +319,7 @@ bool LightApp_Study::isSaved() const
 /*!
   Creates SComponent for module, necessary for SalomeApp study
 */
-void LightApp_Study::addComponent(const CAM_DataModel* dm)
+void LightApp_Study::addComponent(const CAM_DataModel* /*dm*/)
 {
 }
 
@@ -349,7 +349,7 @@ void LightApp_Study::saveModuleData(QString theModuleName, int type, QStringList
 void LightApp_Study::openModuleData(QString theModuleName, int /*type*/, QStringList& theListOfFiles)
 {
   std::vector<std::string> aListOfFiles =  myDriver->GetListOfFiles(theModuleName.toLatin1().constData());
-  int i, aLength = aListOfFiles.size() - 1;
+  int i, aLength = (int)aListOfFiles.size() - 1; //!< TODO: conversion size_t to int
   if (aLength < 0)
     return;
 
index e22c1c627f0a369a805df6c73632cc90cc0f63d7..8a8c68508c18204c9715e4732c9f845c3e8d8055 100644 (file)
@@ -135,9 +135,8 @@ bool LightApp_SwitchOp::eventFilter( QObject* theObj, QEvent* theEv )
           if ( !anOp->isActive() && anOp->isAutoResumed() &&
                study() && !study()->blockingOperation( anOp ) )
             study()->resume( anOp );
+          break;
         }
-        break;
-        
         case QEvent::MouseButtonRelease:
         case QEvent::MouseButtonPress:
         case QEvent::MouseButtonDblClick:
@@ -147,9 +146,10 @@ bool LightApp_SwitchOp::eventFilter( QObject* theObj, QEvent* theEv )
         {
           if ( !anOp->isActive() )
             return true;
+          break;
         }
-        break;
-        
+        default:
+          break;
       }
     }
   }
index 9853e1f79149ba340b28529daaff3d84ed48d38d..c5db9aaf05b89fb1cfa99fd1aa14641dce5ea5a0 100644 (file)
@@ -80,7 +80,7 @@ class LIGHTAPP_EXPORT LightApp_SVTKDataOwner : public LightApp_DataOwner
 */
 class LIGHTAPP_EXPORT LightApp_VTKSelector : public QObject, public SUIT_Selector
 {
-  Q_OBJECT;
+  Q_OBJECT
 
 public:
   virtual ~LightApp_VTKSelector() {};
index 173a7a1c8056c269f748bf7c697df1de10a923e6..f227a1fb3024bd0eee70e6c8cc32f1e482d8ec55 100644 (file)
@@ -45,6 +45,6 @@ namespace OCCViewer
 {
   OCCVIEWER_EXPORT Quantity_Color color( const QColor& );
   OCCVIEWER_EXPORT QColor         color( const Quantity_Color& );
-};
+}
 
 #endif //OCCVIEWER_H
index 223dfb0b6b4cedebd6c7f9b38f59cf38b1dab590..e814726b174170a4d86eee8d17594d4ffc9d84a6 100644 (file)
@@ -70,7 +70,7 @@ void OCCViewer_AISSelector::setHilightColor ( Quantity_NameOfColor color )
 {
   myHilightColor = color;
   if ( !myAISContext.IsNull() ) {
-    const Handle(Graphic3d_HighlightStyle)& hStyle = myAISContext->HighlightStyle();
+    const Handle(Prs3d_Drawer)& hStyle = myAISContext->HighlightStyle();
     hStyle->SetColor( myHilightColor );
   }
 }
@@ -82,7 +82,7 @@ void OCCViewer_AISSelector::setSelectColor ( Quantity_NameOfColor color )
 {
   mySelectColor = color;
   if ( !myAISContext.IsNull() ) {
-    const Handle(Graphic3d_HighlightStyle)& sStyle = myAISContext->SelectionStyle();
+    const Handle(Prs3d_Drawer)& sStyle = myAISContext->SelectionStyle();
     sStyle->SetColor( mySelectColor );
   }
 }
@@ -94,8 +94,8 @@ void OCCViewer_AISSelector::setAISContext ( const Handle (AIS_InteractiveContext
 {
   myAISContext = aisContext;
   if ( ! myAISContext.IsNull() ) { 
-    const Handle(Graphic3d_HighlightStyle)& hStyle = myAISContext->HighlightStyle();
-    const Handle(Graphic3d_HighlightStyle)& sStyle = myAISContext->SelectionStyle();
+    const Handle(Prs3d_Drawer)& hStyle = myAISContext->HighlightStyle();
+    const Handle(Prs3d_Drawer)& sStyle = myAISContext->SelectionStyle();
     hStyle->SetColor( myHilightColor );
     sStyle->SetColor( mySelectColor );
     myAISContext->SetSubIntensityColor( Quantity_NOC_CYAN1 );
@@ -114,7 +114,7 @@ bool OCCViewer_AISSelector::checkSelection ( AIS_StatusOfPick status,
   if ( myAISContext.IsNull() )
     return false;
 
-  myNumSelected = myAISContext->NbCurrents(); /* update after the last selection */
+  myNumSelected = myAISContext->NbCurrents(); /* update after the last selection */ // todo: NbCurrents is deprecated
   
   if ( status == AIS_SOP_NothingSelected && !hadSelection ) {
     emit selSelectionCancel( addTo );
index 83a079aefffd4f8cd66d3626e5c836332b892935..ffd572c2d5ce538c874b597a8b3d6005fcfc8e9a 100644 (file)
@@ -36,14 +36,14 @@ namespace
     result[1] = first[2]*second[0] - first[0]*second[2];
     result[2] = first[0]*second[1] - first[1]*second[0];
   }
-};
+}
 
 OCCViewer_ClipPlane::OCCViewer_ClipPlane()
-: X( 0.0 ),
+: Mode( Absolute ),
+  IsOn( true ),
+  X( 0.0 ),
   Y( 0.0 ),
-  Z( 0.0 ),
-  Mode( Absolute ),
-  IsOn( true )
+  Z( 0.0 )
 {
   OrientationType = AbsoluteCustom;
   AbsoluteOrientation.Dx = 0.0;
index 3b883d56bf35d773c7298e4d217cc03ca79c61f9..8081b6b474ac8b370dc0c0a8c734fb11b5ef19f1 100644 (file)
@@ -125,7 +125,7 @@ bool OCCViewer_ClipPlaneInteractor::isPerforming() const
 bool OCCViewer_ClipPlaneInteractor::isClickable( const Handle(AIS_Plane)& thePlane )
 {
   bool isFound = Standard_False;
-  for ( int aPlaneIt = 0; aPlaneIt < myPlanes.size(); ++aPlaneIt )
+  for ( int aPlaneIt = 0; aPlaneIt < (int)myPlanes.size(); ++aPlaneIt )
   {
     if ( myPlanes[aPlaneIt] == thePlane )
     {
@@ -141,7 +141,7 @@ bool OCCViewer_ClipPlaneInteractor::isClickable( const Handle(AIS_Plane)& thePla
 
   Handle(AIS_InteractiveContext) anAISContext = myViewer->getAISContext();
 
-  if ( anAISContext->IsSelected( Handle(AIS_InteractiveObject)::DownCast(thePlane) ) )
+  if ( anAISContext->IsSelected( thePlane ) )
   {
     return false;
   }
@@ -156,7 +156,7 @@ bool OCCViewer_ClipPlaneInteractor::isClickable( const Handle(AIS_Plane)& thePla
 bool OCCViewer_ClipPlaneInteractor::isDraggable( const Handle(AIS_Plane)& thePlane )
 {
   bool isFound = Standard_False;
-  for ( int aPlaneIt = 0; aPlaneIt < myPlanes.size(); ++aPlaneIt )
+  for ( int aPlaneIt = 0; aPlaneIt < (int)myPlanes.size(); ++aPlaneIt )
   {
     if ( myPlanes[aPlaneIt] == thePlane )
     {
@@ -172,7 +172,7 @@ bool OCCViewer_ClipPlaneInteractor::isDraggable( const Handle(AIS_Plane)& thePla
 
   Handle(AIS_InteractiveContext) anAISContext = myViewer->getAISContext();
 
-  if ( !anAISContext->IsSelected( Handle(AIS_InteractiveObject)::DownCast(thePlane) ) ) 
+  if ( !anAISContext->IsSelected( thePlane ) ) 
   {
     return false;
   }
@@ -323,10 +323,12 @@ bool OCCViewer_ClipPlaneInteractor::startDragging( const QPoint& thePickPos,
 
         myMouseDragPln = gp_Pln( aPickPoint, aMousePlnN );
 
+       /* todo: aDistance2Center, aCenterOnMousePln not used
         Standard_Real aDistance2Center = myMouseDragPln.Distance( aPlaneCenter );
         gp_Pnt aCenterOnMousePln = aMousePlnN * gp_Vec( aPickPoint, aPlaneCenter ) < 0.0
           ? aPlaneCenter.Translated( aMousePlnN *  aDistance2Center )
           : aPlaneCenter.Translated( aMousePlnN * -aDistance2Center );
+       */
 
         myRotationAxis = gp_Ax1( myRotationCenter, aMousePlnN );
       }
@@ -336,10 +338,12 @@ bool OCCViewer_ClipPlaneInteractor::startDragging( const QPoint& thePickPos,
 
         myMouseDragPln = gp_Pln( aPickPoint, aMousePlnN );
 
+       /* todo: aDistance2Center, aCenterOnMousePln not used
         Standard_Real aDistance2Center = myMouseDragPln.Distance( aPlaneCenter );
         gp_Pnt aCenterOnMousePln = aMousePlnN * gp_Vec( aPickPoint, aPlaneCenter ) < 0.0
           ? aPlaneCenter.Translated( aMousePlnN *  aDistance2Center )
           : aPlaneCenter.Translated( aMousePlnN * -aDistance2Center );
+       */
 
         myRotationAxis = gp_Ax1( myRotationCenter, aMousePlnN );
       }
@@ -348,6 +352,10 @@ bool OCCViewer_ClipPlaneInteractor::startDragging( const QPoint& thePickPos,
 
       return true;
     }
+    default:
+    {
+      break;
+    }
   }
 
   return false;
@@ -450,6 +458,8 @@ void OCCViewer_ClipPlaneInteractor::performDragging( const QPoint& theDragPos,
       myViewer->getAISContext()->Update( thePlane , Standard_True );
     }
     break;
+  default:
+    break;
   }
 }
 
@@ -522,7 +532,7 @@ bool OCCViewer_ClipPlaneInteractor::mousePress( QMouseEvent* theEvent,
   // process mouse click on the object
   if ( myIsClickable )
   {
-    myViewer->getAISContext()->SetSelected( Handle(AIS_InteractiveObject)::DownCast(aPlane) , Standard_True );
+    myViewer->getAISContext()->SetSelected( aPlane, Standard_True );
     emit planeClicked( aPlane );
   }
 
@@ -600,8 +610,8 @@ bool OCCViewer_ClipPlaneInteractor::mouseMove( QMouseEvent* theEvent,
   \param theEvent [in] the user event.
   \param theViewPort [in] the viewport.
 */
-bool OCCViewer_ClipPlaneInteractor::mouseRelease( QMouseEvent* theEvent,
-                                                  OCCViewer_ViewPort3d* theViewPort )
+bool OCCViewer_ClipPlaneInteractor::mouseRelease( QMouseEvent* /*theEvent*/,
+                                                  OCCViewer_ViewPort3d* /*theViewPort*/ )
 {
   if ( !isPerforming() )
   {
@@ -625,8 +635,8 @@ bool OCCViewer_ClipPlaneInteractor::mouseRelease( QMouseEvent* theEvent,
   \param theEvent [in] the user event.
   \param theViewPort [in] the viewport.
 */
-bool OCCViewer_ClipPlaneInteractor::mouseDoubleClick( QMouseEvent* theEvent,
-                                                      OCCViewer_ViewPort3d* theViewPort )
+bool OCCViewer_ClipPlaneInteractor::mouseDoubleClick( QMouseEvent* /*theEvent*/,
+                                                      OCCViewer_ViewPort3d* /*theViewPort*/ )
 {
   return isPerforming();
 }
index 4afd25da3a95a90feab5cb5891cfca65d8021ae9..d15249450640181ee97d1fe2e7c56d6e054c3b32 100644 (file)
@@ -791,7 +791,7 @@ void OCCViewer_ClippingDlg::setPlaneParam( OCCViewer_ClipPlane& thePlane )
 void OCCViewer_ClippingDlg::synchronize()
 {
   ComboBoxPlanes->clear();
-  int aNbPlanesAbsolute = myLocalPlanes.size();
+  int aNbPlanesAbsolute = (int)myLocalPlanes.size();
 
   QString aName;
   for(int i = 1; i<=aNbPlanesAbsolute; i++ ) {
@@ -905,7 +905,7 @@ void OCCViewer_ClippingDlg::updatePreview() {
     gp_Pnt aBasePnt;
     gp_Dir aNormal;
     clipPlaneParams(aClipPlane, ic, aSize, aBasePnt, aNormal, myModel->trihedronSize());
-    if(myPreviewPlaneVector.size() < clipPlanesCount()) {
+    if((int)myPreviewPlaneVector.size() < clipPlanesCount()) { //TODO: mismatch signed/unsigned
       myPreviewPlaneVector.resize(clipPlanesCount());
     }
     myPreviewPlane = myPreviewPlaneVector[aCurPlaneIndex];
@@ -930,7 +930,7 @@ void OCCViewer_ClippingDlg::updatePreview() {
     ic->SetColor( myPreviewPlane, Quantity_Color( 255. / 255., 70. / 255., 0. / 255., Quantity_TOC_RGB ), false );
     ic->Update( myPreviewPlane, Standard_False );
   } else {
-    if(myPreviewPlaneVector.size() > aCurPlaneIndex ) {
+    if((int)myPreviewPlaneVector.size() > aCurPlaneIndex ) {
       myPreviewPlane = myPreviewPlaneVector[aCurPlaneIndex];
       if(ic->IsDisplayed(myPreviewPlane)) {
        ic->Erase( myPreviewPlane, false );
@@ -939,7 +939,7 @@ void OCCViewer_ClippingDlg::updatePreview() {
       myPreviewPlaneVector[aCurPlaneIndex].Nullify();
     }
   }
-  for(int i = 0; i < myPreviewPlaneVector.size(); i++) {
+  for(int i = 0; i < (int)myPreviewPlaneVector.size(); i++) {//TODO: mismatch signed/unsigned
     if( i == aCurPlaneIndex ) continue;
     if(!myPreviewPlaneVector[i].IsNull())
       ic->SetColor( myPreviewPlaneVector[i], Quantity_Color( 85 / 255., 85 / 255., 255 / 255., Quantity_TOC_RGB ), false );
@@ -969,7 +969,7 @@ void OCCViewer_ClippingDlg::erasePreview()
 
   Handle(AIS_InteractiveContext) ic = myModel->getAISContext();
 
-  for ( int i=0; i < myPreviewPlaneVector.size(); i++ ) {
+  for ( int i=0; i < (int)myPreviewPlaneVector.size(); i++ ) {//TODO: mismatch signed/unsigned
   Handle(AIS_Plane) myPreviewPlane = myPreviewPlaneVector[i];
     if ( !myPreviewPlane.IsNull() && ic->IsDisplayed( myPreviewPlane ) ) {
       ic->Erase( myPreviewPlane, false );
@@ -1099,7 +1099,7 @@ void OCCViewer_ClippingDlg::ClickOnDelete()
 
   Handle(AIS_InteractiveContext) ic = myModel->getAISContext();
 
-  if(aPlaneIndex+1 <= myPreviewPlaneVector.size()) {
+  if(aPlaneIndex+1 <= (int)myPreviewPlaneVector.size()) {
     Handle(AIS_Plane) myPreviewPlane = myPreviewPlaneVector[aPlaneIndex];
     if ( !myPreviewPlane.IsNull() && ic->IsDisplayed( myPreviewPlane ) ) {
       ic->Erase( myPreviewPlane, false );
@@ -1227,7 +1227,7 @@ void OCCViewer_ClippingDlg::onSelectPlane ( int theIndex )
     return;
   }
 
-  OCCViewer_ClipPlane& aClipPlane = getClipPlane( theIndex );
+  //OCCViewer_ClipPlane& aClipPlane = getClipPlane( theIndex ); // unused
 
   myIsSelectPlane = true;
   updateControls();
@@ -1443,7 +1443,7 @@ void OCCViewer_ClippingDlg::onApply()
 */
 void OCCViewer_ClippingDlg::onPlaneClicked( const Handle_AIS_Plane& thePlane )
 {
-  for ( int aPlaneIt = 0; aPlaneIt < myPreviewPlaneVector.size(); aPlaneIt++ )
+  for ( int aPlaneIt = 0; aPlaneIt < (int)myPreviewPlaneVector.size(); aPlaneIt++ )
   {
     Handle(AIS_Plane)& aPlane = myPreviewPlaneVector.at( aPlaneIt );
     if ( aPlane != thePlane )
@@ -1462,7 +1462,7 @@ void OCCViewer_ClippingDlg::onPlaneClicked( const Handle_AIS_Plane& thePlane )
 */
 void OCCViewer_ClippingDlg::onPlaneDragged( const Handle_AIS_Plane& thePlane )
 {
-  for ( int aPlaneIt = 0; aPlaneIt < myPreviewPlaneVector.size(); aPlaneIt++ )
+  for ( int aPlaneIt = 0; aPlaneIt < (int)myPreviewPlaneVector.size(); aPlaneIt++ )
   {
     Handle(AIS_Plane)& aPlane = myPreviewPlaneVector.at( aPlaneIt );
     if ( aPlane != thePlane )
index 144477d3419904c14aef3e290cffddb844d3dd95..58777747291e42cf6e14111fe5bc58d7a12e7bda 100644 (file)
@@ -121,8 +121,6 @@ void OCCViewer_CreateRestoreViewDlg::changeImage( QListWidgetItem* curItem )
 {
   if( curItem && ( curItem->flags() & Qt::ItemIsEditable ) )
   {
-    int lowLevel  = -1;
-    int highLevel = -1;
     int index = curItem->listWidget()->row( curItem );  
     Handle(V3d_View) aView3d = myCurViewPort->getView();
     myCurrentItem = myParametersMap[ index ];
index 73342e85a9f196d3d76ee9f40d4364308eaa8d7c..48af6c684850f2a6ac47a7416c6108effb09bb05 100644 (file)
@@ -189,7 +189,6 @@ void OCCViewer_EnvTextureDlg::onTextureChanged()
   }
   else {
     myEnvTextureName->setText("");
-    Graphic3d_NameOfTextureEnv aStandardTexture;
     QList<Graphic3d_NameOfTextureEnv> aTextures;
     aTextures << Graphic3d_NOT_ENV_CLOUDS << Graphic3d_NOT_ENV_CV   << Graphic3d_NOT_ENV_MEDIT
                  << Graphic3d_NOT_ENV_PEARL  << Graphic3d_NOT_ENV_SKY1 << Graphic3d_NOT_ENV_SKY2
index d51a5ca772845bd6b5bf973aac806e96311f9190..c32c3842771fb7de42e35cf1d0327a5284a959bb 100644 (file)
@@ -76,7 +76,6 @@ OCCViewer_LightSourceDlg::OCCViewer_LightSourceDlg( OCCViewer_ViewWindow* view,
 
   const double min = -RealLast();
   const double max = RealLast();
-  const int precision = 3;
 
   /**********************   Directional light   **********************/
   /* Controls for directional light:
@@ -303,7 +302,7 @@ void OCCViewer_LightSourceDlg::initParam( bool theIsDefault )
     myModel->getViewer3d()->NextDefinedLights();
   }
 
-  double aX, aY, aZ;
+  double aX=0., aY=0., aZ=0.;
   Quantity_Color aColor = aLight->Color();
   if( myDirType->isChecked() ) {
     myDirColor->setColor( OCCViewer::color( aColor ) );
index c75b72a9e5ea151d771859d442390b661f7afa9d..ca25fb90bafb899f2a6f4a04457e7900680a8c45 100644 (file)
@@ -44,7 +44,7 @@
   \param modal - is this dialog modal
   \param fl - flags
 */
-OCCViewer_SetRotationPointDlg::OCCViewer_SetRotationPointDlg( OCCViewer_ViewWindow* view, const char* name, bool modal, Qt::WindowFlags fl )
+OCCViewer_SetRotationPointDlg::OCCViewer_SetRotationPointDlg( OCCViewer_ViewWindow* view, const char* /*name*/, bool modal, Qt::WindowFlags /*fl*/ )
 : QDialog( view, Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
   myView( view )
 {
index 7fb2e76ae2f0f1d3fd920a2ac482d4514b3411d3..e9efcd55fc52c9eb8fcf996117f577a21f1f8785 100644 (file)
@@ -74,7 +74,7 @@ void OCCViewer_ToolTip::setFont( const QFont& f )
   \param txtRect - returned tooltip text rectangle
   \param rect - returned tooltip rectangle
  */
-void OCCViewer_ToolTip::onToolTip( QPoint p, QString& str, QFont& f, QRect& txtRect, QRect& rect )
+void OCCViewer_ToolTip::onToolTip( QPoint p, QString& str, QFont& /*f*/, QRect& txtRect, QRect& rect )
 {
   OCCViewer_Viewer* v = dynamic_cast<OCCViewer_Viewer*>( myWnd->getViewManager()->getViewModel() );
   Handle( AIS_InteractiveContext ) aCont = v->getAISContext();
index e19e08cd569a77f16268711a9234eef2d880c6e6..0d37c0567e0ba0d55487982f15882d8085c2fbdc 100644 (file)
@@ -119,6 +119,8 @@ OCCViewer_ViewWindow::Mode2dType OCCViewer_Utilities::setViewer2DMode
       case OCCViewer_ViewWindow::YZPlane:
         aView3d->SetProj (V3d_Xpos);
         break;
+      default:
+        break;
     }
   }
 
index 4ede419bbbb7499babcdd64800b8c45fe61da6dc..d07e32f61ae7714bf3d31e0711676b5e69bca163 100644 (file)
@@ -57,27 +57,10 @@ Handle(Aspect_Window) OCCViewer_VService::CreateWindow( const Handle(V3d_View)&
 /*!
     Creates viewer 3d [ static ]
 */
-Handle(V3d_Viewer) OCCViewer_VService::CreateViewer( const Standard_ExtString name,
-                                                    const Standard_CString displayName,
-                                                    const Standard_CString domain,
-                                                    const Standard_Real viewSize ,
-                                                    const V3d_TypeOfOrientation viewProjection,
-                                                    const Standard_Boolean computedMode,
-                                                    const Standard_Boolean defaultComputedMode )
+Handle(V3d_Viewer) OCCViewer_VService::CreateViewer()
 {
   static Handle(OpenGl_GraphicDriver) aGraphicDriver;
   if (aGraphicDriver.IsNull())
-  {
-    Handle(Aspect_DisplayConnection) aDisplayConnection;
-#if !defined WIN32 && !defined __APPLE__
-    aDisplayConnection = new Aspect_DisplayConnection( displayName );
-#else
-    aDisplayConnection = new Aspect_DisplayConnection();
-#endif
-    aGraphicDriver = new OpenGl_GraphicDriver(aDisplayConnection);
-  }
-
-  return new V3d_Viewer( aGraphicDriver, name, domain, viewSize, viewProjection,
-                        Quantity_NOC_GRAY30, V3d_ZBUFFER, V3d_GOURAUD,
-                        computedMode, defaultComputedMode );
+    aGraphicDriver = new OpenGl_GraphicDriver(new Aspect_DisplayConnection());
+  return new V3d_Viewer(aGraphicDriver);
 }
index e1c966c58f6daf625c411275a24b27730b78c83f..b8fb91c04ee044029bd7e0af261af579dd4058cc 100644 (file)
 class Standard_EXPORT OCCViewer_VService
 {
 public:
-
   static Handle(Aspect_Window) CreateWindow( const Handle(V3d_View)&, WId );
-
-  static Handle(V3d_Viewer)    CreateViewer( const Standard_ExtString,
-                                            const Standard_CString = "",
-                                            const Standard_CString = "",
-                                            const Quantity_Length = 1000.0,
-                                            const V3d_TypeOfOrientation = V3d_XposYnegZpos,
-                                            const Standard_Boolean = Standard_True,
-                                            const Standard_Boolean = Standard_True );
+  static Handle(V3d_Viewer)    CreateViewer();
 };
 
 #endif
index e69020f420fe4beeecc92caaa468e16c98242592..f9ed085d91cf6e8d4c5e230fbab7d53db58433f5 100644 (file)
@@ -37,7 +37,7 @@
 #include <QApplication>
 
 OCCViewer_ViewFrame::OCCViewer_ViewFrame(SUIT_Desktop* theDesktop, OCCViewer_Viewer* theModel)
-  : OCCViewer_ViewWindow( theDesktop, theModel ), myPopupRequestedView(0), mySplitMode(-1)
+  : OCCViewer_ViewWindow( theDesktop, theModel ), mySplitMode(-1), myPopupRequestedView(0)
 {
   QFrame* centralFrame = new QFrame( this );
   setCentralWidget( centralFrame );
@@ -193,7 +193,7 @@ void OCCViewer_ViewFrame::splitSubViews()
        if( mySplitMode == -1 )
                return;
 
-  int aNbViews;
+  int aNbViews = 1;
   if ( mySplitMode >= 0 && mySplitMode < 2)
     aNbViews = 2;
   else if( mySplitMode >= 2 && mySplitMode < 8 )
@@ -202,7 +202,7 @@ void OCCViewer_ViewFrame::splitSubViews()
     aNbViews = 4;
 
   if( aNbViews != myViewsMode.count() )
-       return;
+    return;
 
   int SubViews3Map[6][3][4] = {
     { {0,0,1,1}, {0,1,1,1}, {0,2,1,1} },
index d216935bfb66811846a28b2d4fdc5ec5975f2bde..f5684a1fd74815b28e0521762bf59b0559e7d1ee 100644 (file)
@@ -145,15 +145,15 @@ public slots:
   virtual void activateRotation() {}
   virtual void activatePanning() {}
   virtual void activateGlobalPanning() {}
-  virtual void onSetRotationPoint( bool on ) {}
+  virtual void onSetRotationPoint( bool /*on*/ ) {}
   virtual void onAxialScale() {}
   virtual void onAmbientToogle() {}
   virtual void onMemorizeView() {}
   virtual void onRestoreView() {}
-  virtual void onSwitchInteractionStyle( bool on ) {}
+  virtual void onSwitchInteractionStyle( bool /*on*/ ) {}
 
   virtual void activateSetRotationGravity() {}
-  virtual void activateSetRotationSelected( double theX, double theY, double theZ ) {}
+  virtual void activateSetRotationSelected( double /*theX*/, double /*theY*/, double /*theZ*/ ) {}
   virtual void activateStartPointSelection( TopAbs_ShapeEnum ) {}
   virtual void updateGravityCoords() {}
    
index 49adfd65b23fe1867716bb35d973f53a160b0131..be6a7dea88d3aff34527ab6ba89bfa5c63c3251b 100644 (file)
@@ -122,15 +122,15 @@ void OCCViewer_Viewer::stereoData( QStringList& typeList, QIntList& idList)
 */
 OCCViewer_Viewer::OCCViewer_Viewer( bool DisplayTrihedron)
 : SUIT_ViewModel(),
-  myBackgrounds(4, Qtx::BackgroundData( Qt::black )),
   myIsRelative(true),
-  myTopLayerId( 0 ),
+  myTopLayerId(0),
   myTrihedronSize(100),
-  myClippingDlg (NULL),
+  myBackgrounds(4, Qtx::BackgroundData(Qt::black)),
+  myClippingDlg(0),
   myFitter(0)
 {
   // init CasCade viewers
-  myV3dViewer = OCCViewer_VService::CreateViewer( TCollection_ExtendedString("Viewer3d").ToExtString() );
+  myV3dViewer = OCCViewer_VService::CreateViewer();
   //myV3dViewer->Init(); // to avoid creation of the useless perspective view (see OCCT issue 0024267)
   setDefaultLights();
 
@@ -161,9 +161,9 @@ OCCViewer_Viewer::OCCViewer_Viewer( bool DisplayTrihedron)
     Handle(Prs3d_Drawer) drawer = myTrihedron->Attributes();
     if (drawer->HasOwnDatumAspect()) {
       Handle(Prs3d_DatumAspect) daspect = drawer->DatumAspect();
-      daspect->FirstAxisAspect()->SetColor(Quantity_Color(1.0, 0.0, 0.0, Quantity_TOC_RGB));
-      daspect->SecondAxisAspect()->SetColor(Quantity_Color(0.0, 1.0, 0.0, Quantity_TOC_RGB));
-      daspect->ThirdAxisAspect()->SetColor(Quantity_Color(0.0, 0.0, 1.0, Quantity_TOC_RGB));
+      daspect->LineAspect(Prs3d_DP_XAxis)->SetColor(Quantity_Color(1.0, 0.0, 0.0, Quantity_TOC_RGB));
+      daspect->LineAspect(Prs3d_DP_YAxis)->SetColor(Quantity_Color(0.0, 1.0, 0.0, Quantity_TOC_RGB));
+      daspect->LineAspect(Prs3d_DP_ZAxis)->SetColor(Quantity_Color(0.0, 0.0, 1.0, Quantity_TOC_RGB));
     }
   }
 
@@ -322,7 +322,7 @@ void OCCViewer_Viewer::setViewManager(SUIT_ViewManager* theViewManager)
 /*!
   SLOT: called on mouse button press, stores current mouse position as start point for transformations
 */
-void OCCViewer_Viewer::onMousePress(SUIT_ViewWindow* theWindow, QMouseEvent* theEvent)
+void OCCViewer_Viewer::onMousePress(SUIT_ViewWindow* /*theWindow*/, QMouseEvent* theEvent)
 {
   myStartPnt.setX(theEvent->x()); myStartPnt.setY(theEvent->y());
 }
@@ -373,7 +373,7 @@ void OCCViewer_Viewer::onMouseRelease(SUIT_ViewWindow* theWindow, QMouseEvent* t
   if (myStartPnt == myEndPnt)
   {
     if (!aHasShift) {
-      myAISContext->ClearCurrents( false );
+      myAISContext->ClearCurrents( false ); // todo: ClearCurrents is deprecated
       emit deselection();
     }
     if ( !isPreselectionEnabled() ) {
@@ -432,7 +432,7 @@ void OCCViewer_Viewer::onKeyPress(SUIT_ViewWindow* theWindow, QKeyEvent* theEven
   switch ( theEvent->key() ) {
   case  Qt::Key_S:
     if (!aHasShift) {
-      myAISContext->ClearCurrents( false );
+      myAISContext->ClearCurrents( false ); // todo: ClearCurrents is deprecated
       emit deselection();
     }
 
@@ -1187,7 +1187,7 @@ bool OCCViewer_Viewer::unHighlightAll( bool updateviewer, bool unselect )
   \param onlyInViewer - search object only in viewer (so object must be displayed)
 */
 bool OCCViewer_Viewer::isInViewer( const Handle(AIS_InteractiveObject)& obj,
-                                   bool onlyInViewer )
+                                   bool /*onlyInViewer*/ )
 {
   AIS_ListOfInteractive List;
   myAISContext->DisplayedObjects(List);
@@ -1314,7 +1314,6 @@ void OCCViewer_Viewer::setTrihedronShown( const bool on )
                            0 /*wireframe*/,
                            -1 /* selection mode */,
                            Standard_True /* update viewer*/,
-                           Standard_False /* allow decomposition */,
                            AIS_DS_Displayed /* display status */);
     myAISContext->Deactivate( myTrihedron );
   }
@@ -1451,7 +1450,7 @@ bool OCCViewer_Viewer::computeTrihedronSize( double& theNewSize, double& theSize
 
   float aSizeInPercents = SUIT_Session::session()->resourceMgr()->doubleValue("3DViewer","trihedron_size", 100.);
 
-  static float EPS = 5.0E-3;
+  static float EPS = 5.0E-3f;
   theSize = getTrihedron()->Size();
   theNewSize = aMaxSide*aSizeInPercents / 100.0;
 
@@ -1570,7 +1569,7 @@ void OCCViewer_Viewer::setClipPlanes(ClipPlanesList theList)
     Handle(AIS_InteractiveObject) anObj = anIter.Value();
     Handle(ViewerData_AISShape) aShape = Handle(ViewerData_AISShape)::DownCast (anObj);
     if (!aShape.IsNull() && aShape->IsClippable()) {
-      aShape->SetClipPlanes(myInternalClipPlanes);
+      aShape->SetClipPlanes(new Graphic3d_SequenceOfHClipPlane(myInternalClipPlanes)); // todo: store clipping planes in a handle?
     }
   }
 }
@@ -1589,7 +1588,7 @@ void OCCViewer_Viewer::applyExistingClipPlanesToObject (const Handle(AIS_Interac
   Handle(ViewerData_AISShape) aShape = Handle(ViewerData_AISShape)::DownCast (theObject);
   if (!aShape.IsNull() && aShape->IsClippable())
   {
-    aShape->SetClipPlanes (myInternalClipPlanes);
+    aShape->SetClipPlanes (new Graphic3d_SequenceOfHClipPlane(myInternalClipPlanes)); // todo: store clipping planes in a handle?
   }
 }
 
index c9f5905fa287b0b2771ad37cf3191dccf29e0fb9..e1b86598614015ee8afb8f177ce17afbaa410379 100644 (file)
@@ -64,8 +64,8 @@ static Standard_Boolean zRotation = Standard_False;
 */
 OCCViewer_ViewPort3d::OCCViewer_ViewPort3d( QWidget* parent, const Handle( V3d_Viewer)& viewer, V3d_TypeOfView  type )
   : OCCViewer_ViewPort( parent ),
-    myScale( 1.0 ),
     myBusy( true ),
+    myScale( 1.0 ),
     myIsAdvancedZoomingEnabled( false )
 {
   // VSR: 01/07/2010 commented to avoid SIGSEGV at SALOME exit
@@ -470,7 +470,7 @@ void OCCViewer_ViewPort3d::startRotation( int x, int y,
                             theSelectedPoint.X(),theSelectedPoint.Y(), theSelectedPoint.Z(),
                             Standard_True );
 
-      Quantity_Ratio zRotationThreshold;
+      Standard_Real zRotationThreshold;
       zRotation = Standard_False;
       zRotationThreshold = 0.45;
       if( zRotationThreshold > 0. ) {
@@ -580,7 +580,7 @@ void OCCViewer_ViewPort3d::repaintViewAfterMove( )
 /*!
   Fits all objects in view. [ virtual protected ]
 */
-void OCCViewer_ViewPort3d::fitAll( bool keepScale, bool withZ, bool upd )
+void OCCViewer_ViewPort3d::fitAll( bool keepScale, bool /*withZ*/, bool upd )
 {
   if ( activeView().IsNull() )
     return;
index 6e2cbc007668cd4769e8ea0dad1b2cbd4f503de1..4a60b76cc58187e809f4fb4f5f7db5e2dd4638c1 100644 (file)
@@ -256,7 +256,7 @@ void OCCViewer_RectSketcher::onMouse( QMouseEvent* e )
   else
     avp->setCursor( Qt::ForbiddenCursor );
 
-  if ( e->type() == QEvent::MouseButtonRelease && e->button() == sketchButton() )
+  if ( e->type() == QEvent::MouseButtonRelease && (int)e->button() == sketchButton() ) // todo Qt::MouseButton is unsigned int: comparison of int with uint
   {
     myResult = Accept;
     QApplication::postEvent( avp, new QMouseEvent( e->type(), e->pos(),
@@ -554,7 +554,7 @@ bool OCCViewer_PolygonSketcher::isValid( const QPolygon* aPoints, const QPoint&
     return true;
 
   bool res = true;
-  for ( uint i = 0; i < aPoints->count() - 1 && res; i++ )
+  for ( int i = 0; i < aPoints->count() - 1 && res; i++ )
   {
     const QPoint& aStart = aPoints->point( i );
     const QPoint& anEnd  = aPoints->point( i + 1 );
index d533fe32216ea5d923c20f089ea3921c2624fcb1..4d6e44d41570f136099fb0c3cb8093fcf362956b 100644 (file)
@@ -70,7 +70,7 @@ public:
   virtual bool                 isDefault() const;
   virtual bool                 eventFilter( QObject*, QEvent* );
 
-  virtual void                 setSketcherMode(int theMode) {}
+  virtual void                 setSketcherMode(int) {}
   virtual int                  sketcherMode() const { return 0; }
 
 private slots:
index 104a964becf3069193d46696ba057e983c86be60..0dc30dbc6ecb0d35a5e4e7630701dec91273e689 100644 (file)
@@ -319,6 +319,8 @@ void OCCViewer_ViewWindow::initLayout()
   case YZPlane:
     onFrontView();
     break;
+  default:
+    break;
   }
 
   // Graduated axes dialog
@@ -716,11 +718,10 @@ bool OCCViewer_ViewWindow::computeGravityCenter( double& theX, double& theY, dou
     if ( aStructure->IsEmpty() || !aStructure->IsVisible() || aStructure->CStructure()->IsForHighlight )
       continue;
 
-    Bnd_Box aBox1 = aStructure->MinMaxValues();
     const Graphic3d_BndBox3d& aBox = aStructure->CStructure()->BoundingBox();
     if (!aBox.IsValid())
       continue;
-    aXmin = /*aBox.IsVoid() ? RealFirst() :*/ aBox.CornerMin().x();
+    aXmin = /*aBox.IsVoid() ? RealFirst() : */aBox.CornerMin().x();
     aYmin = /*aBox.IsVoid() ? RealFirst() : */aBox.CornerMin().y();
     aZmin = /*aBox.IsVoid() ? RealFirst() : */aBox.CornerMin().z();
     aXmax = /*aBox.IsVoid() ? RealLast()  : */aBox.CornerMax().x();
@@ -984,7 +985,7 @@ void OCCViewer_ViewWindow::vpMouseMoveEvent( QMouseEvent* theEvent )
       int aButton = theEvent->buttons();
       int anInteractionStyle = interactionStyle();
       if ( ( anInteractionStyle == SUIT_ViewModel::STANDARD &&
-           aButton == Qt::LeftButton && ( aState == Qt::NoModifier || Qt::ShiftModifier ) ) ||
+           aButton == Qt::LeftButton && ( aState == Qt::NoModifier || aState == Qt::ShiftModifier ) ) ||
          ( anInteractionStyle == SUIT_ViewModel::KEY_FREE &&
          aButton == Qt::LeftButton && ( aState == Qt::ControlModifier || aState == ( Qt::ControlModifier|Qt::ShiftModifier ) ) ) ) {
         myDrawRect = myEnableDrawMode;
@@ -1111,6 +1112,8 @@ void OCCViewer_ViewWindow::vpMouseReleaseEvent(QMouseEvent* theEvent)
       resetState();
     }
     break;
+  default:
+    break;
   }
 
   // NOTE: viewer 3D detects a rectangle of selection using this event
@@ -2398,9 +2401,9 @@ QImage OCCViewer_ViewWindow::dumpView()
 #endif // USE_OLD_IMPLEMENTATION
 }
 
-bool OCCViewer_ViewWindow::dumpViewToFormat( const QImage& img,
+bool OCCViewer_ViewWindow::dumpViewToFormat( const QImage& /*img*/,
                                              const QString& fileName,
-                                             const QString& format )
+                                             const QString& /*format*/ )
 {
   bool res = false;
   QApplication::setOverrideCursor( Qt::WaitCursor );
@@ -2618,7 +2621,7 @@ QString OCCViewer_ViewWindow::getVisualParameters()
   data << QString( "size=%1" )     .arg( params.size,    0, 'f',  2 );
 
   ClipPlanesList aPlanes =  myModel->getClipPlanes();
-  for ( int i=0; i < aPlanes.size(); i++ )
+  for ( int i=0; i < (int)aPlanes.size(); i++ )
   {
     OCCViewer_ClipPlane& aPlane = aPlanes[i];
     QString ClippingPlane = QString( "ClippingPlane%1=").arg( i+1 );
@@ -2739,6 +2742,8 @@ QString OCCViewer_ViewWindow::getVisualParameters()
         Handle(V3d_DirectionalLight)::DownCast( aLight )->Direction( aX, aY, aZ );
       else if ( aLight->Type() == V3d_POSITIONAL )
         Handle(V3d_PositionalLight)::DownCast( aLight )->Position( aX, aY, aZ );
+      else
+       continue; // not supported type of light source
       LightSource += QString( "lightX~%1;" ).arg( aX );
       LightSource += QString( "lightY~%1;" ).arg( aY );
       LightSource += QString( "lightZ~%1;" ).arg( aZ );
@@ -2914,10 +2919,10 @@ void OCCViewer_ViewWindow::setVisualParameters( const QString& parameters )
            myModel->getViewer3d()->NextDefinedLights();
          }
         }
-        double aX, aY, aZ;
-        double cR, cG, cB;
-        V3d_TypeOfLight aType;
-        bool isHeadlight;
+        double aX = 0., aY = 0., aZ = 0.;
+        double cR = 0., cG = 0., cB = 0.;
+        V3d_TypeOfLight aType = (V3d_TypeOfLight)-1; // not specified
+        bool isHeadlight = false;
         QStringList lsData = paramValue.split( ';' );
         foreach( QString lsParam, lsData )
         {
@@ -3622,7 +3627,7 @@ void OCCViewer_ViewWindow::synchronize( SUIT_ViewWindow* theView )
     aDestView->SetImmediateUpdate( Standard_True );
     aDestView->Redraw();
   } 
-  catch (Standard_Failure) {
+  catch (Standard_Failure&) {
   }
 
   blockSignals( blocked );
@@ -3763,7 +3768,7 @@ void OCCViewer_ViewWindow::projAndPanToGravity(V3d_TypeOfOrientation CamOri)
   if( USE_XY )
   {
     const double EPS = 1E-6;
-    int xp = myViewPort->width()/2, yp = myViewPort->height()/2, xp1, yp1;
+    int xp = myViewPort->width()/2, yp = myViewPort->height()/2;
     aView3d->Convert( xp, yp, X, Y, Z );
 
     gp_Dir d = aView3d->Camera()->Direction();
index b8a3933f68d06938de41f0ffa006b386d87b779d..65f841bb832d588a904322fe8fd64452d76573a4 100644 (file)
@@ -26,7 +26,7 @@
 #include <SALOMEconfig.h>
 #include CORBA_CLIENT_HEADER(SALOME_ContainerManager)
 
-PVServer_ServiceLoader::PVServer_ServiceLoader() throw(PVServer_ServiceLoader_Exception):
+PVServer_ServiceLoader::PVServer_ServiceLoader():
   myLcc( 0 )
 {
   try
index 43023382482ca654a6db83d74889ef71cb2214b2..87731857202d926dc3d2b83b8a1dbf80a109a31c 100644 (file)
@@ -33,8 +33,8 @@ class PVSERVERSERVICELOADER_EXPORT PVServer_ServiceLoader_Exception: public std:
 {
 public:
   PVServer_ServiceLoader_Exception(const std::string & what):_what(what) {}
-  ~PVServer_ServiceLoader_Exception() throw () {}
-  virtual const char* what() const throw() { return _what.c_str(); }
+  ~PVServer_ServiceLoader_Exception() noexcept {}
+  virtual const char* what() const noexcept { return _what.c_str(); }
 private:
   std::string _what;
 };
@@ -42,7 +42,7 @@ private:
 class PVSERVERSERVICELOADER_EXPORT PVServer_ServiceLoader
 {
 public:
-  PVServer_ServiceLoader() throw(PVServer_ServiceLoader_Exception);
+  PVServer_ServiceLoader() ;
   virtual ~PVServer_ServiceLoader();
 
   //! Get the IOR of the CORBA service handling the PVServer
index 80f4dfabf80e1497d8d7c989493ac9783cce15ad..b2302b1f1d6ffb1df81a45e0182f20fe5c678574 100644 (file)
@@ -60,7 +60,7 @@ PVViewer_Behaviors::PVViewer_Behaviors(QMainWindow * parent)
  * This method should be updated at each new version of ParaView with what is found in
  *    Qt/ApplicationComponents/pqParaViewBehaviors.cxx
  */
-void PVViewer_Behaviors::instanciateMinimalBehaviors(QMainWindow * desk)
+void PVViewer_Behaviors::instanciateMinimalBehaviors(QMainWindow * /*desk*/)
 {
   if (BehaviorLoadingLevel < 1)
     {
index 2f34196e64289f2994f413a34aba66fc7b5dcfb7..06730898a2f5b174c4f79893b898a3fad8361afb 100644 (file)
@@ -60,7 +60,7 @@ pqPVApplicationCore * PVViewer_Core::GetPVApplication()
   \param fullSetup whether to instanciate all behaviors or just the minimal ones.
   \return \c true if ParaView has been initialized successfully, otherwise false
 */
-bool PVViewer_Core::ParaviewInitApp(QMainWindow * aDesktop)
+bool PVViewer_Core::ParaviewInitApp(QMainWindow * /*aDesktop*/)
 {
   if ( ! MyCoreApp) {
       // Obtain command-line arguments
index 878187082f77bba691cb53eb91358f05c410aee4..43dac127249add167f44b14c2110a7760ee0b121 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <vtkObjectFactory.h>
 
-vtkStandardNewMacro(PVViewer_OutputWindow);
+vtkStandardNewMacro(PVViewer_OutputWindow)
 
 PVViewer_OutputWindow::PVViewer_OutputWindow()
 {
@@ -31,27 +31,27 @@ PVViewer_OutputWindow::~PVViewer_OutputWindow()
 {
 }
 
-const unsigned int PVViewer_OutputWindow::getTextCount()
+unsigned int PVViewer_OutputWindow::getTextCount() const
 {
   return count(MESSAGE_TYPE_TEXT);
 }
 
-const unsigned int PVViewer_OutputWindow::getErrorCount()
+unsigned int PVViewer_OutputWindow::getErrorCount() const
 {
   return count(MESSAGE_TYPE_ERROR);
 }
 
-const unsigned int PVViewer_OutputWindow::getWarningCount()
+unsigned int PVViewer_OutputWindow::getWarningCount() const
 {
   return count(MESSAGE_TYPE_WARNING);
 }
 
-const unsigned int PVViewer_OutputWindow::getGenericWarningCount()
+unsigned int PVViewer_OutputWindow::getGenericWarningCount() const
 {
   return count(MESSAGE_TYPE_GENERIC_WARNING);
 }
 
-const unsigned int PVViewer_OutputWindow::getDebugCount()
+unsigned int PVViewer_OutputWindow::getDebugCount() const
 {
   return count(MESSAGE_TYPE_DEBUG);
 }
@@ -79,7 +79,7 @@ void PVViewer_OutputWindow::DisplayText(const char* text)
   }
 }
 
-int PVViewer_OutputWindow::count(const MessageTypes& type)
+int PVViewer_OutputWindow::count(const MessageTypes& type) const
 {
   return myCounter.value(type, 0);
 }
index 2e1acd0960eebf567cc291106650a7900a4683bf..79df51291472dd519739b7cb689b4bdd0b8471b0 100644 (file)
@@ -38,18 +38,18 @@ class PVVIEWER_EXPORT PVViewer_OutputWindow : public vtkOutputWindow
 {
 public:
   static PVViewer_OutputWindow* New();
-  vtkTypeMacro(PVViewer_OutputWindow, vtkOutputWindow);
+  vtkTypeMacro(PVViewer_OutputWindow, vtkOutputWindow)
 
   //! Returns the number of text messages received
-  const unsigned int getTextCount();
+  unsigned int getTextCount() const;
   //! Returns the number of error messages received
-  const unsigned int getErrorCount();
+  unsigned int getErrorCount() const;
   //! Returns the number of warning messages received
-  const unsigned int getWarningCount();
+  unsigned int getWarningCount() const;
   //! Returns the number of generic warning messages received
-  const unsigned int getGenericWarningCount();
+  unsigned int getGenericWarningCount() const;
   //! Returns the number of debug messages received
-  const unsigned int getDebugCount();
+  unsigned int getDebugCount() const;
 
 private:
   PVViewer_OutputWindow();
@@ -60,7 +60,7 @@ private:
   QMap<MessageTypes, int> myCounter;
 
   void DisplayText(const char*);
-  int count(const MessageTypes&);
+  int count(const MessageTypes&) const;
 };
 
 #endif // PVVIEWER_OUTPUTWINDOW_H
index 2b79a07724a86e023206f0be745c68279ce357e6..91fc801503c5d1c6f1c2ae75642716c4506c4eed 100644 (file)
@@ -47,7 +47,7 @@ Plot2d_Point::Plot2d_Point()
   Constructor
 */
 Plot2d_Point::Plot2d_Point( double theX, double theY, const QString& theText )
-  : x( theX ), y( theY ), text( theText ), deviationPtr(0)
+  : x( theX ), y( theY ), deviationPtr(0), text( theText )
 {
 }
 
index 893af1668b02d51673fe951592501923293152b2..ca9e79192d3b0acb3c755f3e219d1d1457671cd4 100644 (file)
@@ -44,9 +44,9 @@ Plot2d_AnalyticalCurve::Plot2d_AnalyticalCurve() :
   myMarkerSize( 0 ), 
   myLine( Plot2d::Solid ), 
   myLineWidth( 0 ),
+  myNbIntervals(100),
   myRangeBegin(0.0),
   myRangeEnd(100.0),
-  myNbIntervals(100),
   myExpression(""),
   myAction(Plot2d_AnalyticalCurve::ActAddInView),
   myState(Plot2d_AnalyticalCurve::StateNeedUpdate),
index 80d78831363e54d9a1192d2aa039b7f075ca8e57..474177fe71566783d2a9ba7a9c3493403d8dff79 100644 (file)
@@ -58,13 +58,13 @@ namespace {
   static PyMethodDef PyStdOut_methods[] = {
     {"write",  (PyCFunction)PyStdOut_write,  METH_VARARGS,
       PyDoc_STR("write(string) -> None")},
-    {NULL,    NULL}   /* sentinel */
+    {0, 0, 0, 0}   /* sentinel */
   };
 
   static PyMemberDef PyStdOut_memberlist[] = {
     {(char*)"softspace", T_INT,  offsetof(PyStdOut, softspace), 0,
      (char*)"flag indicating that a space needs to be printed; used by print"},
-    {NULL} /* Sentinel */
+    {0, 0, 0, 0, 0}   /* sentinel */
   };
 
   static PyTypeObject PyStdOut_Type = {
index 55096fa9ea1aa960d2a5eac9c99e9808226116cf..cb0f714167dcbffe8675800693b43b022542e914 100644 (file)
@@ -108,7 +108,7 @@ void  Plot2d_NormalizeAlgorithm::execute() {
 
     double pMin, pMax, kKoef, bKoef, yMin, yMax;
     switch( getNormalizationMode() ) {
-      case NormalizeToMin:
+    case NormalizeToMin:
       pMin = _pMin;
       for (int i = 0; i < yMaxLst.size(); ++i) {
         yMin = yMinLst.at(i);
@@ -144,6 +144,8 @@ void  Plot2d_NormalizeAlgorithm::execute() {
         aKkoefs<<kKoef;
       }
       break;
+    default:
+      break;
     }
 
     for (int i = 0; i < myInuptData.size(); ++i) {
index 1333d0071be4a724778b7fceee6cedc3225ff5b7..557a69cc906abf1a98a02a61eb5514b4234dfda3 100644 (file)
@@ -40,8 +40,8 @@ Plot2d_Object::Plot2d_Object()
   myName( "" ),
   myXAxis( QwtPlot::xBottom ),
   myYAxis( QwtPlot::yLeft ),
-  myIsSelected(false),
-  myScale ( 1.0 )
+  myScale ( 1.0 ),
+  myIsSelected(false)
 {
 }
 
index 614b398584cb3ce962f5d19c46678e737bd652a1..6b0836187c4e3b5f1c4804a22d7623647ceb8b41 100644 (file)
@@ -251,11 +251,12 @@ void Plot2d_QwtLegendLabel::paintEvent( QPaintEvent *e )
   QRect iconRect = cr;
   if ( !icon().isNull() )
   {
-    if ( itemMode() != QwtLegendData::ReadOnly )
+    if ( itemMode() != QwtLegendData::ReadOnly ) {
       iconRect.setX( iconRect.x() + ButtonFrame );
       iconRect.setSize( QSize( icon().size().width() + spacing() ,
                                    icon().size().height() + spacing() ) );
       iconRect.moveCenter( QPoint( iconRect.center().x(), cr.center().y() ) );
+    }
   }
 
   drawIdentifier( &painter, iconRect );
@@ -297,9 +298,9 @@ public:
     return qwtMin(myMin.size(), myMax.size());
   }
   bool values(size_t i, double &min, double &max) {
-    if(myMin.contains(i) && myMax.contains(i)) {
-      min = myMin[i];
-      max = myMax[i];
+    if(myMin.contains((int)i) && myMax.contains((int)i)) { //!< TODO: conversion from size_t to int
+      min = myMin[(int)i];
+      max = myMax[(int)i];
       return true;
     }
     return false;
@@ -315,8 +316,8 @@ private:
 */
 Plot2d_QwtPlotCurve::Plot2d_QwtPlotCurve( const QString& title,
                                           QwtPlot::Axis yAxis /*const int index*/ ) :
-  Plot2d_SelectableItem(),
   QwtPlotCurve( title ),
+  Plot2d_SelectableItem(),
   myYAxis( yAxis ),
   myYAxisIdentifierEnabled( false ),
   myDeviationData(0)
@@ -399,7 +400,7 @@ void Plot2d_QwtPlotCurve::drawSeries( QPainter *painter,
                                       int from, int to) const
 {
   if (to < 0)
-    to = dataSize() - 1;
+    to = (int)dataSize() - 1; //!< TODO: conversion from size_t to int
   QwtPlotCurve::drawSeries(painter, xMap, yMap, canvasRect, from, to);
 
   //draw deviation data
@@ -501,8 +502,8 @@ void Plot2d_QwtPlotCurve::clearDeviationData()
 */
 Plot2d_SelectableItem::Plot2d_SelectableItem():
   myIsSelected(false),
-  myLegendSymbol( new QwtSymbol() ),
-  myLegendPen( QPen() )
+  myLegendPen( QPen() ),
+  myLegendSymbol( new QwtSymbol() )
 {
 }
 
@@ -984,7 +985,7 @@ bool Plot2d_HistogramItem::isCrossItems() const
   Draws bar of histogram and on it bars of histograms with lower height.
 */
 void Plot2d_HistogramItem::drawRectAndLowers( QPainter* thePainter,
-                                              Qt::Orientation theOr,
+                                              Qt::Orientation /*theOr*/,
                                               const QRect& theRect ) const
 {
   QRect aRect = theRect;
@@ -1042,7 +1043,7 @@ int Plot2d_HistogramItem::getCrossedTop( const QRect& theRect ) const
   return aRes;
 }
 
-QwtGraphic Plot2d_HistogramItem::legendIcon( int index, const QSizeF &size ) const
+QwtGraphic Plot2d_HistogramItem::legendIcon( int /*index*/, const QSizeF &size ) const
 {   
     return defaultIcon( color(), size );
 }
@@ -1060,10 +1061,8 @@ Plot2d_QwtLegend::~Plot2d_QwtLegend()
 /*!
   Redefined method, which create a widget to be inserted into the legend.
 */
-QWidget *Plot2d_QwtLegend::createWidget( const QwtLegendData &data ) const
+QWidget *Plot2d_QwtLegend::createWidget( const QwtLegendData& /*data*/ ) const
 {
-  Q_UNUSED( data );
-
   Plot2d_QwtLegendLabel *label = new Plot2d_QwtLegendLabel();
   label->setItemMode( defaultItemMode() );
 
index ff52f41d55b46eef471199eef99a8a0105470610..6672222422ada17ea2e7ae0ec3731b656293769b 100644 (file)
@@ -767,12 +767,12 @@ QVector< QVector<QwtPlotCurve *> > Plot2d_ViewFrame::displayPlot2dCurveList( con
       icur2 = icur1 + groupSize -1;
 
       // For all curves in one group
-      double XgroupMin, XgroupMax;
-      double YgroupMin, YgroupMax;
+      double XgroupMin = 0., XgroupMax = 0.;
+      double YgroupMin = 0., YgroupMax = 0.;
 
       // For one curve
-      double XcurveMin, XcurveMax;
-      double YcurveMin, YcurveMax;
+      double XcurveMin = 0., XcurveMax = 0.;
+      double YcurveMin = 0., YcurveMax = 0.;
       double *Xval;
       double *Yval;
       int nbPoints;
@@ -977,7 +977,7 @@ Plot2d_Curve* Plot2d_ViewFrame::createPlot2dCurve( QString & title,
                                                    int lineWidth,
                                                    QColor & lineColor,
                                                    QwtSymbol::Style markerKind,
-                                                   Plot2d_QwtPlotPicker* picker,
+                                                   Plot2d_QwtPlotPicker* /*picker*/,
                                                    bool toDraw,
                                                    bool displayLegend)
 {
@@ -1944,8 +1944,8 @@ AnalyticalCurveList Plot2d_ViewFrame::getAnalyticalCurves() const
 Plot2d_AnalyticalCurve* Plot2d_ViewFrame::getAnalyticalCurve(QwtPlotItem * theItem) {
   AnalyticalCurveList::iterator it = myAnalyticalCurves.begin();
   for( ; it != myAnalyticalCurves.end(); it++) {
-    if((*it)->plotItem() == theItem);
-               return (*it);
+    if((*it)->plotItem() == theItem)
+      return (*it);
   }
   return 0;
 }
@@ -2850,7 +2850,7 @@ bool Plot2d_ViewFrame::hasPlotObject( Plot2d_Object* object ) const
 /*!
   Sets curve type
 */
-void Plot2d_ViewFrame::setCurveType( QwtPlotCurve* curve, int curveType )
+void Plot2d_ViewFrame::setCurveType( QwtPlotCurve* curve, int /*curveType*/ )
 {
   if ( !curve )
     return;
@@ -3176,7 +3176,7 @@ QwtPlotMarker* Plot2d_Plot2d::createMarkerAndTooltip( QwtSymbol* symbol,
 QwtPlotGrid* Plot2d_Plot2d::grid() const
 {
   return myGrid;
-};
+}
 
 QwtPlotZoomer* Plot2d_Plot2d::zoomer() const
 {
@@ -3273,7 +3273,7 @@ void Plot2d_Plot2d::displayXTicksAndLabels(
   QList<double> allTicks;
 
   double devXmin, devXmax;  // X interval of a system
-  double gapXmin, gapXmax;  // X interval between two systems
+  double gapXmin = 0., gapXmax = 0.;  // X interval between two systems
   double devLabPos;         // Label's position of a system
   double segmentPos;  // Position of the vertical segment between current system and the next
 
@@ -3838,7 +3838,7 @@ QString Plot2d_ViewFrame::getXmlVisualParameters() {
     aWriter.writeAttribute("Name",c->getName());
     aWriter.writeAttribute("IsActive", QString("").sprintf("%d",       c->isActive()));
                aWriter.writeAttribute("Expression", c->getExpression());
-    aWriter.writeAttribute("NbIntervals", QString("").sprintf("%d",    c->getNbIntervals()));
+    aWriter.writeAttribute("NbIntervals", QString("").sprintf("%ld",   c->getNbIntervals()));
     aWriter.writeAttribute("isAuto", QString("").sprintf("%d",isAuto));
     if(!isAuto) {
       aWriter.writeAttribute("Marker", QString("").sprintf("%d",(int)c->getMarker()));
@@ -3872,7 +3872,7 @@ QString Plot2d_ViewFrame::getXmlVisualParameters() {
 */
 bool Plot2d_ViewFrame::setXmlVisualParameters(const QString& parameters) {
   QXmlStreamReader aReader(parameters);
-  double xmin, xmax, ymin, ymax, y2min, y2max;
+  double xmin = 0., xmax = 0., ymin = 0., ymax = 0., y2min = 0., y2max = 0.;
   bool leftMin,leftMax,rightMin,rightMax;
   leftMin = leftMax = rightMin = rightMax = false;
   while(!aReader.atEnd()) {
index 04a8abfc9e4de43d855f6afe779db5aaf9c97c76..795acbc26b12e9be6c4b58356d37c7116051af8f 100644 (file)
@@ -110,8 +110,8 @@ void Plot2d_Viewer::update()
 {
   SUIT_ViewManager* aMgr = getViewManager();
   QVector<SUIT_ViewWindow*> aViews = aMgr->getViews();
-  unsigned int aSize = aViews.size();
-  for (uint i = 0; i < aSize; i++) {
+  int aSize = aViews.size();
+  for (int i = 0; i < aSize; i++) {
     Plot2d_ViewWindow* aView = (Plot2d_ViewWindow*)aViews[i];
     if (myPrs && aView)
       aView->getViewFrame()->Display(myPrs);
@@ -127,8 +127,8 @@ void Plot2d_Viewer::clearPrs()
   QVector<SUIT_ViewWindow*> aViews;
   if ( aMgr )
     aViews = aMgr->getViews();
-  unsigned int aSize = aViews.size();
-  for (uint i = 0; i < aSize; i++) {
+  int aSize = aViews.size();
+  for (int i = 0; i < aSize; i++) {
     Plot2d_ViewWindow* aView = (Plot2d_ViewWindow*)aViews[i];
     if (myPrs && aView)
       aView->getViewFrame()->Erase(myPrs);
@@ -220,7 +220,7 @@ void Plot2d_Viewer::onCloneView( Plot2d_ViewFrame* clonedVF, Plot2d_ViewFrame* n
 /*
   SLOT: called when clicked item in the legend from Plot2d_ViewManager
  */
-void Plot2d_Viewer::onClicked(const QVariant& itemInfo, int index)
+void Plot2d_Viewer::onClicked(const QVariant& /*itemInfo*/, int /*index*/)
 {
 }
 
index 1161e08c077eeeb804322c4112f1d9fe980e34bf..daf05845ee228f2343a87ec88e4334eb7bf7f76e 100644 (file)
@@ -307,7 +307,7 @@ public:
   //! \retval Return false.
   virtual bool isVisible( const Handle(SALOME_InteractiveObject)& ){ return false; }
   virtual void Repaint() {} //!< Null body here.
-  virtual void GetVisible( SALOME_ListIO& theList ) {}
+  virtual void GetVisible( SALOME_ListIO& /*theList*/ ) {}
 };
 
 /*!
index 33ef748bb00f56a53c6e7fed1c1fd2804c1b3f34..296b4b113ea75fed28e2efd55f7d0ff3ae278893 100644 (file)
@@ -260,7 +260,7 @@ void QDS_ComboBox::setState( const bool on, const QList<int>& ids, const bool ap
   bool changed = false;
 
   QMap<int, int> aMap;
-  for ( uint i = 0; i < ids.count(); i++ )
+  for ( int i = 0; i < ids.count(); i++ )
     aMap.insert( ids.at( i ), 0 );
 
   for ( IdStateMap::Iterator it = myState.begin(); it != myState.end(); ++it )
index b69d720ce70391daa0cf578fe9842c234ab0ac19..a1e7db6bddd275f315e73463c02e15bb246304ca 100644 (file)
@@ -200,10 +200,10 @@ void QDS_Datum::Wrapper::setGeometry( int x, int y, int w, int h )
 QDS_Datum::QDS_Datum( const QString& id, QWidget* parent, const int flags, const QString& comp )
 : QObject( parent ),
   myId( id ),
+  myFlags( flags ),
   myLabel( 0 ),
   myUnits( 0 ),
   myControl( 0 ),
-  myFlags( flags ),
   myInitialised( false ),
   myTr( false )
 {
@@ -1422,7 +1422,7 @@ void QDS_Datum::initialize()
 
   \param unitSystem new active units system
 */
-void QDS_Datum::unitSystemChanged( const QString& unitSystem )
+void QDS_Datum::unitSystemChanged( const QString& /*unitSystem*/ )
 {
   QString labText = label();
   QString unitText = unitsToText( units() );
@@ -1883,7 +1883,7 @@ QString QDS_Datum::removeAccel( const QString& src )
 {
   QString trg = src;
 
-  for ( uint i = 0; i < trg.length(); )
+  for ( int i = 0; i < trg.length(); )
   {
     if ( trg.mid( i, 2 ) == QString( "&&" ) )
       i += 2;
index beaae1168bfc98842028abbb70450f5689dcf622..aed149d34764aac8b97f9f41f50055c7fcfb7b4c 100644 (file)
@@ -161,7 +161,7 @@ void QDS_RadioBox::setState( const bool on, const QList<int>& ids, const bool ap
   bool changed = false;
 
   QMap<int, int> aMap;
-  for ( uint i = 0; i < ids.count(); i++ )
+  for ( int i = 0; i < ids.count(); i++ )
     aMap.insert( ids.at( i ), 0 );
 
   for ( IdStateMap::Iterator it = myState.begin(); it != myState.end(); ++it )
index 5feff000352f1cf34d8c5c1dc7ffe4c51c2d417c..c65746262c111a1ccee68181a72508356d841a69 100644 (file)
@@ -198,9 +198,9 @@ QDS_StringValidator::QDS_StringValidator( QObject* p )
   \param p parent object
 */
 QDS_StringValidator::QDS_StringValidator( const QString& f, QObject* p ) 
-: QValidator( p ), 
-  myFlags( f ), 
-  myLen( -1 ) 
+: QValidator( p ),
+  myLen( -1 ),
+  myFlags( f )
 {
 }
 
@@ -213,10 +213,10 @@ QDS_StringValidator::QDS_StringValidator( const QString& f, QObject* p )
   \param p parent object
 */
 QDS_StringValidator::QDS_StringValidator( const QString& ft, const QString& fg, QObject* p ) 
-: QValidator( p ), 
-  myLen( -1 ), 
-  myFilter( ft ), 
-  myFlags( fg ) 
+: QValidator( p ),
+  myLen( -1 ),
+  myFlags( fg ),
+  myFilter( ft )
 {
 }
 
index 6a3d61c33c1e7923e49ee1cd74c0d0719d0d74bb..cbefba7db3d2e52a35291cc559dc2fd7844f25e4 100644 (file)
@@ -589,7 +589,7 @@ bool Qtx::dos2unix( const QString& absName )
     char inbuf[512], outbuf[512];
 
     /* convert buffer */
-    int nbread = ::fread( inbuf, 1, sizeof( inbuf ), src );
+    int nbread = (int)::fread( inbuf, 1, sizeof( inbuf ), src ); //!< TODO: conversion from 'size_t' to 'int'
     for ( int incnt = 0; incnt < nbread; incnt++  )
     {
       if ( waitingLF )
@@ -610,7 +610,7 @@ bool Qtx::dos2unix( const QString& absName )
     waitingLF = ( inbuf[nbread - 1] == CR );
 
     /* write converted buffer to temp file */
-    int nbwri = ::fwrite( outbuf, 1, outcnt, tgt );
+    int nbwri = (int)::fwrite( outbuf, 1, outcnt, tgt ); //!< TODO: conversion from 'size_t' to 'int'
     if ( nbwri != outcnt )
     {
       ::fclose( src );
@@ -2143,7 +2143,7 @@ QString Qtx::qtDir( const QString& context )
 
   QStringList vars = { "QT5_ROOT_DIR", "QT_ROOT_DIR", "QTDIR" };
   QString qtPath;
-  for (uint i = 0; i < vars.length() && qtPath.isEmpty(); i++ ) {
+  for (int i = 0; i < vars.length() && qtPath.isEmpty(); i++ ) {
     qtPath = getenv(vars[i]);
   }
   if ( !qtPath.isEmpty() && !context.isEmpty() )
index 3bc6d305c972ff68eb55bf8359221d60943201db..ace8592ecb5937f1849a39caa1acd2df1514da63 100644 (file)
@@ -121,6 +121,7 @@ public:
 
   //! Header view flags
   typedef enum {
+    ShowNone = 0x000,                //!< Show nothing
     ShowText = 0x001,                //!< Show only text in the header
     ShowIcon = 0x010,                //!< Show only icon in the header
     ShowAll  = ShowText | ShowIcon   //!< Show icon and text in the header
index 7517685ca0908bf2bf9895aade9d66df72d46b7b..616a80f978517f5fe3b4aca29305a72fe7def1c4 100644 (file)
@@ -61,7 +61,7 @@ public:
     }
     return mySizeHint; 
   }
-  void paintEvent( QPaintEvent* e )
+  void paintEvent( QPaintEvent* /*e*/ )
   {
     QStylePainter sp(this);
     QStyleOptionButton option;
index 6ef8d823fbf3af1523c037c4cc047fa2137db295..1110126d4ade89e77fe25c43ecef738f697f7933 100644 (file)
@@ -706,7 +706,7 @@ void QtxColorScale::hide()
   \brief Paint widget
   \param e paint event
 */
-void QtxColorScale::paintEvent( QPaintEvent* e )
+void QtxColorScale::paintEvent( QPaintEvent* /*e*/ )
 {
   QPainter p( this );
   drawFrame( &p );
@@ -784,7 +784,7 @@ void QtxColorScale::drawScale( QPainter* p, const QColor& bg, const bool transp,
   
   QString aTitle = title();
   
-  int titleWidth = 0;
+  //int titleWidth = 0; // unused
   int titleHeight = 0;
   
   if ( qGray( bg.rgb() ) < 128 )
@@ -800,7 +800,7 @@ void QtxColorScale::drawScale( QPainter* p, const QColor& bg, const bool transp,
     {
       srt->setTextWidth( W - 10 );
       titleHeight = (int)srt->size().height() + spacer;
-      titleWidth = (int)srt->size().width();
+      //titleWidth = (int)srt->size().width(); // unused
       p->save();
       p->translate( X + 5, Y );
       srt->drawContents( p );
index 59da60e6193d2e958f315fa27c9ef7649ffac828..8c56836811242e1d443b0f437ede660fe7e144f9 100644 (file)
@@ -443,14 +443,14 @@ QSize QtxDialog::Border::minimumSizeHint() const
 QtxDialog::QtxDialog( QWidget* parent, bool modal, bool allowResize, const int f, Qt::WindowFlags wf )
 : QDialog( parent, (Qt::WindowFlags)( wf | Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint | Qt::Dialog |
 #ifdef WIN32
-           ( allowResize ? 0 : Qt::FramelessWindowHint ) |
+           ( allowResize ? (Qt::WindowType)0 : Qt::FramelessWindowHint ) |
 #endif
            ( ( allowResize 
 #ifdef WIN32 
                // in qwidget_win.cpp flag WStyle_ContextHelp will be unset in WStyle_MinMax in switched ON
                && !( wf & Qt::WindowContextHelpButtonHint )
 #endif
-               ) ? Qt::WindowMaximizeButtonHint : 0 ) ) ),
+               ) ? Qt::WindowMaximizeButtonHint : (Qt::WindowType)0 ) ) ),
   myInited( false ),
   mySender( 0 ),
   myAlignment( 0 ),
index 7c8102ad8f0ae51e89f58c90810546647d46ec6a..8030686e40e6a6cfe220f58d5877fd04e7e6ba12 100644 (file)
@@ -306,7 +306,7 @@ QValidator::State QtxDoubleSpinBox::validate( QString& str, int& pos ) const
 {
   QString pref = this->prefix();
   QString suff = this->suffix();
-  uint overhead = pref.length() + suff.length();
+  int overhead = pref.length() + suff.length();
   QValidator::State state = QValidator::Invalid;
   
   QDoubleValidator v (NULL);
index 6c2b69bb07f7bff23540e3a0d6c9b4d645cc0c30..38f41b3f91ea1c0231b11fc9302e613d42416d19 100644 (file)
@@ -1912,7 +1912,7 @@ int QtxEvalSetMath::priority( const QString& op, bool isBin ) const
   \param v2 second argument (not valid for unary postfix operations)
   \return error code (QtxEvalExpr::Error)
 */
-QtxEvalExpr::Error QtxEvalSetMath::calculate( const QString& op, QVariant& v1, QVariant& v2 ) const
+QtxEvalExpr::Error QtxEvalSetMath::calculate( const QString& op, QVariant& /*v1*/, QVariant& v2 ) const
 {
   QtxEvalExpr::Error err = QtxEvalExpr::OK;
   double val = v2.toDouble();
index c3b1891dc9d710a1e36cdca79fd7ec24a9204ac0..c15a0c9dc01d42e0e029f63d421be24f69093f5e 100644 (file)
@@ -455,7 +455,7 @@ bool QtxListAction::ListFrame::eventFilter( QObject* o, QEvent* e )
 {
   bool res = true;
 
-  switch( e->type() )
+  switch( (int)e->type() )
   {
   case QEvent::MouseMove:
     {
index fcfe0fe1e349fbfd98b67e9e6b3a565a9c752bc8..a2bf89fa4151aec54d7457783e435268246ce7ba 100644 (file)
@@ -69,7 +69,7 @@ QtxMainWindow::Filter::Filter( QWidget* wid, QtxMainWindow* mw, QObject* parent
   myWidget( wid )
 {
   QApplication::instance()->installEventFilter( this );
-};
+}
 
 /*!
   \brief Destructor.
@@ -142,7 +142,7 @@ QtxMainWindow::Resizer::Resizer( const QPoint& p, const Qt::Orientation o, QtxMa
   setPosition( p );
 
   myRubber->hide();
-};
+}
 
 /*!
   \brief Destructor.
@@ -239,11 +239,11 @@ QtxMainWindow::QtxMainWindow( QWidget* parent, Qt::WindowFlags f )
 : QMainWindow( parent, f ),
   myMenuBar( 0 ),
   myStatusBar( 0 ),
+  myFullScreenAllowed(true),
+  myMinimizeAllowed(true),
   myOpaque( true ),
   myResizer( 0 ),
-  myMouseMove( 0 ),
-  myFullScreenAllowed(true),
-  myMinimizeAllowed(true)
+  myMouseMove( 0 )
 {
   //rnv: Enables tooltips for inactive windows.
   //rnv: For details see http://bugtracker.opencascade.com/show_bug.cgi?id=20893
index 6727e3269686c834f761f85887a5a63e00bfb541..a8ef6770d8576078954c28b0df9f4362ab5f05b6 100644 (file)
@@ -81,11 +81,10 @@ private:
 
 private:
     int                    myId;
-    QString                myText;
     QString                myTitle;
+    QString                myText;
     QTimer*                myTimer;
     QtxNotify*             myNotifyMgr;
-
     bool                   myIsClosePressed;
 };
 
index d11413755a03659031da6be3a6ebbaa7a9494386..7f7e519366f6a1dc0b205f79a20c730f19da3f0a 100644 (file)
@@ -4475,7 +4475,7 @@ void QtxPagePrefShortcutBtnsItem::retrieve()
   \param param resource file parameter associated with the preference item
 */
 QtxPagePrefShortcutTreeItem::QtxPagePrefShortcutTreeItem( const QString& title, QtxPreferenceItem* parent, const QString& sect, 
-                                                          const QString& param ): QtxPageNamedPrefItem( title, parent, sect, "" )
+                                                          const QString& /*param*/ ): QtxPageNamedPrefItem( title, parent, sect, "" )
 {
   mySection = sect;
 
index 31ce3002b9281b2880030d92d3b26433c8d7b7cc..3b1ea4b57f8df8f3e30808d44c9b7b8d7ce25abc 100644 (file)
@@ -207,8 +207,8 @@ QtxPathListEdit::Delegate::~Delegate()
   \param option style option
   \param index data model index
 */
-QWidget* QtxPathListEdit::Delegate::createEditor( QWidget* parent, const QStyleOptionViewItem& option,
-                                                  const QModelIndex& index ) const
+QWidget* QtxPathListEdit::Delegate::createEditor( QWidget* parent, const QStyleOptionViewItem& /*option*/,
+                                                  const QModelIndex& /*index*/ ) const
 {
   return myPathEdit->createEditor( parent );
 }
@@ -220,7 +220,7 @@ QWidget* QtxPathListEdit::Delegate::createEditor( QWidget* parent, const QStyleO
   \param model data model
   \param index data model index
 */
-void QtxPathListEdit::Delegate::setModelData( QWidget* editor, QAbstractItemModel* model,
+void QtxPathListEdit::Delegate::setModelData( QWidget* editor, QAbstractItemModel* /*model*/,
                                               const QModelIndex& index ) const
 {
   myPathEdit->setModelData( editor, index );
@@ -270,7 +270,7 @@ void QtxPathListEdit::Delegate::paint( QPainter* painter, const QStyleOptionView
   \param rect selection rectangle
 */
 void QtxPathListEdit::Delegate::drawFocus( QPainter* painter, const QStyleOptionViewItem& option,
-                                           const QRect& rect ) const
+                                           const QRect& /*rect*/ ) const
 {
   QItemDelegate::drawFocus( painter, option, option.rect );
 }
@@ -307,8 +307,8 @@ void QtxPathListEdit::Delegate::drawFocus( QPainter* painter, const QStyleOption
 */
 QtxPathListEdit::QtxPathListEdit( const Qtx::PathType type, QWidget* parent )
 : QFrame( parent ),
-  myCompleter( 0 ),
   myType( type ),
+  myCompleter( 0 ),
   myDuplicate( false )
 {
   initialize();
@@ -324,8 +324,8 @@ QtxPathListEdit::QtxPathListEdit( const Qtx::PathType type, QWidget* parent )
 */
 QtxPathListEdit::QtxPathListEdit( QWidget* parent )
 : QFrame( parent ),
-  myCompleter( 0 ),
   myType( Qtx::PT_OpenFile ),
+  myCompleter( 0 ),
   myDuplicate( false )
 {
   initialize();
@@ -782,6 +782,8 @@ bool QtxPathListEdit::checkExistance( const QString& str, const bool msg )
       if ( !ok && msg )
         QMessageBox::warning( this, tr( "Error" ), tr( "Location \"%1\" doesn't point to directory" ).arg( str ) );
       break;
+    default:
+      break;
     }
   }
 
index 3c92e0dbe1b13313585887f8ae35e4e0dc41f65b..818e98c7b7dadcbd8935a808ade6f35b5154b546 100644 (file)
@@ -76,7 +76,7 @@ bool QtxAbstractRubberBand::isClosed()
   return myIsClosed;
 }
 
-void QtxAbstractRubberBand::paintEvent( QPaintEvent* theEvent )
+void QtxAbstractRubberBand::paintEvent( QPaintEvent* /*theEvent*/ )
 {
   if ( !myPoints.empty() )
     {
@@ -92,57 +92,10 @@ void QtxAbstractRubberBand::paintEvent( QPaintEvent* theEvent )
       // ### workaround for borked XRENDER
       tiledPixmap = QPixmap::fromImage(tiledPixmap.toImage());
 
-
-      
       QPainter aPainter( this );
       aPainter.setRenderHint( QPainter::Antialiasing );
-      QRect r = myPoints.boundingRect();
-      //aPainter.setClipRegion( r.normalized().adjusted( -1, -1, 2, 2 ) );
       aPainter.drawTiledPixmap( 0, 0, width(), height(), tiledPixmap);
-
       aPainter.end();
-
-    /*
-
-
-
-#ifdef WIN32
-      QPixmap anImage( size() );
-#else
-      QImage anImage( size(), QImage::Format_ARGB32_Premultiplied );
-#endif
-
-      anImage.fill( Qt::transparent );
-      QPainter aImgPainter( &anImage );
-      aImgPainter.setRenderHint( QPainter::Antialiasing );
-      aImgPainter.setCompositionMode(QPainter::CompositionMode_Source);
-
-      QPen aPen( Qt::black );
-      aPen.setWidth( 2 );
-      aImgPainter.setPen( aPen );
-    
-      aImgPainter.drawPolyline( myPoints );
-      if ( myIsClosed && myPoints.last() != myPoints.first() )
-        aImgPainter.drawLine( myPoints.last(), myPoints.first() );
-
-      //aImgPainter.setPen(Qt::NoPen);
-      //aImgPainter.setBrush(QBrush( Qt::white, Qt::Dense4Pattern));
-      //aImgPainter.setCompositionMode(QPainter::CompositionMode_SourceAtop);
-      //aImgPainter.drawRect(0, 0, width(), height());
-      aImgPainter.end();
-
-      QPainter aPainter( this );
-      aPainter.drawPolyline( myPoints );
-      if ( myIsClosed && myPoints.last() != myPoints.first() )
-        aPainter.drawLine( myPoints.last(), myPoints.first() );
-      
-#ifdef WIN32
-      aPainter.drawPixmap( 0, 0, anImage );
-#else
-      aPainter.drawImage( 0, 0, anImage );
-      #endif
-      aPainter.end();*/
-      
     }
 }
 
@@ -404,4 +357,4 @@ int QtxCircleRubberBand::radius() const
     return -1;
   QPoint aDist = myPoints[1] - myPoints[0];
   return (int)std::sqrt(std::pow(aDist.x(), 2) + std::pow(aDist.y(), 2));
-}
\ No newline at end of file
+}
index 415cf9484f482f819fadce327e1cffec5840a999..798caf2548034509fdeba4802d6a4f8566d63f95 100644 (file)
@@ -242,7 +242,7 @@ QtxShortcutTree::~QtxShortcutTree(){}
   \param event event
   \return \c true if further event processing should be stopped
 */
-bool QtxShortcutTree::eventFilter(QObject* obj, QEvent* event) 
+bool QtxShortcutTree::eventFilter(QObject* /*obj*/, QEvent* event) 
 { 
   if ( currentItem() && currentItem()->isSelected() ) {
     
@@ -273,7 +273,7 @@ bool QtxShortcutTree::eventFilter(QObject* obj, QEvent* event)
   \param cur the current item
   \param prev the previous current item
 */
-void QtxShortcutTree::onCurrentItemChanged( QTreeWidgetItem* cur, QTreeWidgetItem* prev )
+void QtxShortcutTree::onCurrentItemChanged( QTreeWidgetItem* /*cur*/, QTreeWidgetItem* prev )
 {
   if ( prev && prev->text( 1 ).endsWith( "+" ) )
       prev->setText( 1, myPrevBindings[ prev->parent()->text( 0 ) ][ prev->text( 0 ) ] );
index f57ce87a65bb296752698c4bbf6f1341470c4b52..59ef968e89afc8096244318b75b997648edd5894 100644 (file)
@@ -200,9 +200,9 @@ QtxSplash::QtxSplash( const QPixmap& pixmap )
   myMargin( 5 ),
   myOpacity( 1.0 ),
   myError( 0 ),
-  myShowPercent( true ),
   myShowProgress( true ),
-  myShowMessage( true )
+  myShowMessage( true ),
+  myShowPercent( true )
 {
   setAttribute( Qt::WA_DeleteOnClose, true );
   setPixmap( pixmap );
index be4398d74f71f200835e3598013f537db30b40a5..44808c584eaea63997bd4c0170c9d3279d50425e 100644 (file)
@@ -213,7 +213,7 @@ void QtxToolBar::Watcher::hideContainer()
 */
 void QtxToolBar::Watcher::customEvent( QEvent* e )
 {
-  switch ( e->type() )
+  switch ( (int)e->type() )
   {
   case Install:
     installFilters();
index b0b3aab889d375e06b04d824f097a5875f73d215..4f2c6da41e11e0510c6749ffb0d32f32d4f0cb37 100644 (file)
@@ -378,6 +378,7 @@ void QtxToolButton::keyPressEvent( QKeyEvent* e )
       showMenu();
       return;
     }
+    // fall through!
   case Qt::Key_PageDown:
     move = ( e->modifiers() & Qt::ControlModifier ) ? MoveLast : MoveDown;
     break;
index 7bf0b6640d36af3837d763051b18fe6f982e910d..4766a7f759c60fbcad1c1ba9100e5491a1cc4349 100644 (file)
@@ -32,7 +32,7 @@
   does not allow to process messages with global context.
 
   For the current moment global context should be specified in translation
-  (*.ts/*.qm) files as "@default" string. For example:
+  (*.ts) files as "@default" string. For example:
   \verbatim
   <!DOCTYPE TS><TS>
   <context>
index 18b10df00fa9472b3261b39cf1bc21d11cf14534..584f0aa856f8d4276bdfb58efe65278db6a34933 100644 (file)
@@ -959,7 +959,7 @@ void QtxWorkstackArea::customEvent( QEvent* e )
 {
   WidgetEvent* we = (WidgetEvent*)e;
 
-  switch ( we->type() )
+  switch ( (int)we->type() )
   {
   case ActivateWidget:
     myBar->updateActiveState();
@@ -1080,7 +1080,7 @@ void QtxWorkstackArea::onChildDestroyed( QObject* obj )
   \brief Called when child widget container is shown.
   \param c child widget container being shown
 */
-void QtxWorkstackArea::onChildShown( QtxWorkstackChild* c )
+void QtxWorkstackArea::onChildShown( QtxWorkstackChild* /*c*/ )
 {
   updateState();
 }
@@ -1089,7 +1089,7 @@ void QtxWorkstackArea::onChildShown( QtxWorkstackChild* c )
   \brief Called when child widget container is hidden.
   \param c child widget container being hidden
 */
-void QtxWorkstackArea::onChildHidden( QtxWorkstackChild* c )
+void QtxWorkstackArea::onChildHidden( QtxWorkstackChild* /*c*/ )
 {
   updateState();
 }
@@ -1469,7 +1469,7 @@ bool QtxWorkstackChild::eventFilter( QObject* o, QEvent* e )
   \brief Called when child widget is destroyed.
   \param obj child widget being destroyed
 */
-void QtxWorkstackChild::onDestroyed( QObject* obj )
+void QtxWorkstackChild::onDestroyed( QObject* /*obj*/ )
 {
   deleteLater();
 }
@@ -2287,8 +2287,6 @@ static int positionSimple (QIntList& szList, const int nb, const int splitter_si
   int new_this = szList[item_ind];
   int new_next = 0;
 
-  bool isToCheck = false;
-
   if (need_pos < splitter_pos) {
     // Set size of all previous workareas to zero <--
     if (item_ind == nb - 1) {
@@ -2320,7 +2318,6 @@ static int positionSimple (QIntList& szList, const int nb, const int splitter_si
         new_this = splitter_size - new_item_rel_pos;
       }
       // jfa to do: in this case fixed size of next widgets could prevent right resizing
-      isToCheck = true;
     }
     if (item_ind == nb - 1) {
       new_this = splitter_size - new_item_rel_pos;
index c0611c145db93c7f1137b1a4dada96bc80768504..655525fb37773907ce99f59ebdda8f2fb4a58192 100644 (file)
@@ -297,7 +297,7 @@ void QtxWorkstackAction::setStatusTip( const int id, const QString& txt )
   \brief Process action activated by the user.
   \param type action ID
 */
-void QtxWorkstackAction::perform( const int type )
+void QtxWorkstackAction::perform( const int /*type*/ )
 {
   /*
   switch ( type )
@@ -853,7 +853,7 @@ void QtxSplitDlg::onComboBoxChanged( int theItem )
   }
   for( int i = 0; i < 4; i++ ) {
     if( myComboBox[i] != aSender ) {
-      ViewMode aNewMode;
+      ViewMode aNewMode = XYZ;
       if( myMapComboBoxMode[myComboBox[i]] == (ViewMode)(theItem) ) {
         for( int j = 0; j < 4; j++ )
           if( !aModeEnabledMap[(ViewMode)j] )
index f4ce54336bf3cff8d18822a0fa1ca64a2fa5bdb3..2429c46105c58422732dba36fe2d39d40b9f326c 100644 (file)
@@ -84,7 +84,7 @@ SUIT_ViewWindow* QxScene_Viewer::createView(SUIT_Desktop* theDesktop)
 /*!
   Builds popup for QxScene viewer
 */
-void QxScene_Viewer::contextMenuPopup(QMenu* thePopup)
+void QxScene_Viewer::contextMenuPopup(QMenu* /*thePopup*/)
 {
   DEBTRACE("QxScene_Viewer::contextMenuPopup");
 }
index 0cba0ab814cd4c62d2231d1db6b0028d50180ae0..8802adb34bf0e8784e2641306cd1b65efbb3ac2c 100644 (file)
@@ -235,7 +235,7 @@ void QxScene_ViewWindow::onViewFitAll()
 /*!
     Set background of the viewport
 */
-void QxScene_ViewWindow::setBackgroundColor( const QColor& color )
+void QxScene_ViewWindow::setBackgroundColor( const QColor& /*color*/ )
 {
   DEBTRACE("QxScene_ViewWindow::setBackgroundColor");
 }
@@ -253,7 +253,7 @@ QColor QxScene_ViewWindow::backgroundColor() const
 /*!
   Custom resize event handler
 */
-void QxScene_ViewWindow::resizeEvent( QResizeEvent* theEvent )
+void QxScene_ViewWindow::resizeEvent( QResizeEvent* /*theEvent*/ )
 {
   DEBTRACE("QxScene_ViewWindow::resizeEvent");
 }
index 05fbd7495381a065e0d361107e8875027f034900..9fe5322be54100fdff82c011479dcc22ad56809b 100644 (file)
@@ -82,7 +82,7 @@ class QXSCENE_EXPORT QxScene_ViewWindow : public SUIT_ViewWindow {
   void              onViewReset(); 
   
  protected:
-  void              resizeEvent( QResizeEvent* theEvent );
+  void              resizeEvent( QResizeEvent* );
 
   QGraphicsScene*   _scene;
   QGraphicsView*    _sceneView;
index a06880e47608a110749af3f8afd455e37c0aaffa..3bf9cf31f3f8f78fc66a0031f593f221d8d56576 100644 (file)
@@ -230,7 +230,7 @@ public:
   }
 };
 
-extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_getRenderer( PyObject* self, PyObject* args )
+extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_getRenderer( PyObject* /*self*/, PyObject* args )
 {
   PyObject* aResult = Py_None;
   int toCreate = 0;
@@ -285,7 +285,7 @@ public:
   }
 };
 
-extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_getRenderWindow( PyObject* self, PyObject* args )
+extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_getRenderWindow( PyObject* /*self*/, PyObject* args )
 {
   PyObject* aResult = Py_None;
   int toCreate = 0;
@@ -340,7 +340,7 @@ public:
   }
 };
 
-extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_getRenderWindowInteractor( PyObject* self, PyObject* args )
+extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_getRenderWindowInteractor( PyObject* /*self*/, PyObject* args )
 {
   PyObject* aResult = Py_None;
   int toCreate = 0;
@@ -362,7 +362,7 @@ extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_getRenderWindowInteractor( PyOb
   \return nothing (Py_None)
 */
 
-extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_showTrihedron( PyObject* self, PyObject* args )
+extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_showTrihedron( PyObject* /*self*/, PyObject* args )
 {
   class TEvent: public SALOME_Event
   {
@@ -373,7 +373,7 @@ extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_showTrihedron( PyObject* self,
     virtual void Execute()
     {
       if( SVTK_ViewWindow* aVTKViewWindow = GetVTKViewWindow( __Find ) ) {
-        if ( aVTKViewWindow->isTrihedronDisplayed() != myShow )
+        if ( aVTKViewWindow->isTrihedronDisplayed() != (bool)myShow )
           aVTKViewWindow->onViewTrihedron(myShow);
       }
     }
@@ -397,7 +397,7 @@ extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_showTrihedron( PyObject* self,
   \return nothing (Py_None)
 */
 
-extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_fitAll( PyObject* self, PyObject* args )
+extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_fitAll( PyObject* /*self*/, PyObject* /*args*/ )
 {
   class TEvent: public SALOME_Event
   {
@@ -425,7 +425,7 @@ extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_fitAll( PyObject* self, PyObjec
   \return nothing (Py_None)
 */
 
-extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_setView( PyObject* self, PyObject* args )
+extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_setView( PyObject* /*self*/, PyObject* args )
 {
   class TEvent: public SALOME_Event
   {
@@ -476,7 +476,7 @@ extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_setView( PyObject* self, PyObje
   \return nothing (Py_None)
 */
 
-extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_resetView( PyObject* self, PyObject* args )
+extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_resetView( PyObject* /*self*/, PyObject* /*args*/ )
 {
   class TEvent: public SALOME_Event
   {
@@ -496,14 +496,14 @@ extern "C" SALOMEPY_EXPORT PyObject* libSalomePy_resetView( PyObject* self, PyOb
 
 static PyMethodDef libSalomePy_methods[] = 
 {
-  { "getRenderer",               libSalomePy_getRenderer,               METH_VARARGS },
-  { "getRenderWindow",           libSalomePy_getRenderWindow,           METH_VARARGS },
-  { "getRenderWindowInteractor", libSalomePy_getRenderWindowInteractor, METH_VARARGS },
-  { "showTrihedron",             libSalomePy_showTrihedron,             METH_VARARGS },
-  { "fitAll",                    libSalomePy_fitAll,                    METH_NOARGS  },
-  { "setView",                   libSalomePy_setView,                   METH_VARARGS },
-  { "resetView",                 libSalomePy_resetView,                 METH_NOARGS  },
-  { NULL, NULL }
+  { "getRenderer",               libSalomePy_getRenderer,               METH_VARARGS, PyDoc_STR("Get renderer from current vtk view") },
+  { "getRenderWindow",           libSalomePy_getRenderWindow,           METH_VARARGS, PyDoc_STR("Get render window from current vtk view") },
+  { "getRenderWindowInteractor", libSalomePy_getRenderWindowInteractor, METH_VARARGS, PyDoc_STR("Get interactor from current vtk view") },
+  { "showTrihedron",             libSalomePy_showTrihedron,             METH_VARARGS, PyDoc_STR("Show/hide trihedron in current vtk view") },
+  { "fitAll",                    libSalomePy_fitAll,                    METH_NOARGS,  PyDoc_STR("Fit current vtk view to show all contents")  },
+  { "setView",                   libSalomePy_setView,                   METH_VARARGS, PyDoc_STR("Set side view for the current VTK viewer") },
+  { "resetView",                 libSalomePy_resetView,                 METH_NOARGS,  PyDoc_STR("Reset camera for current vtk view")  },
+  { 0, 0, 0, 0 }
 };
 
 struct module_state {
index 510e7e773d320989f55d76d4313ee11e5eca4870..afe4845076cf990cef921dcd1897c654f7112566 100644 (file)
@@ -34,7 +34,7 @@ class PyModuleHelper;
 
 class SALOME_PYQT_EXPORT SALOME_PYQT_Module: public SalomeApp_Module
 {
-  Q_OBJECT;
+  Q_OBJECT
 
 public:
   SALOME_PYQT_Module();
index 9ccf98f0df1b0bef8ab31eee228c7104417847ad..407550a4523a48aadf7895c7727f87fce25f52f5 100644 (file)
@@ -112,7 +112,7 @@ QPixmap SALOME_PYQT_BorrowedDataObjectLight::icon(const int index) const
 // function : SALOME_PYQT_BorrowedDataObjectLight::toolTip()
 // purpose  : return toolTip of object
 //=================================================================================
-QString SALOME_PYQT_BorrowedDataObjectLight::toolTip(const int index) const
+QString SALOME_PYQT_BorrowedDataObjectLight::toolTip(const int /*index*/) const
 {
   return myToolTip;
 }
index aeaf7dbf4cb34b365e4f0cacaaced0bc5be70e74..47b6057e3bf250b55a820101b2dadef6bd4bcaba 100644 (file)
@@ -108,7 +108,7 @@ bool SALOME_PYQT_DataModelLight::save( QStringList& theListOfFiles)
 // function : saveAs()
 // purpose  : SaveAs data model operation
 //=================================================================================
-bool SALOME_PYQT_DataModelLight::saveAs ( const QString& theURL, CAM_Study* theStudy, QStringList& theListOfFiles)
+bool SALOME_PYQT_DataModelLight::saveAs ( const QString& theURL, CAM_Study* /*theStudy*/, QStringList& theListOfFiles)
 {
   myStudyURL = theURL;
   return save(theListOfFiles);
@@ -116,7 +116,7 @@ bool SALOME_PYQT_DataModelLight::saveAs ( const QString& theURL, CAM_Study* theS
 
 
 
-bool SALOME_PYQT_DataModelLight::create( CAM_Study* study )
+bool SALOME_PYQT_DataModelLight::create( CAM_Study* /*study*/ )
 {
   return true;
 }
@@ -183,7 +183,7 @@ bool SALOME_PYQT_DataModelLight::close()
 }
 
 
-void SALOME_PYQT_DataModelLight::update ( LightApp_DataObject* theObj, LightApp_Study* theStudy )
+void SALOME_PYQT_DataModelLight::update ( LightApp_DataObject* /*theObj*/, LightApp_Study* /*theStudy*/ )
 {
   // Nothing to do here: we always keep the data tree in the up-to-date state
   // The only goal of this method is to hide default behavior from LightApp_DataModel
index 0902b20a5e58e2ca8ec5396f70986f3eed4907ee..17ae4ac5643e6b7585ca213fe0fab3afc1793e2a 100644 (file)
@@ -113,7 +113,7 @@ QPixmap SALOME_PYQT_DataObjectLight::icon(const int index) const
 // function : SALOME_PYQT_DataObjectLight::toolTip()
 // purpose  : return toolTip of object
 //=================================================================================
-QString SALOME_PYQT_DataObjectLight::toolTip(const int index) const
+QString SALOME_PYQT_DataObjectLight::toolTip(const int /*index*/) const
 {
   return myToolTip;
 }
index 0789456ee9dc3235afd9a156546ab59fae61e816..73437e61c83ffdeefecc5c94c13a9ac00cd7d3ca 100644 (file)
@@ -637,7 +637,7 @@ void SALOME_PYQT_ModuleLight::getSelected( DataObjectList& ) const
   \brief Used to notify a Python light module of a modification of selection in study (propagation of a remote selection)
   \param list of study entries
 */
-void SALOME_PYQT_ModuleLight::setSelected( const QStringList& entries, const bool isUnused)
+void SALOME_PYQT_ModuleLight::setSelected( const QStringList& entries, const bool /*isUnused*/)
 {
   MESSAGE("setSelected");
   return myHelper->selectionUpdated(entries);
index afd351518c12c6c0b47170d73a3697eb0a8cfe6c..ca447cec8d1a09d651351bd2df27f2063c96c110 100644 (file)
@@ -39,7 +39,7 @@ class SALOME_PYQT_DataObjectLight;
 
 class SALOME_PYQT_LIGHT_EXPORT SALOME_PYQT_ModuleLight: public LightApp_Module
 {
-  Q_OBJECT;
+  Q_OBJECT
 
 public:
   SALOME_PYQT_ModuleLight();
index e305afbe036c42859ba56783d313ab3bb43b1bb5..e0c141ed9543a090793cc255907b38e0b89fe73a 100644 (file)
@@ -178,6 +178,7 @@ public:
   }
   void message( const QString& msg )
   {
+    (void)msg; // unused in debug mode
     if ( theDEBUG )
       MESSAGE( qPrintable( myName ) << " : " << qPrintable( msg ) );
   }
@@ -388,7 +389,7 @@ QIcon PyModuleHelper::XmlHandler::loadIcon( const QString& fileName )
 */
 void PyModuleHelper::XmlHandler::createMenu( QDomNode& parentNode, 
                                              const int parentMenuId,
-                                             QMenu*    parentPopup )
+                                             QMenu*    /*parentPopup*/ )
 {
   if ( !module() || parentNode.isNull() )
     return;
@@ -2086,7 +2087,7 @@ void PyModuleHelper::internalCustomize( SUIT_Study* study )
 
   \param study parent study
 */
-void PyModuleHelper::internalDeactivate( SUIT_Study* study )
+void PyModuleHelper::internalDeactivate( SUIT_Study* /*study*/ )
 {
   FuncMsg fmsg( "--- PyModuleHelper::internalDeactivate()" );
 
@@ -2857,8 +2858,8 @@ void PyModuleHelper::onObjectBrowserClicked(SUIT_DataObject* theObj, int theColu
     }
   private:
     PyModuleHelper* myHelper;
-    int    myColumn;
     QString myEntry;
+    int myColumn;
   };
   
   // Posting the request only if dispatcher is not busy!
index 04b9bece839c9872e70df3159a1eda7a086b8647..e243c2d4aede656b54e23fa518f2bda0be6c3d58 100644 (file)
@@ -1678,7 +1678,7 @@ public:
   bool mySubst;
   TResult myDefault;
   TGetStrSettingEvent( const QString& section, const QString& name, const QString& def, const bool subst ) 
-    : mySection( section ), myName( name ), myDefault( def ), mySubst( subst ) {}
+    : mySection( section ), myName( name ), mySubst( subst ), myDefault( def ) {}
   virtual void Execute() 
   {
     if ( SUIT_Session::session() ) {
@@ -2117,13 +2117,13 @@ public:
   CrTool( const QString& tBar, const QString& nBar ) 
     : myCase( 0 ), myTbTitle( tBar ), myTbName( nBar)  {}
   CrTool( const int id, const int tBar, const int idx ) 
-    : myCase( 1 ), myId( id ), myTbId( tBar ), myIndex( idx ) {}
+    : myCase( 1 ), myTbId( tBar ), myId( id ), myIndex( idx ) {}
   CrTool( const int id, const QString& tBar, const int idx )
-    : myCase( 2 ), myId( id ), myTbTitle( tBar ), myIndex( idx ) {}
+    : myCase( 2 ), myTbTitle( tBar ), myId( id ), myIndex( idx ) {}
   CrTool( QAction* action, const int tbId, const int id, const int idx )
-    : myCase( 3 ), myAction( action ), myTbId( tbId ), myId( id ), myIndex( idx ) {}
+    : myCase( 3 ), myTbId( tbId ), myAction( action ), myId( id ), myIndex( idx ) {}
   CrTool( QAction* action, const QString& tBar, const int id, const int idx )
-    : myCase( 4 ), myAction( action ), myTbTitle( tBar ), myId( id ), myIndex( idx ) {}
+    : myCase( 4 ), myTbTitle( tBar ), myAction( action ), myId( id ), myIndex( idx ) {}
 
   int execute() const
   {
@@ -2133,26 +2133,33 @@ public:
         return getActiveModule()->createTool( myTbTitle, myTbName );
       else if ( getApplication() )
         return getApplication()->createTool( myTbTitle, myTbName );
+      break;
     case 1:
       if ( getActiveModule() )
         return getActiveModule()->createTool( myId, myTbId, myIndex );
       else if ( getApplication() )
         return getApplication()->createTool( myId, myTbId, myIndex );
+      break;
     case 2:
       if ( getActiveModule() )
         return getActiveModule()->createTool( myId, myTbTitle, myIndex );
       else if ( getApplication() )
         return getApplication()->createTool( myId, myTbTitle, myIndex );
+      break;
     case 3:
       if ( getActiveModule() )
         return getActiveModule()->createTool( myAction, myTbId, myId, myIndex );
       else if ( getApplication() )
         return getApplication()->createTool( myAction, myTbId, myId, myIndex );
+      break;
     case 4:
       if ( getActiveModule() )
         return getActiveModule()->createTool( myAction, myTbTitle, myId, myIndex );
       else if ( getApplication() )
         return getApplication()->createTool( myAction, myTbTitle, myId, myIndex );
+      break;
+    default:
+      break;
     }
     return -1;
   }
@@ -2269,17 +2276,17 @@ class CrMenu
 {
 public:
   CrMenu( const QString& subMenu, const int menu, const int id, const int group, const int idx ) 
-    : myCase( 0 ), mySubMenuName( subMenu ), myMenuId( menu ), myId( id ), myGroup( group ), myIndex( idx ) {}
+    : myCase( 0 ), myMenuId( menu ), mySubMenuName( subMenu ), myGroup( group ), myId( id ), myIndex( idx ) {}
   CrMenu( const QString& subMenu, const QString& menu, const int id, const int group, const int idx ) 
-    : myCase( 1 ), mySubMenuName( subMenu ), myMenuName( menu ), myId( id ), myGroup( group ), myIndex( idx ) {}
+    : myCase( 1 ), myMenuName( menu ), mySubMenuName( subMenu ), myGroup( group ), myId( id ), myIndex( idx ) {}
   CrMenu( const int id, const int menu, const int group, const int idx ) 
-    : myCase( 2 ), myId( id ), myMenuId( menu ), myGroup( group ), myIndex( idx ) {}
+    : myCase( 2 ), myMenuId( menu ), myGroup( group ), myId( id ), myIndex( idx ) {}
   CrMenu( const int id, const QString& menu, const int group, const int idx ) 
-    : myCase( 3 ), myId( id ), myMenuName( menu ), myGroup( group ), myIndex( idx ) {}
+    : myCase( 3 ), myMenuName( menu ), myGroup( group ), myId( id ), myIndex( idx ) {}
   CrMenu( QAction* action, const int menu, const int id, const int group, const int idx ) 
-    : myCase( 4 ), myAction( action ), myMenuId( menu ), myId( id ), myGroup( group ), myIndex( idx ) {}
+    : myCase( 4 ), myMenuId( menu ), myGroup( group ), myAction( action ), myId( id ), myIndex( idx ) {}
   CrMenu( QAction* action, const QString& menu, const int id, const int group, const int idx ) 
-    : myCase( 5 ), myAction( action ), myMenuName( menu ), myId( id ), myGroup( group ), myIndex( idx ) {}
+    : myCase( 5 ), myMenuName( menu ), myGroup( group ), myAction( action ), myId( id ), myIndex( idx ) {}
 
   int execute() const
   {
@@ -2289,31 +2296,39 @@ public:
         return getActiveModule()->createMenu( mySubMenuName, myMenuId, myId, myGroup, myIndex );
       else if ( getApplication() )
         return getApplication()->createMenu( mySubMenuName, myMenuId, myId, myGroup, myIndex );
+      break;
     case 1:
       if ( getActiveModule() )
         return getActiveModule()->createMenu( mySubMenuName, myMenuName, myId, myGroup, myIndex );
       else if ( getApplication() )
         return getApplication()->createMenu( mySubMenuName, myMenuName, myId, myGroup, myIndex );
+      break;
     case 2:
       if ( getActiveModule() )
         return getActiveModule()->createMenu( myId, myMenuId, myGroup, myIndex );
       else if ( getApplication() )
         return getApplication()->createMenu( myId, myMenuId, myGroup, myIndex );
+      break;
     case 3:
       if ( getActiveModule() )
         return getActiveModule()->createMenu( myId, myMenuName, myGroup, myIndex );
       else if ( getApplication() )
         return getApplication()->createMenu( myId, myMenuName, myGroup, myIndex );
+      break;
     case 4:
       if ( getActiveModule() )
         return getActiveModule()->createMenu( myAction, myMenuId, myId, myGroup, myIndex );
       else if ( getApplication() )
         return getApplication()->createMenu( myAction, myMenuId, myId, myGroup, myIndex );
+      break;
     case 5:
       if ( getActiveModule() )
         return getActiveModule()->createMenu( myAction, myMenuName, myId, myGroup, myIndex );
       else if ( getApplication() )
         return getApplication()->createMenu( myAction, myMenuName, myId, myGroup, myIndex );
+      break;
+    default:
+      break;
     }
     return -1;
   }
@@ -3977,10 +3992,10 @@ public:
                      const QString& icon,
                      const QString& tooltip,
                      const QString& parent )
-    : myName( name ),
+    : myParent( parent ),
+      myName( name ),
       myIcon( icon ),
-      myToolTip( tooltip ),
-      myParent( parent ) {}
+      myToolTip( tooltip ) {}
   virtual void Execute()
   {
     SALOME_PYQT_ModuleLight* module = dynamic_cast<SALOME_PYQT_ModuleLight*>( getActiveModule() );
index 943a1583cbbb1f100d07c0f2d5576e1b65d2afbd..7d7b9b6a564e5c613843a3394c56b2ff1312801c 100644 (file)
@@ -103,7 +103,7 @@ bool SOCC_Viewer::highlight( const Handle(SALOME_InteractiveObject)& obj,
   \param onlyInViewer - search object only in viewer (so object must be displayed)
 */
 bool SOCC_Viewer::isInViewer( const Handle(SALOME_InteractiveObject)& obj,
-                              bool onlyInViewer )
+                              bool /*onlyInViewer*/ )
 {
   AIS_ListOfInteractive List;
   getAISContext()->DisplayedObjects(List);
@@ -363,7 +363,7 @@ void SOCC_Viewer::Display( const SALOME_OCCPrs* prs )
   \param prs - presentation
   \param forced - removes object from context
 */
-void SOCC_Viewer::Erase( const SALOME_OCCPrs* prs, const bool forced )
+void SOCC_Viewer::Erase( const SALOME_OCCPrs* prs, const bool /*forced*/ )
 {
   // try do downcast object
   const SOCC_Prs* anOCCPrs = dynamic_cast<const SOCC_Prs*>( prs );
@@ -511,13 +511,13 @@ void SOCC_Viewer::LocalSelection( const SALOME_OCCPrs* thePrs, const std::list<i
       std::list<int>::const_iterator it;
       if ( anAIS->IsKind( STANDARD_TYPE( AIS_Shape ) ) )
       {
-        ic->Load( anAIS, -1, false );
+        ic->Load( anAIS, -1 );
         for( it = sel_modes.begin(); it != sel_modes.end(); ++it )
           ic->Activate( anAIS, AIS_Shape::SelectionMode( (TopAbs_ShapeEnum)*it ) );
       }
       else if ( anAIS->DynamicType() != STANDARD_TYPE(AIS_Trihedron) )
       {
-        ic->Load( anAIS, -1, false );
+        ic->Load( anAIS, -1 );
         for( it = sel_modes.begin(); it != sel_modes.end(); ++it )
           ic->Activate( anAIS, *it );
       }
index ae5648a6e6bb499df5d0afb60dba2ed1b6cd1f49..91dcd0d1c34922960b558f533fdf846ff55a0bf0 100644 (file)
@@ -53,7 +53,7 @@ SOCC_ViewWindow
 ::action( const int theAction  )
 {
   const int inc = 10;
-  int cx, cy;
+  int cx = 0, cy = 0;
   if ( theAction == SUIT_Accel::ZoomIn || theAction == SUIT_Accel::ZoomOut ||
        theAction == SUIT_Accel::RotateLeft || theAction == SUIT_Accel::RotateRight ||
        theAction == SUIT_Accel::RotateUp || theAction == SUIT_Accel::RotateDown ) {
index 64b68cd2678d5c9a17028cc51715130f7b4c2d2d..2282709eb36a07b960f89ebc0b982f851304fb7c 100644 (file)
@@ -32,7 +32,7 @@
 
 class SOCC_EXPORT SOCC_ViewWindow : public OCCViewer_ViewWindow
 {
-  Q_OBJECT;
+  Q_OBJECT
 
 public:
   SOCC_ViewWindow( SUIT_Desktop*, OCCViewer_Viewer* );
index 7154f4cd35dd4896ee4f1f19bd54c89e2bf0492c..665e34d6b29874ffa2570f5d707a4ee505250160 100644 (file)
@@ -102,7 +102,7 @@ void SPlot2d_Viewer::renameAll( const Handle(SALOME_InteractiveObject)& IObj, co
   {
     const QVector<SUIT_ViewWindow*>& wnds = vm->getViews();
 
-    for ( uint i = 0; i < wnds.size(); i++ )
+    for ( int i = 0; i < wnds.size(); i++ )
     {
       Plot2d_ViewWindow* pwnd = dynamic_cast<Plot2d_ViewWindow*>( wnds.at( i ) );
       rename( IObj, name, pwnd->getViewFrame() );
@@ -375,7 +375,7 @@ SUIT_ViewWindow* SPlot2d_Viewer::createView( SUIT_Desktop* theDesktop )
   SLOT: called when action "Legend Clicked" is activated.
   override "onLegendClicked" method from Plot2d_ViewModel.
 */
-void SPlot2d_Viewer::onClicked( const QVariant& itemInfo, int index )
+void SPlot2d_Viewer::onClicked( const QVariant& itemInfo, int /*index*/ )
 {
   Plot2d_ViewFrame* aViewFrame = getActiveViewFrame();
   if(aViewFrame == NULL) return;
index 569451e9c8df3e88d3db23407bdcb213a9536d26..0d9d15167d64e13541368cc3a55d87aba10a07f5 100644 (file)
@@ -52,7 +52,7 @@ public:
   virtual QString          getType() const { return Type(); }
 
   /*  interactive object management */
-  void highlight( const Handle(SALOME_InteractiveObject)& IObject, bool highlight, bool update = true ) {}
+  void highlight( const Handle(SALOME_InteractiveObject)& /*IObject*/, bool /*highlight*/, bool /*update*/ = true ) {}
   void unHighlightAll() {}
   void rename( const Handle(SALOME_InteractiveObject)&, const QString&, Plot2d_ViewFrame* = 0 );
   void renameAll( const Handle(SALOME_InteractiveObject)&, const QString& );
index 24ebf10cd704aac5860845684fc5c7d573df3494..b0e241a5cdf74bfcede2d0a01e4b5204a39fcba0 100644 (file)
@@ -32,7 +32,7 @@
 
 class SPLOT2D_EXPORT SPlot2d_ViewWindow : public Plot2d_ViewWindow
 {
-  Q_OBJECT;
+  Q_OBJECT
 
 public:
   SPlot2d_ViewWindow( SUIT_Desktop*, Plot2d_Viewer* );
index 8aa52f100f70c391c744c9932a43891bb55b2dc6..4a391e3484dcdf2d274c7897b69d253477590b52 100644 (file)
@@ -472,7 +472,7 @@ bool STD_Application::isPossibleToClose( bool& closePermanently )
   return true;
 }
 
-int STD_Application::closeChoice( const QString& docName )
+int STD_Application::closeChoice( const QString& /*docName*/ )
 {
   int answer = SUIT_MessageBox::question( desktop(), tr( "CLOSE_STUDY" ), tr( "CLOSE_QUESTION" ),
                                           SUIT_MessageBox::Save | SUIT_MessageBox::Discard | SUIT_MessageBox::Cancel,
@@ -487,7 +487,7 @@ int STD_Application::closeChoice( const QString& docName )
   return res;
 }
 
-bool STD_Application::closeAction( const int choice, bool& closePermanently )
+bool STD_Application::closeAction( const int choice, bool& /*closePermanently*/ )
 {
   bool res = true;
   switch( choice )
index d79c13c75d454206d9d2590b23d66a1888aacf57..98d642b2e2e076d1a9eb1bb57e57d4f3dcf4b11e 100644 (file)
@@ -143,7 +143,7 @@ void SUIT_DataBrowser::setUpdateModified( const bool on )
   \param obj starting object for updating
   \param autoOpen if \c true automatically open branches
 */
-void SUIT_DataBrowser::updateTree( SUIT_DataObject* obj, const bool autoOpen )
+void SUIT_DataBrowser::updateTree( SUIT_DataObject* obj, const bool /*autoOpen*/ )
 {
   SUIT_ProxyModel* m = qobject_cast<SUIT_ProxyModel*>( model() );
   if ( m ) {
@@ -470,7 +470,7 @@ void SUIT_DataBrowser::onDblClicked( const QModelIndex& index )
   \brief Called when item specified by index is expanded.
   \internal
 */
-void SUIT_DataBrowser::onExpanded( const QModelIndex& index )
+void SUIT_DataBrowser::onExpanded( const QModelIndex& /*index*/ )
 {
   if (myResizeOnExpandItem) {
     adjustFirstColumnWidth();
index 4af8769d5bd04bf95308275dcd62071c85d298be..d5a4cd1422f1c464068e703914b4f18e6b8a2361 100644 (file)
@@ -658,7 +658,7 @@ void SUIT_TreeModel::setHeaderFlags( const QString& name, const Qtx::HeaderViewF
 */
 Qtx::HeaderViewFlags SUIT_TreeModel::headerFlags( const QString& name ) const
 {
-  Qtx::HeaderViewFlags flags;
+  Qtx::HeaderViewFlags flags = Qtx::ShowNone;
   for ( int i = 0, n = myColumns.size(); i < n; i++ ) {
     if ( myColumns[i].myName == name ) {
       flags = myColumns[i].myHeaderFlags;
@@ -1728,7 +1728,7 @@ QMimeData* SUIT_TreeModel::mimeData( const QModelIndexList& indexes ) const
 }
 
 bool SUIT_TreeModel::dropMimeData( const QMimeData* data, Qt::DropAction action,
-                                   int row, int column, const QModelIndex& parent )
+                                   int row, int /*column*/, const QModelIndex& parent )
 {
   if ( action == Qt::IgnoreAction )
     // do nothing with data
index 66102af7e448ab10d189d36eea4b4ea5233399b6..a355f370252afff1a957255e8186656beec0dfc4 100644 (file)
@@ -213,8 +213,8 @@ QVector<SUIT_ViewWindow*> SUIT_ViewManager::getViews() const
  */
 bool SUIT_ViewManager::insertView(SUIT_ViewWindow* theView)
 {
-  unsigned int aSize = myViews.size();
-  unsigned int aNbItems = myViews.count() + 1;
+  int aSize = myViews.size();
+  int aNbItems = myViews.count() + 1;
   if ( aNbItems > aSize )
   {
     myViews.resize( aNbItems );
@@ -251,7 +251,7 @@ bool SUIT_ViewManager::insertView(SUIT_ViewWindow* theView)
   connect(theView, SIGNAL(contextMenuRequested( QContextMenuEvent * )),
           this,    SLOT  (onContextMenuRequested( QContextMenuEvent * )));
 
-  for ( uint i = 0; i < aSize; i++ )
+  for ( int i = 0; i < aSize; i++ )
   {
     if ( myViews[i] == 0 )
     {
@@ -345,8 +345,8 @@ void SUIT_ViewManager::onMousePressed(SUIT_ViewWindow* theView, QMouseEvent* the
 void SUIT_ViewManager::onWindowActivated(SUIT_ViewWindow* view)
 {
   if (view) {
-    unsigned int aSize = myViews.size();
-    for (uint i = 0; i < aSize; i++) {
+    int aSize = myViews.size();
+    for (int i = 0; i < aSize; i++) {
       if (myViews[i] && myViews[i] == view) {
         myActiveView = view;
         emit activated( this );
index 22c20b4c1f22453c34fcbca08334d2ee46818314..f429d5de2bd53a05f8212adeefde76556aed676d 100644 (file)
@@ -334,7 +334,7 @@ bool SUIT_ViewWindow::dropDownButtons() const
 */
 int SUIT_ViewWindow::getId() const
 {
-  return int(long(this));
+  return int(reinterpret_cast<long long>(this)); // todo: unsafe - converting pointer to int can give non-unique result
 }
 
 /*!
@@ -454,7 +454,7 @@ void SUIT_ViewWindow::updateSyncViews()
 /*!
   "Synchronize View" action slot.
 */
-void SUIT_ViewWindow::onSynchronizeView( bool checked )
+void SUIT_ViewWindow::onSynchronizeView( bool /*checked*/ )
 {
   QAction* a = qobject_cast<QAction*>( sender() );
   if ( a ) {
index cba1a49ca87eb5220efab73469c9703c30522ce9..18aa58723e4194c5a80c98b61481d22030bf9902 100644 (file)
@@ -102,7 +102,7 @@ namespace
     }
 
   protected:
-    QString userFileName( const QString& appName, const bool forLoad ) const
+    QString userFileName( const QString& /*appName*/, const bool forLoad ) const
     {
       if ( version().isEmpty() ) return ""; 
       return SUIT_ResourceMgr::userFileName( myCustomAppName, forLoad );
index 4c3036f0e5b844e9e52011f8d0d3ed6680ffe307..a3e8282125295d331284555bc448c02157f2b770 100644 (file)
@@ -67,7 +67,7 @@ void SUIT_PYTHON::init_python(int argc, char **argv)
   script += "import sys\n";
   script += "sys.excepthook = _custom_except_hook\n";
   script += "del _custom_except_hook, sys\n";
-  int res = PyRun_SimpleString(qUtf8Printable(script));
+  PyRun_SimpleString(qUtf8Printable(script));
   // VSR (22/09/2016): end of workaround
   PyEval_InitThreads(); // Create (and acquire) the interpreter lock - can be called many times
   // Py_InitThreads acquires the GIL
index cd2cb35108ea889c93edc4686b023b68c180ef6e..503cf1e91256f8aaaf28655167c40201fbad1e3f 100644 (file)
@@ -166,20 +166,20 @@ namespace SVTK
 }
 
 
-vtkStandardNewMacro(SALOME_Actor);
+vtkStandardNewMacro(SALOME_Actor)
 
 /*!
   Constructor
 */
 SALOME_Actor
 ::SALOME_Actor():
-  myRenderer(NULL),
   myInteractor(NULL),
+  myRenderer(NULL),
   mySelectionMode(ActorSelection),
   myPreHighlightActor(SVTK_Actor::New()),
   myHighlightActor(SVTK_Actor::New()),
-  myOutline(vtkOutlineSource::New()),
   myOutlineActor(VTKViewer_Actor::New()),
+  myOutline(vtkOutlineSource::New()),
   myIsDisplayNameActor(false),
   myNameActor(VTKViewer_FramedTextActor::New())
 {
@@ -712,7 +712,7 @@ SALOME_Actor
       TColStd_MapOfInteger anIndexes;
       if(aMapIter != aVectorIdsMap.end()){
         const SVTK_AreaPicker::TVectorIds& aVectorIds = aMapIter->second;
-        vtkIdType anEnd = aVectorIds.size();
+        vtkIdType anEnd = (int)aVectorIds.size(); //!< TODO: conversion from size_t to int
         for(vtkIdType anId = 0; anId < anEnd; anId++ ) {
           int aPointId = aVectorIds[anId];
           if( aPointId >= 0 && mySelector->IsValid( this, aPointId, true ) ) {
@@ -745,7 +745,7 @@ SALOME_Actor
             aRenderer->SetWorldPoint( aBounds[ i ], aBounds[ j ], aBounds[ k ], 1.0 );
             aRenderer->WorldToDisplay();
             aRenderer->GetDisplayPoint( aPnt );
-            bool anIsPointInSelection;
+            bool anIsPointInSelection = false;
             if( theSelectionEvent->myIsRectangle )
               anIsPointInSelection =  aPnt[0] > x1 && aPnt[0] < x2 && aPnt[1] > y1 && aPnt[1] < y2;
             else if( theSelectionEvent->myIsPolygon )
@@ -788,7 +788,7 @@ SALOME_Actor
       TColStd_MapOfInteger anIndexes;
       if(aMapIter != aVectorIdsMap.end()){
         const SVTK_AreaPicker::TVectorIds& aVectorIds = aMapIter->second;
-        vtkIdType anEnd = aVectorIds.size();
+        vtkIdType anEnd = (int)aVectorIds.size(); //!< TODO: conversion from size_t to int
         for(vtkIdType anId = 0; anId < anEnd; anId++ ) {
           int aCellId = aVectorIds[anId];
           if ( !mySelector->IsValid( this, aCellId ) )
@@ -826,7 +826,7 @@ SALOME_Actor
       SVTK_IndexedMapOfIds anIndexes;
       if(aMapIter != aVectorIdsMap.end()){
         const SVTK_AreaPicker::TVectorIds& aVectorIds = aMapIter->second;
-        vtkIdType anEnd = aVectorIds.size();
+        vtkIdType anEnd = (int)aVectorIds.size(); //!< TODO: conversion from size_t to int
         for(vtkIdType anId = 0; anId < anEnd; anId++ ) {
           int aCellId = aVectorIds[anId];
           if ( !mySelector->IsValid( this, aCellId ) )
index 91f2026e2444a26c0119c99d055081e29dc71dea..b5ed155edd9bfb72fb6f0fdd2edd9f8eb3bc088e 100644 (file)
@@ -74,7 +74,7 @@ class SVTK_EXPORT SALOME_Actor : public VTKViewer_Actor
  public:
   static SALOME_Actor* New();
   
-  vtkTypeMacro(SALOME_Actor,VTKViewer_Actor);
+  vtkTypeMacro(SALOME_Actor,VTKViewer_Actor)
 
   //----------------------------------------------------------------------------
   //! To check, if the #SALOME_Actor has a reference to #SALOME_InteractiveObject
index 6253b2e4a0a24efd8a7bff29210318669f63a249..a534ea44abe059e08a40ffa45db7b9a83b76555a 100644 (file)
@@ -44,7 +44,7 @@
 #include "utilities.h"
 
 
-vtkStandardNewMacro(SVTK_Actor);
+vtkStandardNewMacro(SVTK_Actor)
 
 /*!
   Constructor
index 8c66d3a45d3c5047d6a926782df5c49370ad6f50..a42db7998ef561f4effdecf1c7b5e7cde5a0cf2f 100644 (file)
@@ -48,7 +48,7 @@ class SVTK_EXPORT SVTK_Actor : public SVTK_DeviceActor
 public:
   static SVTK_Actor* New();
 
-  vtkTypeMacro(SVTK_Actor,SVTK_DeviceActor);
+  vtkTypeMacro(SVTK_Actor,SVTK_DeviceActor)
 
   //! Initialiaze the instance completely
   virtual void
index 4212a0957b14ad0f1a43495d08840fe564761941..46e62b61e837fc11d99eca769b44360a49b2d81e 100644 (file)
@@ -87,6 +87,7 @@ namespace
   }
 
   //----------------------------------------------------------------------------
+  /* Unused
   void CalculatePickPosition( vtkRenderer *theRenderer, double theSelectionX,
       double theSelectionY, double theSelectionZ, double thePickPosition[3] )
   {
@@ -101,10 +102,10 @@ namespace
       }
     }
   }
+  */
 }
 
 vtkStandardNewMacro( SVTK_AreaPicker )
-;
 
 SVTK_AreaPicker::SVTK_AreaPicker()
 {
@@ -264,7 +265,7 @@ void SVTK_AreaPicker::SelectVisiblePoints( QVector< QPoint >& thePoints,
     double aDX[3];
     theRenderer->GetDisplayPoint( aDX );
 
-    bool isInSelection;
+    bool isInSelection = false;
     if ( theMode == RectangleMode ) isInSelection = aDX[0] >= mySelection[0]
         && aDX[0] <= mySelection[2] && aDX[1] >= mySelection[1]
         && aDX[1] <= mySelection[3];
@@ -372,7 +373,7 @@ void SVTK_AreaPicker::SelectVisibleCells( QVector< QPoint >& thePoints,
     double aDX[3];
     theRenderer->GetDisplayPoint( aDX );
 
-    bool isInSelection;
+    bool isInSelection = false;
     if ( theMode == RectangleMode ) isInSelection = aDX[0] >= mySelection[0]
         && aDX[0] <= mySelection[2] && aDX[1] >= mySelection[1]
         && aDX[1] <= mySelection[3];
index 972438fd647c49470d63143ffac783508d601247..fbe50d391792fafae235192979efb972b801bdf1 100644 (file)
@@ -60,7 +60,7 @@ class SVTK_EXPORT SVTK_AreaPicker : public vtkAbstractPropPicker
   static
   SVTK_AreaPicker *New();
 
-  vtkTypeMacro(SVTK_AreaPicker,vtkAbstractPropPicker);
+  vtkTypeMacro(SVTK_AreaPicker,vtkAbstractPropPicker)
   
   /*! 
     Specify tolerance for performing pick operation. Tolerance is specified
index 743dc557e2c2b37a04a966f213875945e0eb973c..0740ab57a4768483761d46d41c7f40c246067051 100644 (file)
@@ -43,7 +43,7 @@
 #include <vtkProperty.h>
 #include <vtkProperty2D.h>
 
-vtkStandardNewMacro(SVTK_CubeAxesActor2D);
+vtkStandardNewMacro(SVTK_CubeAxesActor2D)
 
 // Instantiate this object.
 SVTK_CubeAxesActor2D::SVTK_CubeAxesActor2D()
index 0944606f09fbdb661620fe2245bd5123d69b3ee8..3d322b047a89576e54d3c2a9c8ab503039710001 100644 (file)
@@ -53,7 +53,7 @@ class SVTK_EXPORT SVTK_CubeAxesActor2D : public vtkCubeAxesActor2D
 #endif
 {
 public:
-  vtkTypeMacro(SVTK_CubeAxesActor2D,vtkCubeAxesActor2D);
+  vtkTypeMacro(SVTK_CubeAxesActor2D,vtkCubeAxesActor2D)
 
   // Description:
   // Instantiate object with bold, italic, and shadow enabled; font family
index a0c576e21ed69d4b5422503a1f486ff1194662a3..b7f4f42c89db8aa3f6adf44c781e189d5501deed 100644 (file)
@@ -43,7 +43,7 @@
 
 #include <vtkPassThroughFilter.h>
 
-vtkStandardNewMacro(SVTK_DeviceActor);
+vtkStandardNewMacro(SVTK_DeviceActor)
 
 /*!
   Constructor
@@ -97,7 +97,7 @@ SVTK_DeviceActor
 
   myFeatureEdges->Delete();
 
-  for(int i = 0, iEnd = myPassFilter.size(); i < iEnd; i++)
+  for(size_t i = 0, iEnd = myPassFilter.size(); i < iEnd; i++)
     myPassFilter[i]->Delete();
 }
 
@@ -205,7 +205,7 @@ SVTK_DeviceActor
   if(myIsFeatureEdgesEnabled)
     mTime = std::max(mTime,myFeatureEdges->GetMTime());
 
-  for(int i = 0, iEnd = myPassFilter.size(); i < iEnd; i++)
+  for(size_t i = 0, iEnd = myPassFilter.size(); i < iEnd; i++)
     std::max(mTime,myPassFilter[i]->GetMTime());
 
   return mTime;
index 89e5264c67d2e4f1162bd53cf7391529df17eff9..82c31e1c590743285afb7bbb513153dace878cc2 100644 (file)
@@ -56,7 +56,7 @@ class vtkAlgorithmOutput;
 class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor
 {
  public:
-  vtkTypeMacro(SVTK_DeviceActor,vtkLODActor);
+  vtkTypeMacro(SVTK_DeviceActor,vtkLODActor)
 
   static
   SVTK_DeviceActor* 
index a8abf22d148dd44d194ae60a5c736860ecd97bdf..90debf24a22908c0d61bcde0ae9f2d55a72f4b5d 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <QTimer>
 
-vtkStandardNewMacro(QVTK_GenericRenderWindowInteractor);
+vtkStandardNewMacro(QVTK_GenericRenderWindowInteractor)
 
 /*!
   Constructor
@@ -104,7 +104,7 @@ QVTK_GenericRenderWindowInteractor
 }
 
 
-vtkStandardNewMacro(SVTK_GenericRenderWindowInteractor);
+vtkStandardNewMacro(SVTK_GenericRenderWindowInteractor)
 
 /*!
   Constructor
index 8e47def06289c4bc3a5a01b2e7dc5ac6b6fc5d0f..aaecd3ecefc7e31fc7db541c81dffed47f0bc5ff 100644 (file)
@@ -58,11 +58,11 @@ class SVTK_EXPORT QVTK_GenericRenderWindowInteractor:
  public QObject,
  public vtkGenericRenderWindowInteractor
 {
-  Q_OBJECT;
+  Q_OBJECT
 
  public:
   static QVTK_GenericRenderWindowInteractor* New();
-  vtkTypeMacro(QVTK_GenericRenderWindowInteractor,vtkGenericRenderWindowInteractor);
+  vtkTypeMacro(QVTK_GenericRenderWindowInteractor,vtkGenericRenderWindowInteractor)
 
   //! Starts the QTimer instance on defined microseconds
   virtual
@@ -98,7 +98,7 @@ class SVTK_EXPORT SVTK_GenericRenderWindowInteractor: public QVTK_GenericRenderW
 {
  public:
   static SVTK_GenericRenderWindowInteractor* New();
-  vtkTypeMacro(SVTK_GenericRenderWindowInteractor,QVTK_GenericRenderWindowInteractor);
+  vtkTypeMacro(SVTK_GenericRenderWindowInteractor,QVTK_GenericRenderWindowInteractor)
 
   //! To get access to SVTK_Selector
   SVTK_Selector* 
index 7f5b1d1fa69ad2c9e522c8b002724e320fa1d360..afd6227ef3c7c332c6eca374abda9320b9ea28ff 100644 (file)
@@ -38,7 +38,7 @@ class SVTK_Hasher {
 public:
     static Standard_Integer HashCode(const std::vector<Standard_Integer> ids,
                                     const Standard_Integer upper) {
-        Standard_Integer seed = ids.size();
+        Standard_Integer seed = (Standard_Integer)ids.size(); //!< TODO: conversion from size_t to int
         for( Standard_Integer i = 0; i <  (Standard_Integer) ids.size(); i++ ) {
             Standard_Integer v = ids[i];
             seed ^= v + 0x9e3779b9 + ( seed << 6 ) + ( seed >> 2 );
index 9c255d52decbe5b2a9dbffcffb296532c9f7b35e..21058129d8d7d932832a387bfd429302db400da4 100644 (file)
@@ -88,7 +88,7 @@ SVTK_ImageWriterMgr
                 //"- total = "<<mySemaphore->total()<<
                 "; available = "<<mySemaphore->available()<<endl;
   if(MYDEBUG) cout<<"SVTK_ImageWriterMgr::Stop - *mySemaphore += "<<myThreads.size()<<endl;
-  mySemaphore->acquire( myThreads.size() );
+  mySemaphore->acquire( (int)myThreads.size() ); //!< TODO: conversion from size_t to int
 
   for(size_t anId = 0, anEnd = myThreads.size(); anId < anEnd; anId++){
     SVTK_ImageWriter* anImageWriter = myThreads[anId];
index a717d752ab55a05c0d4b9577fe1aac3db3963bc4..d3610ed9fef32262a3f66350d923614efedf0179 100644 (file)
@@ -78,24 +78,24 @@ namespace
 }
 
 
-vtkStandardNewMacro(SVTK_InteractorStyle);
+vtkStandardNewMacro(SVTK_InteractorStyle)
 
 
 /*!
   Constructor
 */
 SVTK_InteractorStyle::SVTK_InteractorStyle():
-  mySelectionEvent(new SVTK_SelectionEvent()),
-  myPointPicker(vtkPointPicker::New()),
   myLastHighlitedActor(NULL),
   myLastPreHighlitedActor(NULL),
   myControllerIncrement(SVTK_ControllerIncrement::New()),
   myControllerOnKeyDown(SVTK_ControllerOnKeyDown::New()),
+  mySelectionEvent(new SVTK_SelectionEvent()),
   myHighlightSelectionPointActor(SVTK_Actor::New()),
+  myPointPicker(vtkPointPicker::New()),
   myRectBand(0),
   myPolygonBand(0),
-  myIsAdvancedZoomingEnabled(false),
-  myPoligonState( Disable )
+  myPoligonState(Disable),
+  myIsAdvancedZoomingEnabled(false)
 {
   myPointPicker->Delete();
 
@@ -538,7 +538,7 @@ void SVTK_InteractorStyle::OnLeftButtonDown(int ctrl, int shift,
           if( SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( aVTKActor ) )
           {
                Selection_Mode aSelectionMode = GetSelector()->SelectionMode();
-               double* aCoords;
+               double* aCoords = NULL;
                int aVtkId;
                bool isTrueType = false;
                
@@ -1326,7 +1326,7 @@ void SVTK_InteractorStyle::onOperation(QPoint mousePos)
     {
       if (!myCursorState)
         setCursor(VTK_INTERACTOR_STYLE_CAMERA_SELECT);
-    }
+    } // fall through!
   case VTK_INTERACTOR_STYLE_CAMERA_FIT:
     {
       myOtherPoint = mousePos;
@@ -1343,7 +1343,7 @@ void SVTK_InteractorStyle::onOperation(QPoint mousePos)
   Called when user moves mouse inside viewer window and there is no active viewer operation 
   (!put necessary processing here!)
 */
-void SVTK_InteractorStyle::onCursorMove(QPoint mousePos
+void SVTK_InteractorStyle::onCursorMove(QPoint /*mousePos*/
 {
   if ( !GetSelector()->IsPreSelectionEnabled() ) 
     return;
@@ -1709,7 +1709,7 @@ bool isValid( const QPolygon* thePoints, const QPoint& theCurrent )
     return true;
 
   bool res = true;
-  for ( uint i = 0; i < thePoints->count() - 1 && res; i++ )
+  for ( int i = 0; i < thePoints->count() - 1 && res; i++ )
   {
     const QPoint& aStart = thePoints->point( i );
     const QPoint& anEnd  = thePoints->point( i + 1 );
@@ -2029,7 +2029,7 @@ SVTK_ControllerIncrement* SVTK_InteractorStyle::ControllerIncrement()
   return myControllerIncrement.GetPointer();
 }
 
-vtkStandardNewMacro(SVTK_ControllerIncrement);
+vtkStandardNewMacro(SVTK_ControllerIncrement)
 SVTK_ControllerIncrement::SVTK_ControllerIncrement()
 {
   myIncrement=10;
@@ -2058,7 +2058,7 @@ int SVTK_ControllerIncrement::Decrease()
   return myIncrement;
 }
 
-vtkStandardNewMacro(SVTK_GeomControllerIncrement);
+vtkStandardNewMacro(SVTK_GeomControllerIncrement)
 SVTK_GeomControllerIncrement::SVTK_GeomControllerIncrement()
 {
 }
@@ -2079,7 +2079,7 @@ int SVTK_GeomControllerIncrement::Decrease()
   return myIncrement;
 }
 
-vtkStandardNewMacro(SVTK_ControllerOnKeyDown);
+vtkStandardNewMacro(SVTK_ControllerOnKeyDown)
 
 /*!
   Constructor
@@ -2095,7 +2095,7 @@ SVTK_ControllerOnKeyDown::~SVTK_ControllerOnKeyDown()
 {
 }
 
-bool SVTK_ControllerOnKeyDown::OnKeyDown(vtkInteractorStyle* theIS)
+bool SVTK_ControllerOnKeyDown::OnKeyDown(vtkInteractorStyle* /*theIS*/)
 {
   return true;
 }
index e6b957ed2c2a433e211bdf30f6d249b72bbf6b0d..f2dbde9324b4bdca678c9763b2c34ffc31f85571 100644 (file)
@@ -55,7 +55,7 @@
 */
 class SVTK_EXPORT SVTK_ControllerIncrement : public vtkObject{
  public:
-  vtkTypeMacro(SVTK_ControllerIncrement, vtkObject);
+  vtkTypeMacro(SVTK_ControllerIncrement, vtkObject)
   static SVTK_ControllerIncrement* New();
 
   //! Set start value of increment
@@ -87,7 +87,7 @@ class SVTK_EXPORT SVTK_ControllerIncrement : public vtkObject{
 */
 class SVTK_EXPORT SVTK_GeomControllerIncrement : public SVTK_ControllerIncrement{
  public:
-  vtkTypeMacro(SVTK_GeomControllerIncrement, SVTK_ControllerIncrement);
+  vtkTypeMacro(SVTK_GeomControllerIncrement, SVTK_ControllerIncrement)
   static SVTK_GeomControllerIncrement* New();
 
   //! Increace the increment value by add 1
@@ -110,7 +110,7 @@ class SVTK_EXPORT SVTK_GeomControllerIncrement : public SVTK_ControllerIncrement
 */
 class SVTK_EXPORT SVTK_ControllerOnKeyDown : public vtkObject{
  public:
-  vtkTypeMacro(SVTK_ControllerOnKeyDown, vtkObject);
+  vtkTypeMacro(SVTK_ControllerOnKeyDown, vtkObject)
   static SVTK_ControllerOnKeyDown* New();
 
   //! Provides the action on event 
@@ -157,7 +157,7 @@ class SVTK_EXPORT SVTK_InteractorStyle: public vtkInteractorStyle
 {
  public:
   static SVTK_InteractorStyle *New();
-  vtkTypeMacro(SVTK_InteractorStyle, vtkInteractorStyle);
+  vtkTypeMacro(SVTK_InteractorStyle, vtkInteractorStyle)
 
   typedef boost::shared_ptr<SVTK_SelectionEvent> PSelectionEvent;
 
index 9465b0afd7559f5b7b9f2f838c3606873e800053..c07f7ac49a9271669de6c8ed155339c2050e1375 100644 (file)
@@ -33,7 +33,7 @@
 
 
 //----------------------------------------------------------------------------
-vtkStandardNewMacro(SVTK_KeyFreeInteractorStyle);
+vtkStandardNewMacro(SVTK_KeyFreeInteractorStyle)
 //----------------------------------------------------------------------------
 
 SVTK_KeyFreeInteractorStyle::SVTK_KeyFreeInteractorStyle():
index c984c8ae5a8895ffe31ea00d6c346da1bb080d91..e8964f8f3a53da6b1406087da21a094cad298250 100644 (file)
@@ -33,7 +33,7 @@ class SVTK_EXPORT SVTK_KeyFreeInteractorStyle : public SVTK_InteractorStyle
 {
  public:
   static SVTK_KeyFreeInteractorStyle *New();
-  vtkTypeMacro(SVTK_KeyFreeInteractorStyle,SVTK_InteractorStyle);
+  vtkTypeMacro(SVTK_KeyFreeInteractorStyle,SVTK_InteractorStyle)
   
  protected:
   SVTK_KeyFreeInteractorStyle();
index c4b526c34db765a7249b6baec3086ac559a8760d..50c41db78fb4bd4244c99521ceae8a3c63714347 100644 (file)
@@ -39,7 +39,7 @@ class QPushButton;
 
 class SVTK_NonIsometricDlg : public ViewerTools_DialogBase
 {
-  Q_OBJECT;
+  Q_OBJECT
 
 public:
   SVTK_NonIsometricDlg(QtxAction* theAction,
index b7e2cba1660903a2e83ff38d48aea5c6e48dd975..1fcab48dc5814ff2e22a45f7f778c0552ac998bb 100644 (file)
@@ -68,28 +68,28 @@ namespace
 }
 
 //----------------------------------------------------------------------------
-vtkStandardNewMacro(SVTK_Recorder);
+vtkStandardNewMacro(SVTK_Recorder)
 
 
 //----------------------------------------------------------------------------
 SVTK_Recorder
 ::SVTK_Recorder():
-  myRenderWindow(NULL),
   myState(SVTK_Recorder_Stop),
+  myPaused(0),
+  myErrorStatus(0),
+  myPriority(0.0),
+  myTimeStart(0.0),
+  myFrameIndex(0),
+  myNbWrittenFrames(0),
   myNbFPS(5.5),
   myQuality(100),
   myProgressiveMode(true),
   myUseSkippedFrames(true),
-  myErrorStatus(0),
+  myNameAVIMaker("jpeg2yuv"),
   myCommand(vtkCallbackCommand::New()),
-  myPriority(0.0),
-  myTimeStart(0.0),
-  myFrameIndex(0),
-  myPaused(0),
+  myRenderWindow(NULL),
   myFilter(vtkWindowToImageFilter::New()),
-  myWriterMgr(new SVTK_ImageWriterMgr),
-  myNbWrittenFrames(0),
-  myNameAVIMaker("jpeg2yuv")
+  myWriterMgr(new SVTK_ImageWriterMgr)
 {
   myCommand->SetClientData(this); 
   myCommand->SetCallback(SVTK_Recorder::ProcessEvents);
@@ -433,13 +433,14 @@ SVTK_Recorder
       aStream<<"COPY /Y "<<QString::fromStdString(anInitialName).replace("/","\\\\").toStdString()<<
                  " "<<QString::fromStdString(anCurrentName).replace("/","\\\\").toStdString()<<" > NUL";
   #endif
-      if(anIndex + 1 < aFinishIndex)
+      if(anIndex + 1 < aFinishIndex) {
   #ifndef WIN32
         aStream<<" \\";
         aStream<<endl;
   #else
         aStream<<" & ";
   #endif
+      }
     }
     std::string aString(aStream.str());
     system(aString.c_str());
@@ -461,7 +462,7 @@ SVTK_Recorder
     //" -f "<<int(myNbFPS)<<" "<<
     " -f "<<myNbFPS<<" "<<
     " -n "<<myNbWrittenFrames<<" "<<
-    " -j \""<<myName<<"_\%06d.jpeg\" "<<
+    " -j \""<<myName<<"_%06d.jpeg\" "<<
     "| yuv2lav"<<" -o \""<<myName<<"\"";
 #ifdef WIN32
   aStream<<" -f aA";   
index 9dcc44df69ace69b4e2c2cd20af4734ea547bc0f..4b6dff3dcda1c7a136f20f1f8a1ee98592c3ad1b 100644 (file)
@@ -42,7 +42,7 @@ class SVTK_Recorder : public vtkObject
   
  public:
   static SVTK_Recorder *New();
-  vtkTypeMacro(SVTK_Recorder,vtkObject);
+  vtkTypeMacro(SVTK_Recorder,vtkObject)
 
   void
   SetRenderWindow(vtkRenderWindow* theRenderWindow);
index 592333012fe96a25b9c059081a03090f3a9937b1..e8356b868cde49c58107fe29d0d28974e0df1b5a 100644 (file)
@@ -197,7 +197,7 @@ QVTK_RenderWindowInteractor
 */
 void
 QVTK_RenderWindowInteractor
-::paintEvent( QPaintEvent* theEvent ) 
+::paintEvent( QPaintEvent* /*theEvent*/ ) 
 {
   GetDevice()->CreateTimer(VTKI_TIMER_FIRST);
 }
@@ -208,7 +208,7 @@ QVTK_RenderWindowInteractor
 */
 void
 QVTK_RenderWindowInteractor
-::resizeEvent( QResizeEvent* theEvent )
+::resizeEvent( QResizeEvent* /*theEvent*/ )
 {
   int* aSize = getRenderWindow()->GetSize();
   int aWidth = aSize[0];
@@ -243,7 +243,7 @@ QVTK_RenderWindowInteractor
 */
 void
 QVTK_RenderWindowInteractor
-::contextMenuEvent( QContextMenuEvent* event )
+::contextMenuEvent( QContextMenuEvent* /*event*/ )
 {}
 
 /*!
@@ -321,7 +321,7 @@ QVTK_RenderWindowInteractor
 */
 void
 QVTK_RenderWindowInteractor
-::mouseDoubleClickEvent( QMouseEvent* event )
+::mouseDoubleClickEvent( QMouseEvent* /*event*/ )
 {}
 
 
@@ -378,7 +378,7 @@ QVTK_RenderWindowInteractor
 */
 void  
 QVTK_RenderWindowInteractor
-::enterEvent( QEvent* event )
+::enterEvent( QEvent* /*event*/ )
 {
   if(FOCUS_UNDER_MOUSE){
     activateWindow();
index a77b0637c03979294ae6fd8a3af1f828f0676e02..3ebb0eb4013bd38ded9abc5ad48d794e353f1fd6 100644 (file)
@@ -63,7 +63,7 @@ class SVTK_Renderer;
 */
 class SVTK_EXPORT QVTK_RenderWindowInteractor: public QWidget
 {
-  Q_OBJECT;
+  Q_OBJECT
 
  public:
   QVTK_RenderWindowInteractor(QWidget* theParent, 
@@ -139,7 +139,7 @@ class SVTK_EXPORT QVTK_RenderWindowInteractor: public QWidget
 */
 class SVTK_EXPORT SVTK_RenderWindowInteractor: public QVTK_RenderWindowInteractor
 {
-  Q_OBJECT;
+  Q_OBJECT
 
  public:
   SVTK_RenderWindowInteractor(QWidget* theParent, 
index 4ecfc2c93b329aaddd886220f743c585cc10a00e..aad5d922ba94a2fc15843f9e6a995fd6ad857673 100644 (file)
 #undef max
 
 
-vtkStandardNewMacro(SVTK_Renderer);
+vtkStandardNewMacro(SVTK_Renderer)
 
 /*!
   Constructor
 */
 SVTK_Renderer
 ::SVTK_Renderer():
-  myDevice(VTKViewer_OpenGLRenderer::New()),
-  myInteractor(NULL),
   myPriority(0.0),
   myEventCallbackCommand(vtkCallbackCommand::New()),
+  myDevice(VTKViewer_OpenGLRenderer::New()),
+  myInteractor(NULL),
+  myTransform(VTKViewer_Transform::New()),
   myPointPicker(vtkPointPicker::New()),
   myCellPicker(vtkCellPicker::New()),
   myPointAreaPicker(SVTK_AreaPicker::New()),
   myCellAreaPicker(SVTK_AreaPicker::New()),
   myPreHighlightProperty(vtkProperty::New()),
   myHighlightProperty(vtkProperty::New()),
-  myTransform(VTKViewer_Transform::New()),
   myCubeAxes(SVTK_CubeAxesActor2D::New()),
   myTrihedron(SVTK_Trihedron::New()),
   myTrihedronSize(105),
index 358bd649c615bf545fb91d679fae487e91b20e1c..62249484db04bee385c437b690b94a6b28077a7a 100644 (file)
@@ -65,7 +65,7 @@ class SVTK_Selector;
 class SVTK_EXPORT SVTK_Renderer : public vtkObject
 {
  public:
-  vtkTypeMacro(SVTK_Renderer,vtkObject);
+  vtkTypeMacro(SVTK_Renderer,vtkObject)
   static SVTK_Renderer* New();
 
   //----------------------------------------------------------------------------
index 58b8e7d9ab8b8075d2a0344ea4ea1718a3b776e0..dae45cfeb7049afc5636cec84be5c018b0d5845b 100644 (file)
@@ -252,7 +252,7 @@ int
 SVTK_SelectorDef
 ::IObjectCount() const
 {
-  return myIObjects.size();
+  return (int)myIObjects.size(); //!< TODO: conversion from size_t to int
 }
 
 /*!
index 93b0e7dfdd5fe48487bc6775394ae7a533dbb843..a61e90f73f4dae666d3c020b09d6d5479fc3720b 100644 (file)
@@ -59,7 +59,7 @@ class SVTK_EXPORT SVTK_Selector: public vtkObject
 public:
   static SVTK_Selector* New();
   
-  vtkTypeMacro(SVTK_Selector,vtkObject);
+  vtkTypeMacro(SVTK_Selector,vtkObject)
 
   //! To change current Selection_Mode (as outside effect, it invokes selectionChange signal)
   virtual
index fdc5e3362345f79f9ba7491a88e5f53584b6eac6..a0b98d81cc8863224f216ac98796a03e0adb08a7 100644 (file)
@@ -57,9 +57,9 @@ SVTK_SetRotationPointDlg
                          theParent, 
                          theName),
   myMainWindow(theParent),
+  myRWInteractor(theParent->GetInteractor()),
   myPriority(0.0),
-  myEventCallbackCommand(vtkCallbackCommand::New()),
-  myRWInteractor(theParent->GetInteractor())
+  myEventCallbackCommand(vtkCallbackCommand::New())
 {
   setWindowTitle(tr("DLG_TITLE"));
   setSizeGripEnabled(true);
index 9416481c19e1a75cac5ef3dbc38147c2404aeb0b..65a37ea70beb30fc00fce651b51821a8db882279 100644 (file)
@@ -54,7 +54,7 @@ class vtkObject;
 
 class SVTK_EXPORT SVTK_SetRotationPointDlg : public ViewerTools_DialogBase
 {
-  Q_OBJECT;
+  Q_OBJECT
 
 public:
   SVTK_SetRotationPointDlg(QtxAction* theAction,
index af8d14bb4ee93fa472e909233996f70d7f093d1c..54b7069f9a3394a70110c226736a11c650bd5a36 100644 (file)
@@ -109,7 +109,7 @@ int SVTK_SpaceMouseXCB::initialize( xcb_connection_t *connection, xcb_window_t w
 int SVTK_SpaceMouseXCB::setWindow( xcb_connection_t *connection, xcb_window_t window )
 {
   xcb_client_message_event_t xcbEvent;
-  xcb_window_t root_window;
+  xcb_window_t root_window = 0; // todo: initial value (if screen is null, see below)
   xcb_screen_t* screen;
   xcb_generic_error_t* error;
   xcb_void_cookie_t cookie;
index 3a9ee482a441a6951b11d4d690fa23aefc968508..b42382c6c63625156ac4fe2175814d447e129010 100644 (file)
@@ -29,7 +29,7 @@
 #include <vtkActorCollection.h>
 #include <vtkRenderer.h>
 
-vtkStandardNewMacro(SVTK_Trihedron);
+vtkStandardNewMacro(SVTK_Trihedron)
 
 /*!
   Constructor
index 321e00d89e36e126a9c042c9075dfaff72590b7d..24ac59c3602e1603ca58639705719bdecaad4916 100644 (file)
@@ -35,7 +35,7 @@ protected:
   void operator = (const SVTK_Trihedron&); // Not implemented
 
 public:
-  vtkTypeMacro(SVTK_Trihedron,VTKViewer_Trihedron);
+  vtkTypeMacro(SVTK_Trihedron,VTKViewer_Trihedron)
   static SVTK_Trihedron *New();
   
   virtual int GetVisibleActorCount(vtkRenderer* theRenderer);
index ca457cffe33ba476c99c15c488cc6033f6ef9b05..6dd3ba73e0707264ba3224a2895eea832025a298 100644 (file)
@@ -168,10 +168,10 @@ SVTK_UpdateRateDlg
   ViewerTools_DialogBase(theAction,
                          theParent, 
                          theName),
-  myPriority(0.0),
-  myEventCallbackCommand(vtkCallbackCommand::New()),
   myRWInteractor(theParent->GetInteractor()),
-  myAction(theAction)
+  myAction(theAction),
+  myPriority(0.0),
+  myEventCallbackCommand(vtkCallbackCommand::New())
 {
   vtkRenderWindowInteractor* aRWI = myRWInteractor->GetDevice();
   bool anIsEnabledUpdateRate = false;
index 961d5a627420373d937bba65cbbb6244176a2d91..a9c09a6b744c68ac56e3b081b825323af766ae74 100644 (file)
@@ -46,7 +46,7 @@ class vtkObject;
 
 class SVTK_UpdateRateDlg : public ViewerTools_DialogBase
 {
-  Q_OBJECT;
+  Q_OBJECT
 
 public:
   SVTK_UpdateRateDlg(QtxAction* theAction,
index 6e597e0437cc3c49b5ef8a580b4d4a02cfc5a5d5..c844bfc6a777217488e5be4883ec5a633864d82b 100644 (file)
@@ -201,7 +201,7 @@ void
 SVTK_View
 ::highlight( const Handle(SALOME_InteractiveObject)& theIO, 
              bool theIsHighlight, 
-             bool theIsUpdate ) 
+             bool /*theIsUpdate*/ ) 
 {
   using namespace SVTK;
   VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors());
index 16dd58a9b003c369673948d31bef5cd51cb0867c..6dc0c8010fc645973f274880a0b01dc49ee787a7 100644 (file)
@@ -60,7 +60,7 @@ class QColor;
  */
 class SVTK_EXPORT SVTK_SignalHandler : public QObject
 {
-  Q_OBJECT;
+  Q_OBJECT
 
 public:
   SVTK_SignalHandler(SVTK_ViewWindow* theMainWindow);
@@ -117,7 +117,7 @@ public:
  */
 class SVTK_EXPORT SVTK_View : public SVTK_SignalHandler
 {
-  Q_OBJECT;
+  Q_OBJECT
 
 public:
   SVTK_View(SVTK_ViewWindow* theMainWindow);
index 0e062d85cc720f4246702bd8d353aa4d3662d890..a91655bdeaf340df17b748b1ed53c4c7a4fa3c41 100644 (file)
@@ -219,7 +219,7 @@ void SVTK_Viewer::setTrihedronSize( const double theSize, const bool theRelative
 
   if (SUIT_ViewManager* aViewManager = getViewManager()) {
     QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
-    for ( uint i = 0; i < aViews.count(); i++ )
+    for ( int i = 0; i < aViews.count(); i++ )
     {
       if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
               aView->SetTrihedronSize( theSize, theRelative );
@@ -245,7 +245,7 @@ void SVTK_Viewer::setStaticTrihedronVisible( const bool theIsVisible )
 
   if (SUIT_ViewManager* aViewManager = getViewManager()) {
     QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
-    for ( uint i = 0; i < aViews.count(); i++ )
+    for ( int i = 0; i < aViews.count(); i++ )
     {
       if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
         aView->SetStaticTrihedronVisible( theIsVisible );
@@ -273,7 +273,7 @@ void SVTK_Viewer::setProjectionMode( const int theMode )
       myProjMode = theMode;
     if (SUIT_ViewManager* aViewManager = getViewManager()) {
       QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
-      for ( uint i = 0; i < aViews.count(); i++ )
+      for ( int i = 0; i < aViews.count(); i++ )
       {
         if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
           aView->SetProjectionMode( theMode );
@@ -301,7 +301,7 @@ void SVTK_Viewer::setStereoType( const int theType )
 
     if (SUIT_ViewManager* aViewManager = getViewManager()) {
       QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
-      for ( uint i = 0; i < aViews.count(); i++ )
+      for ( int i = 0; i < aViews.count(); i++ )
       {
         if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
           aView->SetStereoType( theType );
@@ -329,7 +329,7 @@ void SVTK_Viewer::setAnaglyphFilter( const int theFilter )
 
     if (SUIT_ViewManager* aViewManager = getViewManager()) {
       QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
-      for ( uint i = 0; i < aViews.count(); i++ )
+      for ( int i = 0; i < aViews.count(); i++ )
       {
         if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
           aView->SetAnaglyphFilter( theFilter );
@@ -357,7 +357,7 @@ void SVTK_Viewer::setQuadBufferSupport( const bool theEnable )
 
     if (SUIT_ViewManager* aViewManager = getViewManager()) {
       QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
-      for ( uint i = 0; i < aViews.count(); i++ )
+      for ( int i = 0; i < aViews.count(); i++ )
       {
         if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
           aView->SetQuadBufferSupport( theEnable );
@@ -383,7 +383,7 @@ void SVTK_Viewer::setInteractionStyle( const int theStyle )
   
   if (SUIT_ViewManager* aViewManager = getViewManager()) {
     QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
-    for ( uint i = 0; i < aViews.count(); i++ )
+    for ( int i = 0; i < aViews.count(); i++ )
     {
       if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
         aView->SetInteractionStyle( theStyle );
@@ -409,7 +409,7 @@ void SVTK_Viewer::setZoomingStyle( const int theStyle )
   
   if (SUIT_ViewManager* aViewManager = getViewManager()) {
     QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
-    for ( uint i = 0; i < aViews.count(); i++ )
+    for ( int i = 0; i < aViews.count(); i++ )
     {
       if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
         aView->SetZoomingStyle( theStyle );
@@ -435,7 +435,7 @@ void SVTK_Viewer::setPreSelectionMode( Preselection_Mode theMode )
   
   if (SUIT_ViewManager* aViewManager = getViewManager()) {
     QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
-    for ( uint i = 0; i < aViews.count(); i++ )
+    for ( int i = 0; i < aViews.count(); i++ )
     {
       if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
         aView->SetPreSelectionMode( theMode );
@@ -471,7 +471,7 @@ void SVTK_Viewer::setIncrementalSpeed( const int theValue, const int theMode )
 
   if (SUIT_ViewManager* aViewManager = getViewManager()) {
     QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
-    for ( uint i = 0; i < aViews.count(); i++ )
+    for ( int i = 0; i < aViews.count(); i++ )
     {
       if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
         aView->SetIncrementalSpeed( theValue, theMode );
@@ -502,7 +502,7 @@ void SVTK_Viewer::setSpacemouseButtons( const int theBtn1, const int theBtn2, co
 
   if (SUIT_ViewManager* aViewManager = getViewManager()) {
     QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
-    for ( uint i = 0; i < aViews.count(); i++ )
+    for ( int i = 0; i < aViews.count(); i++ )
     {
       if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
         aView->SetSpacemouseButtons( theBtn1, theBtn2, theBtn3 );
@@ -557,19 +557,19 @@ void SVTK_Viewer::contextMenuPopup( QMenu* thePopup )
 /*!
   SLOT: called on mouse button press, empty implementation
 */
-void SVTK_Viewer::onMousePress(SUIT_ViewWindow* vw, QMouseEvent* event)
+void SVTK_Viewer::onMousePress(SUIT_ViewWindow* /*vw*/, QMouseEvent* /*event*/)
 {}
 
 /*!
   SLOT: called on mouse move, empty implementation
 */
-void SVTK_Viewer::onMouseMove(SUIT_ViewWindow* vw, QMouseEvent* event)
+void SVTK_Viewer::onMouseMove(SUIT_ViewWindow* /*vw*/, QMouseEvent* /*event*/)
 {}
 
 /*!
   SLOT: called on mouse button release, empty implementation
 */
-void SVTK_Viewer::onMouseRelease(SUIT_ViewWindow* vw, QMouseEvent* event)
+void SVTK_Viewer::onMouseRelease(SUIT_ViewWindow* /*vw*/, QMouseEvent* /*event*/)
 {}
 
 /*!
@@ -583,7 +583,7 @@ void SVTK_Viewer::enableSelection(bool isEnabled)
    
   if (SUIT_ViewManager* aViewManager = getViewManager()) {
     QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
-    for ( uint i = 0; i < aViews.count(); i++ )
+    for ( int i = 0; i < aViews.count(); i++ )
     {
       if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
         aView->SetSelectionEnabled( isEnabled );
index c47219786d97469b194960ee8b0ce142bb7514f5..bc7b2c9fcc10a2ce34bb756d1a26f841b846e470 100644 (file)
@@ -44,7 +44,7 @@ class VTKViewer_Actor;
 //! Extends two interfaces #SVTK_ViewModelBase and #SALOME_View 
 class SVTK_EXPORT SVTK_Viewer : public SVTK_ViewModelBase, public SALOME_View 
 {
-  Q_OBJECT;
+  Q_OBJECT
 
 public:
   /*! supported gradient types */
index 4a82304cd4733be711501e01ffcaa577305a77cb..a1735e4fa14b659e50d7e9e19864af1d80dded4e 100644 (file)
@@ -32,7 +32,7 @@
 //! To define minimal interface for #SVTK_ViewWindow initialization
 class SVTK_EXPORT SVTK_ViewModelBase: public SUIT_ViewModel
 {
-  Q_OBJECT;
+  Q_OBJECT
 
 public slots:
   //! To invoke Qt #selectionChanged signal
index b27def000315569ce8278947cde87ab9e9e3242e..73ff26cfa906d9cc7e99e6440daad8f61d8a7fe7 100644 (file)
@@ -54,9 +54,9 @@ SVTK_ViewParameterDlg::SVTK_ViewParameterDlg(QtxAction* theAction,
                                              const char* theName):
   ViewerTools_DialogBase(theAction, theParent, theName),
   myMainWindow(theParent),
+  myRWInteractor(theParent->GetInteractor()),
   myPriority(0.0),
-  myEventCallbackCommand(vtkCallbackCommand::New()),
-  myRWInteractor(theParent->GetInteractor())
+  myEventCallbackCommand(vtkCallbackCommand::New())
 {
   setWindowTitle(tr("DLG_TITLE"));
   setSizeGripEnabled(true);
@@ -494,7 +494,7 @@ void SVTK_ViewParameterDlg::setEnabled(QFrame* theWidget, const bool theState)
   
 }
 
-void SVTK_ViewParameterDlg::onProjectionModeChanged(int mode)
+void SVTK_ViewParameterDlg::onProjectionModeChanged(int /*mode*/)
 {
   int aBtn = myProjectionMode->checkedId();
 
@@ -516,7 +516,7 @@ void SVTK_ViewParameterDlg::onProjectionModeChanged(int mode)
   }
 }
 
-void SVTK_ViewParameterDlg::onPositionModeChanged(int mode)
+void SVTK_ViewParameterDlg::onPositionModeChanged(int /*mode*/)
 {
   setEnabled(myCameraCoords, myCameraPositionMode->checkedId() == 0);
 }
index 29d10ac083d531a1289f61d91d0a53e8ec7f5f39..54d47c0a7f77052fafe49c56b1c54c31fb7f5cdd 100644 (file)
@@ -47,7 +47,7 @@ class vtkObject;
 
 class SVTK_EXPORT SVTK_ViewParameterDlg : public ViewerTools_DialogBase
 {
-  Q_OBJECT;
+  Q_OBJECT
 
 public:
   SVTK_ViewParameterDlg(QtxAction* theAction,
index 2c6aaecce4597d5ea442d9ca81912b12c0ce269e..2181cbefdc2612aa0fe407e73bb894c5ecf06129 100644 (file)
@@ -138,9 +138,9 @@ namespace SVTK
 SVTK_ViewWindow::SVTK_ViewWindow(SUIT_Desktop* theDesktop):
   SUIT_ViewWindow(theDesktop),
   myView(NULL),
-  myDumpImage(QImage()),
   myKeyFreeInteractorStyle(SVTK_KeyFreeInteractorStyle::New()),
-  myEventCallbackCommand(vtkCallbackCommand::New())
+  myEventCallbackCommand(vtkCallbackCommand::New()),
+  myDumpImage(QImage())
 {
   setWindowFlags( windowFlags() & ~Qt::Window );
   // specific of vtkSmartPointer
@@ -1233,7 +1233,7 @@ void SVTK_ViewWindow::SetTrihedronSize(const double theSize, const bool theRelat
 /*! If parameter theIsForcedUpdate is true, recalculate parameters for
  *  trihedron and cube axes, even if trihedron and cube axes is invisible.
  */
-void SVTK_ViewWindow::AdjustTrihedrons(const bool theIsForcedUpdate)
+void SVTK_ViewWindow::AdjustTrihedrons(const bool /*theIsForcedUpdate*/)
 {
   GetRenderer()->AdjustActors();
   Repaint();
@@ -1890,7 +1890,7 @@ void SVTK_ViewWindow::setVisualParameters( const QString& parameters )
 void SVTK_ViewWindow::doSetVisualParameters( const QString& parameters, bool baseParamsOnly )
 {
 
-  double pos[3], focalPnt[3], viewUp[3], parScale, scale[3];
+  double pos[3], focalPnt[3], viewUp[3], parScale = 1.0, scale[3];
 
   QXmlStreamReader aReader(parameters);
   SVTK_CubeAxesActor2D* gradAxesActor = GetCubeAxes();
@@ -2733,9 +2733,9 @@ void SVTK_ViewWindow::emitTransformed() {
   Processes events
 */
 void SVTK_ViewWindow::ProcessEvents(vtkObject* vtkNotUsed(theObject),
-                                    unsigned long theEvent,
+                                    unsigned long /*theEvent*/,
                                     void* theClientData,
-                                    void* theCallData)
+                                    void* /*theCallData*/)
 {
   SVTK_ViewWindow* self = reinterpret_cast<SVTK_ViewWindow*>(theClientData);
   if(self)
index 0ab5d79204351fd0661ddeb782b8d2dd13f2a2ac..5ca8ee9f72bee74c31adcbca94a9b6985edc90a8 100644 (file)
@@ -84,7 +84,7 @@ namespace SVTK
 //! Define a container for SALOME VTK view window
 class SVTK_EXPORT SVTK_ViewWindow : public SUIT_ViewWindow
 {
-  Q_OBJECT;
+  Q_OBJECT
 
  public:
   //! To construct #SVTK_ViewWindow instance
index 6f11e2bb068b1f3d5ae506ca5141b17c21182b9f..fcc7992867d8a1f963f2f1a0286ca2556b924d5a 100644 (file)
@@ -59,10 +59,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 namespace salomevtk
 {
 
-vtkStandardNewMacro(vtkPVAxesActor);
+vtkStandardNewMacro(vtkPVAxesActor)
 
-vtkCxxSetObjectMacro( vtkPVAxesActor, UserDefinedTip, vtkPolyData );
-vtkCxxSetObjectMacro( vtkPVAxesActor, UserDefinedShaft, vtkPolyData );
+vtkCxxSetObjectMacro( vtkPVAxesActor, UserDefinedTip, vtkPolyData )
+vtkCxxSetObjectMacro( vtkPVAxesActor, UserDefinedShaft, vtkPolyData )
 
 //-----------------------------------------------------------------------------
 vtkPVAxesActor::vtkPVAxesActor()
index 9cfd4a8d05b49b8bb14e062b585867ddba4b18fd..97c92ad082e2f85e3e4d2521ba9be3ba14d1622a 100644 (file)
@@ -69,7 +69,7 @@ class SVTK_EXPORT vtkPVAxesActor : public vtkProp3D
 {
 public:
   static vtkPVAxesActor *New();
-  vtkTypeMacro(vtkPVAxesActor,vtkProp3D);
+  vtkTypeMacro(vtkPVAxesActor,vtkProp3D)
   void PrintSelf(ostream& os, vtkIndent indent);
 
 
index c73d4730b83cc60cd22e77decf9b0c7d08a475e8..985a637b9cf2f06b81ba10cc81f6543cd0f5c81f 100644 (file)
@@ -54,10 +54,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 namespace salomevtk
 {
 
-vtkStandardNewMacro(vtkPVAxesWidget);
+vtkStandardNewMacro(vtkPVAxesWidget)
 
-vtkCxxSetObjectMacro(vtkPVAxesWidget, AxesActor, vtkPVAxesActor);
-vtkCxxSetObjectMacro(vtkPVAxesWidget, ParentRenderer, vtkRenderer);
+vtkCxxSetObjectMacro(vtkPVAxesWidget, AxesActor, vtkPVAxesActor)
+vtkCxxSetObjectMacro(vtkPVAxesWidget, ParentRenderer, vtkRenderer)
 
 //----------------------------------------------------------------------------
 class vtkPVAxesWidgetObserver : public vtkCommand
index bb68fa5d969ce15d27f771d0106d29a1314f0f0d..412110ff63cd606e8018c92ad1a88ae04a00cbd1 100644 (file)
@@ -60,7 +60,7 @@ class SVTK_EXPORT vtkPVAxesWidget : public vtkInteractorObserver
 {
 public:
   static vtkPVAxesWidget* New();
-  vtkTypeMacro(vtkPVAxesWidget, vtkInteractorObserver);
+  vtkTypeMacro(vtkPVAxesWidget, vtkInteractorObserver)
   void PrintSelf(ostream& os, vtkIndent indent);
 
   // Description:
index 7204f3f740f73868f2f35b0936aa5dfae8d60781..b5a6c6a546e65cf563a09873646b7caaed8fb4a9 100644 (file)
@@ -1190,7 +1190,7 @@ void SalomeApp_Application::updateDesktopTitle() {
   desktop()->setWindowTitle( aTitle );
 }
 
-int SalomeApp_Application::closeChoice( const QString& docName )
+int SalomeApp_Application::closeChoice( const QString& /*docName*/ )
 {
   QStringList buttons;
   QMap<int, int> choices;
@@ -1233,6 +1233,7 @@ bool SalomeApp_Application::closeAction( const int choice, bool& closePermanentl
       onSaveDoc();
     else if ( !onSaveAsDoc() )
       res = false;
+    // fall through!
   case CloseDisconnect:
     closeActiveDoc( false );
     closePermanently = false;
@@ -1281,9 +1282,8 @@ bool SalomeApp_Application::openAction( const int aChoice, const QString& aName
   switch ( choice )
   {
   case OpenRefresh:
-    {
-      choice = OpenNew;
-    }
+    choice = OpenNew;
+    // fall through!
   default:
     res = LightApp_Application::openAction( choice, aName );
     break;
@@ -1898,7 +1898,7 @@ bool SalomeApp_Application::renameAllowed( const QString& entry) const
   \param name new name of the object
   \brief Return \c true if rename operation finished successfully, \c false otherwise.
 */
-bool SalomeApp_Application::renameObject( const QString& entry, const QString& name )
+bool SalomeApp_Application::renameObject( const QString& /*entry*/, const QString& name )
 {
   SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( activeStudy() );
 
index 593a7e5582ff19915660e2c78a6de473566226ff..e9b0f05e52f556d5c04c9d0b37003a27fbafc364 100644 (file)
@@ -236,7 +236,7 @@ suitPtr SalomeApp_DataModelSync::parent( const suitPtr& p ) const
   Updates SUIT object
   \param p - SUIT object
 */
-void SalomeApp_DataModelSync::updateItem( const kerPtr& obj, const suitPtr& ) const
+void SalomeApp_DataModelSync::updateItem( const kerPtr&, const suitPtr& ) const
 {
 }
 
index bd480a8cae525a8eec94840ef13e91632b114af1..b606e3a2145f21f2cee8b6faac34aa8c5e6d79b1 100644 (file)
@@ -150,14 +150,10 @@ QString SalomeApp_DataObject::text( const int id ) const
   switch ( id )
   {
   case ValueId:
-#ifndef WIN32
-    if ( componentObject() != this )
-#else
     if ( componentObject() != (SUIT_DataObject*)this )
-#endif
       txt = value( object() );
-      if ( txt.isEmpty() )
-        txt = value( referencedObject() );
+    if ( txt.isEmpty() )
+      txt = value( referencedObject() );
     break;
   case IORId:
     txt = ior( referencedObject() );
index 68fd9dc5995fd6f38c43946387ebc6c36aa02cc7..4f5a82f0004e52a230a6ed45935e1cd96aeee314 100644 (file)
@@ -64,7 +64,7 @@ SalomeApp_Engine_i::~SalomeApp_Engine_i()
 }
 
 SALOMEDS::TMPFile* SalomeApp_Engine_i::Save (SALOMEDS::SComponent_ptr theComponent,
-                                             const char* theURL,
+                                             const char* /*theURL*/,
                                              bool isMultiFile)
 {
   SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile;
@@ -136,7 +136,7 @@ SALOMEDS::TMPFile* SalomeApp_Engine_i::Save (SALOMEDS::SComponent_ptr theCompone
   // listOfFiles must contain temporary directory name in its first item
   // and names of files (relatively the temporary directory) in the others
   ListOfFiles listOfFiles = GetListOfFiles( 0 ); // 0 means persistence file
-  const int n = listOfFiles.size() - 1;
+  const int n = (int)listOfFiles.size() - 1; //!< TODO: conversion from size_t to int
   
   if (n > 0) { // there are some files, containing persistent data of the component
     std::string aTmpDir = listOfFiles[0];
@@ -187,7 +187,7 @@ CORBA::Boolean SalomeApp_Engine_i::Load (SALOMEDS::SComponent_ptr theComponent,
     SALOMEDS_Tool::PutStreamToFiles(theFile, aTmpDir.c_str(), isMultiFile);
 
   // Store list of file names to be used by the component loading procedure
-  const int n = aSeq.size() + 1;
+  const int n = (int)aSeq.size() + 1; //!< TODO: conversion from size_t to int
   ListOfFiles listOfFiles (n);
   listOfFiles[0] = aTmpDir;
   for (int i = 1; i < n; i++)
@@ -212,9 +212,9 @@ void SalomeApp_Engine_i::SetListOfFiles (int type, const ListOfFiles& theListOfF
 /*! 
  *  DumpPython implementation for light modules
  */
-Engines::TMPFile* SalomeApp_Engine_i::DumpPython(CORBA::Boolean isPublished,
-                                                                        CORBA::Boolean isMultiFile,
-                                                                        CORBA::Boolean& isValidScript)
+Engines::TMPFile* SalomeApp_Engine_i::DumpPython(CORBA::Boolean /*isPublished*/,
+                                                 CORBA::Boolean /*isMultiFile*/,
+                                                 CORBA::Boolean& isValidScript)
 {
   MESSAGE("SalomeApp_Engine_i::DumpPython(): myComponentName = "<<
          qPrintable( myComponentName ) << ", this = " << this);
index fa1c1fef049bb2b4fa33ec05260ac0a3290e2142..2b4137a524f7f5fb1409b5d21fa9e504b898328b 100644 (file)
@@ -85,7 +85,7 @@ public:
   char* IORToLocalPersistentID( SALOMEDS::SObject_ptr, const char*, CORBA::Boolean,  CORBA::Boolean )                                                {return 0;}
   char* LocalPersistentIDToIOR( SALOMEDS::SObject_ptr, const char*, CORBA::Boolean,  CORBA::Boolean )                                                {return 0;}
   bool CanPublishInStudy( CORBA::Object_ptr )                                                                                                        {return 0;}
-  SALOMEDS::SObject_ptr PublishInStudy( SALOMEDS::SObject_ptr, CORBA::Object_ptr, const char* ) throw (SALOME::SALOME_Exception)                     {return 0;}
+  SALOMEDS::SObject_ptr PublishInStudy( SALOMEDS::SObject_ptr, CORBA::Object_ptr, const char* )                                                             {return 0;}
   CORBA::Boolean CanCopy( SALOMEDS::SObject_ptr )                                                                                                    {return 0;}
   SALOMEDS::TMPFile* CopyFrom( SALOMEDS::SObject_ptr, CORBA::Long& )                                                                                 {return 0;}
   CORBA::Boolean CanPaste( const char*, CORBA::Long )                                                                                                {return 0;}
index e55787d0c243d08935a62e2fd8377cb1a8e583e3..62bc4aa4097aa138a7c5a4aa84c6370743ddf641 100644 (file)
@@ -980,7 +980,7 @@ void SalomeApp_ComboBox::insertItem(const QString& theValue,
 */
 void SalomeApp_ComboBox::insertList(const QStringList& theList)
 {
-  for (unsigned i = 0; i < theList.count(); i++)
+  for (int i = 0; i < theList.count(); i++)
     insertItem(theList[i]);
 }
 
@@ -1243,7 +1243,7 @@ void SalomeApp_EntityEdit::insertList(const TColStd_ListOfInteger& theList,
 
   TColStd_ListIteratorOfListOfInteger aIter(theList);
   for (unsigned i = 0; aIter.More(); aIter.Next(), i++) {
-    if (theCurrent == i) {
+    if (theCurrent == (int)i) { //!< TODO: mismatch signed/unsigned
       setText(QString::number(aIter.Value()));
       break;
     }
@@ -1274,7 +1274,7 @@ void SalomeApp_EntityEdit::insertList(const TColStd_ListOfReal& theList,
 
   TColStd_ListIteratorOfListOfReal aIter(theList);
   for (unsigned i = 0; aIter.More(); aIter.Next(), i++) {
-    if (theCurrent == i) {
+    if (theCurrent == (int)i) { //!< TODO: mismatch signed/unsigned
       setText(QString::number(aIter.Value()));
       break;
     }
index 5d662a0043d94f8e7d5b61886ff5c8d3042611c2..e6fe76ca712d95ce1d2e3a868ac25cb976ed1dcb 100644 (file)
@@ -135,7 +135,7 @@ void SalomeApp_Module::extractContainers( const SALOME_ListIO& source, SALOME_Li
  * This method is called just before the study document is saved, so the module has a possibility
  * to store visual parameters in AttributeParameter attribut
  */
-void SalomeApp_Module::storeVisualParameters(int savePoint)
+void SalomeApp_Module::storeVisualParameters(int /*savePoint*/)
 {
 }
 
@@ -145,6 +145,6 @@ void SalomeApp_Module::storeVisualParameters(int savePoint)
  * This method is called after the study document is opened, so the module has a possibility to restore
  * visual parameters
  */
-void SalomeApp_Module::restoreVisualParameters(int savePoint)
+void SalomeApp_Module::restoreVisualParameters(int /*savePoint*/)
 {
 }
index 3e9f640c6005bcf2f251592bd08ec098c64c0b38..a3d7c0bea78b8d3adcb7cc63cdc7c6f7231fa4cf 100644 (file)
@@ -71,8 +71,8 @@
 //============================================================================
 NoteBook_TableRow::NoteBook_TableRow(int index, NoteBook_Table* parentTable, QWidget* parent):
   QWidget(parent),
-  myParentTable(parentTable),
   myIndex(index),
+  myParentTable(parentTable),
   myRowHeader(new QTableWidgetItem()),
   myVariableName(new QTableWidgetItem()),
   myVariableValue(new QTableWidgetItem())
@@ -274,7 +274,7 @@ bool NoteBook_TableRow::IsIntegerValue(const QString theValue, int* theResult)
  *             The whole notebook is verified on apply
  */
 //============================================================================
-bool NoteBook_TableRow::IsValidStringValue(const QString theValue)
+bool NoteBook_TableRow::IsValidStringValue(const QString /*theValue*/)
 {
   int aNumRows = myParentTable->myRows.count();
   if( aNumRows == 0 )
@@ -404,7 +404,7 @@ void NoteBook_Table::Init()
 
   //Add all variables into the table
   std::vector<std::string> aVariables = SalomeApp_Application::getStudy()->GetVariableNames();
-  for(int iVar = 0; iVar < aVariables.size(); iVar++ ) {
+  for(int iVar = 0; iVar < (int)aVariables.size(); iVar++ ) {
     AddRow(QString(aVariables[iVar].c_str()),
            Variable2String(aVariables[iVar]));
   }
@@ -816,7 +816,7 @@ void SalomeApp_NoteBook::Init(){
  *  Purpose  : [slot]
  */
 //============================================================================
-void SalomeApp_NoteBook::onVarUpdate(QString theVarName)
+void SalomeApp_NoteBook::onVarUpdate(QString /*theVarName*/)
 {
   myTable->Init();
 }
index afcd557511f34fb6a960d0a038def7193e3f2320..6658ae0259f171cb4e87e9b8b24622515bcb277a 100644 (file)
@@ -113,7 +113,7 @@ class SALOMEAPP_EXPORT NoteBook_Table : public QTableWidget
   bool IsUniqueName(const NoteBook_TableRow* theRow) const;
   QList<NoteBook_TableRow*> GetRows() const;
 
-  const bool         IsModified() const { return myIsModified; }
+  bool IsModified() const { return myIsModified; }
   const QList<int>&  GetRemovedRows() const { return myRemovedRows; }
   const VariableMap& GetVariableMap() const { return myVariableMap; }
   const VariableMap& GetVariableMapRef() const { return myVariableMapRef; }
index 39bf6bf0315bb354caa16e437daf2478aab88a6c..c680652323e8e61e629fc0da38948e23930b00cc 100644 (file)
@@ -211,7 +211,7 @@ public:
             return;
           }
 
-          int last2Pnt_pos = theID.rfind( ":" );
+          int last2Pnt_pos = (int)theID.rfind( ":" ); //!< TODO: conversion from size_t to int
           std::string parent_id = theID.substr( 0, last2Pnt_pos );
           int tag = atoi( theID.substr( last2Pnt_pos+1 ).c_str() );
 
@@ -365,7 +365,7 @@ private:
         // parse the children
         o = o->firstChild();
       }
-      else if ( o->nextBrother() > 0 ) {
+      else if ( o->nextBrother() ) {
         o = o->nextBrother();
       }
       else {
@@ -724,7 +724,7 @@ bool SalomeApp_Study::dump( const QString& theFileName,
                             bool isMultiFile,
                             bool toSaveGUI )
 {
-  int savePoint;
+  int savePoint = 0;
   _PTR(AttributeParameter) ap;
   _PTR(IParameters) ip = ClientFactory::getIParameters(ap);
 
@@ -842,7 +842,7 @@ void SalomeApp_Study::openModuleData( QString theModuleName, int type, QStringLi
 {
   std::vector<std::string> aListOfFiles = GetListOfFiles( theModuleName.toStdString().c_str(), type );
 
-  int i, aLength = aListOfFiles.size() - 1;
+  int i, aLength = (int)aListOfFiles.size() - 1; //!< TODO: conversion from size_t to int
   if ( aLength < 0 )
     return;
 
@@ -857,7 +857,7 @@ void SalomeApp_Study::openModuleData( QString theModuleName, int type, QStringLi
   Re-implemented from LightApp_Study, actually does not save anything but
   simply cleans up light modules' data
 */
-bool SalomeApp_Study::saveStudyData( const QString& theFileName, int type )
+bool SalomeApp_Study::saveStudyData( const QString& /*theFileName*/, int type )
 {
   ModelList list; dataModels( list );
   QListIterator<CAM_DataModel*> it( list );
@@ -1108,7 +1108,7 @@ void SalomeApp_Study::RemoveTemporaryFiles ( const char* theModuleName, bool isM
   if (aListOfFiles.size() > 0) {
     std::string aTmpDir = aListOfFiles[0];
 
-    const int n = aListOfFiles.size() - 1;
+    const int n = (int)aListOfFiles.size() - 1; //!< TODO: conversion from size_t to int
     std::vector<std::string> aSeq;
     aSeq.reserve(n);
     for (int i = 0; i < n; i++)
@@ -1157,7 +1157,7 @@ void SalomeApp_Study::deleteReferencesTo( _PTR( SObject ) obj )
 {
   _PTR(StudyBuilder) sb = studyDS()->NewBuilder();
   std::vector<_PTR(SObject)> aRefs = studyDS()->FindDependances( obj );
-  for( int i=0, n=aRefs.size(); i<n; i++ )
+  for( size_t i=0, n=aRefs.size(); i<n; i++ )
   {
     _PTR( SObject ) o = aRefs[i];
     if( o->GetFatherComponent()->ComponentDataType()==obj->GetFatherComponent()->ComponentDataType() )
index a83658d8a2683b917b4d069ab8c2b363cf50d0cb..b355724e570b33397be831003a1b66799d3d352a 100644 (file)
@@ -226,7 +226,7 @@ void SalomeApp_StudyPropertiesDlg::initData()
     std::vector<int>  aMins, aHours, aDays, aMonths, aYears;
     propAttr->GetModificationsList(aUsers, aMins, aHours, aDays, aMonths, aYears, false);
     int aCnt = aUsers.size();
-    for ( int i = 0; i < aCnt; i++ ) {
+    for ( int i = 0; i < (int)aCnt; i++ ) {
       QString date;
       date.sprintf("%2.2d/%2.2d/%2d %2.2d:%2.2d",
                   aDays  [i],
@@ -243,7 +243,7 @@ void SalomeApp_StudyPropertiesDlg::initData()
   
     //Component versions
     std::vector<std::string> aComponents = propAttr->GetStoredComponents();
-    for ( int i = 0; i < aComponents.size(); i++ ) {
+    for ( int i = 0; i < (int)aComponents.size(); i++ ) {
       std::vector<int>  aMins, aHours, aDays, aMonths, aYears;
       std::vector<std::string> aVersions = propAttr->GetComponentVersions(aComponents[i]);
       QStringList aData;
index c4ef112e917de23429608e80bb75b7b65651c8c1..1bd77cf9420685264a5aede8a539f561496a6fb2 100644 (file)
@@ -275,7 +275,7 @@ void SalomeApp_VisualState::restoreState(int savePoint)
 
   // restore modules' visual parameters
   std::vector<std::string> v = ip->getValues( "AP_MODULES_LIST" );
-  for ( int i = 0; i < v.size(); i++ )
+  for ( int i = 0; i < (int)v.size(); i++ )
   {
     myApp->activateModule( v[i].c_str() );
     if ( SalomeApp_Module* module = dynamic_cast<SalomeApp_Module*>( myApp->activeModule() ) )
index 7ab837c81e605efa4fce0b99c9299e9fd0af9d7f..0bf8344fd95fa9e9633920dfd8e160f921ff9781 100644 (file)
@@ -108,8 +108,9 @@ namespace
   {
   public:
     MsgHandler() {}
-    void qtMessage( QtMsgType type, const QMessageLogContext& context, const QString& message )
+    void qtMessage( QtMsgType type, const QMessageLogContext& /*context*/, const QString& message )
     {
+      (void)message; // unused in debug mode
       switch ( type )
       {
       case QtDebugMsg:
@@ -181,7 +182,7 @@ namespace
     }
 
   protected:
-    QString userFileName( const QString& appName, const bool forLoad ) const
+    QString userFileName( const QString& /*appName*/, const bool forLoad ) const
     {
       if ( version().isEmpty() ) return ""; 
       return SUIT_ResourceMgr::userFileName( myCustomAppName, forLoad );
index 5304bfaa7e673cbb3665d0cf08dbcdd86099d513..0d042a0422e1cf676094c22d4031b101cc6f5a97 100644 (file)
@@ -206,8 +206,7 @@ void Session_ServerThread::ActivateModuleCatalog(int argc,
   }
 }
 
-void Session_ServerThread::ActivateSALOMEDS(int argc,
-                                            char ** argv)
+void Session_ServerThread::ActivateSALOMEDS(int /*argc*/, char** /*argv*/)
 {
   try {
     MESSAGE("SALOMEDS thread started");
@@ -293,8 +292,7 @@ void Session_ServerThread::ActivateRegistry(int argc,
   }
 }
 
-void Session_ServerThread::ActivateContainerManager(int argc,
-                                             char ** argv)
+void Session_ServerThread::ActivateContainerManager(int /*argc*/, char** /*argv*/)
 {
   try {
     PortableServer::POA_var root_poa=PortableServer::POA::_the_root_poa();
@@ -318,8 +316,7 @@ void Session_ServerThread::ActivateContainerManager(int argc,
   }
 }
 
-void Session_ServerThread::ActivateContainer(int argc,
-                                             char ** argv)
+void Session_ServerThread::ActivateContainer(int argc, char** argv)
 {
   try {
     MESSAGE("Container thread started");
@@ -372,7 +369,7 @@ void Session_ServerThread::ActivateContainer(int argc,
       containerName = argv[1];
     }
     
-    _container = new Engines_Container_i(_orb, _root_poa, containerName , argc , argv , true , false);
+    _container = new Engines_Container_i(_orb, _root_poa, containerName, argc, argv, true, false);
   }
   catch(CORBA::SystemException&) {
     INFOS("Caught CORBA::SystemException.");
@@ -391,8 +388,7 @@ void Session_ServerThread::ActivateContainer(int argc,
   }
 }
 
-void Session_ServerThread::ActivateSession(int argc,
-                                           char ** argv)
+void Session_ServerThread::ActivateSession(int /*argc*/, char** /*argv*/)
 {
   MESSAGE("Session_ServerThread::ActivateSession() not implemented!");
 }
index f7eb45ed60c50bedc7160f8a885780e3117e02ca..2cb7cacf6d9664b7d34804cca7d1b17a4ef073f1 100644 (file)
@@ -349,16 +349,16 @@ void SALOME_Session_i::deleteContainersinNS()
 // destroy of all containers and modules
   _NS->Change_Directory("/Containers");
   std::vector<std::string> machines = _NS->list_subdirs();
-  for(int i=0;i<machines.size();i++){
+  for(int i=0;i<(int)machines.size();i++){
     _NS->Change_Directory(machines[i].c_str());
     std::vector<std::string> toto = _NS->list_directory();
-    for(int j=0;j<toto.size();j++)
+    for(int j=0;j<(int)toto.size();j++)
       _NS->Destroy_Name(toto[j].c_str());
     std::vector<std::string> containers = _NS->list_subdirs();
-    for(int j=0;j<containers.size();j++){
+    for(int j=0;j<(int)containers.size();j++){
       _NS->Change_Directory(containers[j].c_str());
       std::vector<std::string> modules = _NS->list_directory();
-      for(int k=0;k<modules.size();k++)
+      for(int k=0;k<(int)modules.size();k++)
         _NS->Destroy_Name(modules[k].c_str());
       _NS->Change_Directory("/Containers");
       _NS->Change_Directory(machines[i].c_str());
index d5f9c2f4dbeb2e198b9a3cbbe7d5ad720e564d50..cb2e4930b06263b0ef63490ec967595ae74f1f03 100644 (file)
 #define DELTA_SLIDER    3
 
 static const char* const hole_xpm[] = {
-"3 3 3 1",
-". c None",
-"a c #999999",
-"b c #FFFFFF",
-"aa.",
-"aab",
-".bb"
+  "3 3 3 1",
+  ". c None",
+  "a c #999999",
+  "b c #FFFFFF",
+  "aa.",
+  "aab",
+  ".bb"
 };
 
 static const char* const cross_xpm[] = {
-"12 12 4 1",
-". c None",
-"a c #000000",
-"b c #FFFFFF",
-"c c #666666",
-"............",
-"............",
-"............",
-".aaaa..aaaa.",
-"..abbaabba..",
-"...abbbba...",
-"....abba....",
-"...abbbba...",
-"..abbaabba..",
-".aaaa..aaaa.",
-"............",
-"............"
+  "12 12 4 1",
+  ". c None",
+  "a c #000000",
+  "b c #FFFFFF",
+  "c c #666666",
+  "............",
+  "............",
+  "............",
+  ".aaaa..aaaa.",
+  "..abbaabba..",
+  "...abbbba...",
+  "....abba....",
+  "...abbbba...",
+  "..abbaabba..",
+  ".aaaa..aaaa.",
+  "............",
+  "............"
 };
 
 static const char* const maximize_xpm[] = {
-"12 12 4 1",
-". c None",
-"a c #000000",
-"b c #FFFFFF",
-"c c #666666",
-"............",
-".aaaaaaaaaa.",
-".acccccccca.",
-".acccccccca.",
-".abbbbbbbba.",
-".abbbbbbbba.",
-".abbbbbbbba.",
-".abbbbbbbba.",
-".abbbbbbbba.",
-".abbbbbbbba.",
-".aaaaaaaaaa.",
-"............"
+  "12 12 4 1",
+  ". c None",
+  "a c #000000",
+  "b c #FFFFFF",
+  "c c #666666",
+  "............",
+  ".aaaaaaaaaa.",
+  ".acccccccca.",
+  ".acccccccca.",
+  ".abbbbbbbba.",
+  ".abbbbbbbba.",
+  ".abbbbbbbba.",
+  ".abbbbbbbba.",
+  ".abbbbbbbba.",
+  ".abbbbbbbba.",
+  ".aaaaaaaaaa.",
+  "............"
 };
 
 static const char* const normal_xpm[] = {
-"12 12 4 1",
-". c None",
-"a c #000000",
-"b c #FFFFFF",
-"c c #666666",
-"............",
-"...aaaaaaaa.",
-"...acccccca.",
-"...abbbbbba.",
-"...aaaaaaba.",
-".aaaaaaaaba.",
-".accccccaba.",
-".abbbbbbaaa.",
-".abbbbbba...",
-".abbbbbba...",
-".aaaaaaaa...",
-"............"
+  "12 12 4 1",
+  ". c None",
+  "a c #000000",
+  "b c #FFFFFF",
+  "c c #666666",
+  "............",
+  "...aaaaaaaa.",
+  "...acccccca.",
+  "...abbbbbba.",
+  "...aaaaaaba.",
+  ".aaaaaaaaba.",
+  ".accccccaba.",
+  ".abbbbbbaaa.",
+  ".abbbbbba...",
+  ".abbbbbba...",
+  ".aaaaaaaa...",
+  "............"
 };
 
 static const char* const minimize_xpm[] = {
-"12 12 4 1",
-". c None",
-"a c #000000",
-"b c #FFFFFF",
-"c c #666666",
-"............",
-"............",
-"............",
-"............",
-"............",
-"............",
-"............",
-"............",
-"aaaaaaaaaaaa",
-"abbbbbbbbbba",
-"aaaaaaaaaaaa",
-"............"
+  "12 12 4 1",
+  ". c None",
+  "a c #000000",
+  "b c #FFFFFF",
+  "c c #666666",
+  "............",
+  "............",
+  "............",
+  "............",
+  "............",
+  "............",
+  "............",
+  "............",
+  "aaaaaaaaaaaa",
+  "abbbbbbbbbba",
+  "aaaaaaaaaaaa",
+  "............"
 };
 
 ///////////////////////////////////////////////////////////
@@ -322,7 +322,7 @@ Style_Model* Style_Salome::model()
 void Style_Salome::polish ( QApplication* app )
 {
   BaseStyle::polish( app );
-  
+
   if ( checkDebugLevel(1) ) {
     return;
   }
@@ -356,7 +356,7 @@ void Style_Salome::polish ( QWidget* w )
          qobject_cast<QMenuBar*>(w)    || qobject_cast<QDockWidget*>(w) )
       w->setAttribute( Qt::WA_Hover );
   }
-    BaseStyle::polish( w );
+  BaseStyle::polish( w );
 }
 
 /*!
@@ -405,7 +405,7 @@ void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComp
 
   const QPalette& pal = w->palette();
   switch( cc ) {
-    case CC_SpinBox:
+    case CC_SpinBox: {
       if (const QStyleOptionSpinBox *spin = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)) {
         bool hover = hasHover() && (opt->state & State_Enabled) && (opt->state & State_MouseOver);
         QRect optr = opt->rect, arUp =   subControlRect( cc, spin, SC_SpinBoxUp, w );
@@ -480,9 +480,10 @@ void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComp
           copy.rect = aBtnRect;
           drawPrimitive(pe, &copy, p, w);
         }
-        break;
-     }
-     case CC_ComboBox: {
+      }
+      break;
+    }
+    case CC_ComboBox: {
       if (const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) {
         bool hover = hasHover() && (opt->state & State_Enabled) && (opt->state & State_MouseOver);
         QRect optr = opt->rect,
@@ -533,84 +534,86 @@ void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComp
           else
             p->setPen(cmb->palette.text().color());
         }
-        break;
       }
+      break;
     }
     case CC_Slider: {
-        if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt)) {
-            QRect groove = subControlRect(CC_Slider, slider, SC_SliderGroove, w);
-            QRect handle = subControlRect(CC_Slider, slider, SC_SliderHandle, w);
-
-            if( hasHover() && (slider->state & State_Enabled) &&
-                         (slider->state & State_MouseOver) ) {
-              QRect moderated = w->rect();
-                drawHoverRect(p, moderated, opt->palette.color( QPalette::Window ),
-                              model()->widgetRounding( Style_Model::ButtonRadius ), Style_Tools::All, false);
-            }
-
-            if ((slider->subControls & SC_SliderGroove) && groove.isValid()) {
-              QStyleOptionSlider tmpSlider = *slider;
-              tmpSlider.subControls = SC_SliderGroove;
-              BaseStyle::drawComplexControl(cc, &tmpSlider, p, w);
-            }
-            if (slider->subControls & SC_SliderTickmarks) {
-              QStyleOptionSlider tmpSlider = *slider;
-              tmpSlider.subControls = SC_SliderTickmarks;
-              QCommonStyle::drawComplexControl(cc, &tmpSlider, p, w);
+      if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt)) {
+        QRect groove = subControlRect(CC_Slider, slider, SC_SliderGroove, w);
+        QRect handle = subControlRect(CC_Slider, slider, SC_SliderHandle, w);
+        
+        if( hasHover() && (slider->state & State_Enabled) &&
+            (slider->state & State_MouseOver) ) {
+          QRect moderated = w->rect();
+          drawHoverRect(p, moderated, opt->palette.color( QPalette::Window ),
+                        model()->widgetRounding( Style_Model::ButtonRadius ), Style_Tools::All, false);
+        }
+        
+        if ((slider->subControls & SC_SliderGroove) && groove.isValid()) {
+          QStyleOptionSlider tmpSlider = *slider;
+          tmpSlider.subControls = SC_SliderGroove;
+          BaseStyle::drawComplexControl(cc, &tmpSlider, p, w);
+        }
+        if (slider->subControls & SC_SliderTickmarks) {
+          QStyleOptionSlider tmpSlider = *slider;
+          tmpSlider.subControls = SC_SliderTickmarks;
+          QCommonStyle::drawComplexControl(cc, &tmpSlider, p, w);
+        }
+        if (slider->subControls & SC_SliderHandle) {
+          if (slider->state & State_HasFocus) {
+            QStyleOptionFocusRect fropt;
+            fropt.QStyleOption::operator=(*slider);
+            fropt.rect = subElementRect(SE_SliderFocusRect, slider, w);
+            drawPrimitive(PE_FrameFocusRect, &fropt, p, w);
+          }
+          int x = handle.x(), y = handle.y(), wi = handle.width(), he = handle.height();
+          bool horiz = slider->orientation == Qt::Horizontal;
+          bool tickAbove = slider->tickPosition == QSlider::TicksAbove;
+          bool tickBelow = slider->tickPosition == QSlider::TicksBelow;
+          QColor aBtnCol = model()->color( Style_Model::Slider );          // Style_Model::slider_clr
+          QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
+          QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
+          // rect was changed on +/-DELTA_SLIDER value for correct painting Antialised border of slider
+          int aDelta = DELTA_SLIDER-1;
+          QRect slRect = QRect(x+aDelta, y+aDelta, wi-aDelta, he-aDelta);
+          int aXAdd = (int)(slRect.width()/6), aYAdd = (int)(slRect.height()/6);
+          Style_Tools::SliderType type = Style_Tools::SlNone;
+          if ((tickAbove && tickBelow) || (!tickAbove && !tickBelow))
+            type = Style_Tools::SlNone;
+          else {
+            if (horiz) {
+              if (tickAbove) {
+                type = Style_Tools::SlUp;
+                slRect.setTop( slRect.top()-aYAdd );
+              }
+              else {
+                type = Style_Tools::SlDown;
+                slRect.setBottom( slRect.bottom()+aYAdd );
+              }
             }
-            if (slider->subControls & SC_SliderHandle) {
-              if (slider->state & State_HasFocus) {
-                QStyleOptionFocusRect fropt;
-                fropt.QStyleOption::operator=(*slider);
-                fropt.rect = subElementRect(SE_SliderFocusRect, slider, w);
-                drawPrimitive(PE_FrameFocusRect, &fropt, p, w);
+            else {
+              if (tickAbove) {
+                type = Style_Tools::SlLeft;
+                slRect.setLeft( slRect.left()-aXAdd );
               }
-              int x = handle.x(), y = handle.y(), wi = handle.width(), he = handle.height();
-              bool horiz = slider->orientation == Qt::Horizontal;
-              bool tickAbove = slider->tickPosition == QSlider::TicksAbove;
-              bool tickBelow = slider->tickPosition == QSlider::TicksBelow;
-              QColor aBtnCol = model()->color( Style_Model::Slider );          // Style_Model::slider_clr
-              QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
-              QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
-              // rect was changed on +/-DELTA_SLIDER value for correct painting Antialised border of slider
-              int aDelta = DELTA_SLIDER-1;
-              QRect slRect = QRect(x+aDelta, y+aDelta, wi-aDelta, he-aDelta);
-              int aXAdd = (int)(slRect.width()/6), aYAdd = (int)(slRect.height()/6);
-              Style_Tools::SliderType type = Style_Tools::SlNone;
-              if ((tickAbove && tickBelow) || (!tickAbove && !tickBelow))
-                type = Style_Tools::SlNone;
               else {
-                if (horiz)
-                  if (tickAbove) {
-                    type = Style_Tools::SlUp;
-                    slRect.setTop( slRect.top()-aYAdd );
-                  }
-                  else {
-                    type = Style_Tools::SlDown;
-                    slRect.setBottom( slRect.bottom()+aYAdd );
-                  }
-                else
-                  if (tickAbove) {
-                    type = Style_Tools::SlLeft;
-                    slRect.setLeft( slRect.left()-aXAdd );
-                  }
-                  else {
-                    type = Style_Tools::SlRight;
-                    slRect.setRight( slRect.right()+aXAdd );
-                 }
+                type = Style_Tools::SlRight;
+                slRect.setRight( slRect.right()+aXAdd );
               }
-              Style_Tools::drawSlider( p, slRect, model()->widgetRounding( Style_Model::SliderRadius ), type,
-                                       aBtnCol.light( BUT_PERCENT_COL ),
-                                       aBtnCol.dark( BUT_PERCENT_COL ), aBrdTopCol, aBrdBotCol );
-              QRect aHRect = handle;
-              int aXRect = (int)(aHRect.width()/5),
-                  aYRect = (int)(aHRect.height()/5);
-              aHRect = QRect( aHRect.x()+aXRect, aHRect.y()+aYRect,
-                              aHRect.width()-2*aXRect, aHRect.height()-2*aYRect );
-              drawHandle( p, aHRect, horiz );
             }
-            break;
+          }
+          Style_Tools::drawSlider( p, slRect, model()->widgetRounding( Style_Model::SliderRadius ), type,
+                                   aBtnCol.light( BUT_PERCENT_COL ),
+                                   aBtnCol.dark( BUT_PERCENT_COL ), aBrdTopCol, aBrdBotCol );
+          QRect aHRect = handle;
+          int aXRect = (int)(aHRect.width()/5),
+            aYRect = (int)(aHRect.height()/5);
+          aHRect = QRect( aHRect.x()+aXRect, aHRect.y()+aYRect,
+                          aHRect.width()-2*aXRect, aHRect.height()-2*aYRect );
+          drawHandle( p, aHRect, horiz );
         }
+      }
+      break;
     }
     case CC_ToolButton: {
       if (const QStyleOptionToolButton *toolbutton
@@ -699,15 +702,14 @@ void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComp
         int fw = pixelMetric( PM_DefaultFrameWidth, opt, w );
         label.rect = button.adjusted( fw, fw, -fw, -fw );
         drawControl( CE_ToolButtonLabel, &label, p, w );
-
-        break;
       }
+      break;
     }
     case CC_TitleBar: {
       BaseStyle::drawComplexControl( cc, opt, p, w );
       break;
     }
-    case CC_GroupBox:
+    case CC_GroupBox: {
       if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const 
                                                  QStyleOptionGroupBox *>(opt)) {
         // Draw frame
@@ -751,14 +753,17 @@ void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComp
           box.rect = checkBoxRect;
           drawPrimitive(PE_IndicatorCheckBox, &box, p, w);
         }
-        break;
       }
+      break;
+    }
     case CC_Dial: {
       BaseStyle::drawComplexControl( cc, opt, p, w );
       break;
     }
-    default:
+    default: {
       BaseStyle::drawComplexControl( cc, opt, p, w );
+      break;
+    }
   }
 }
 
@@ -778,7 +783,7 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
   }
 
   switch ( ce ) {
-    case CE_PushButton:
+    case CE_PushButton: {
       if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) {
         drawControl(CE_PushButtonBevel, btn, p, w);
         QStyleOptionButton subopt = *btn;
@@ -789,9 +794,10 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
           Style_Tools::drawFocus( p, aRect, model()->widgetRounding( Style_Model::ButtonRadius ),
                                   Style_Tools::All, model()->color( Style_Model::BorderBottom ) );
         }
-        break;
       }
-    case CE_PushButtonBevel:
+      break;
+    }
+    case CE_PushButtonBevel: {
       if ( const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt) ) {
         double aRad = model()->widgetRounding( Style_Model::ButtonRadius );
         bool aStateOn = opt->state & ( State_Sunken | State_On );
@@ -815,92 +821,94 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
         else
           Style_Tools::shadowRect( p, r, aRad, -1, SHADOW, Style_Tools::All, top, bottom,
                                    aBrdTopCol, aBrdBotCol, antialized, true, aStateOn );
-       if (btn->features & QStyleOptionButton::HasMenu) {
-         int mbi = pixelMetric(PM_MenuButtonIndicator, btn, w);
-         QStyleOptionButton newBtn = *btn;
-         newBtn.rect = QRect(r.right() - mbi-2, r.height()/2 - mbi/2, mbi, mbi);
-         drawPrimitive(PE_IndicatorArrowDown, &newBtn, p, w);
-       }
-        break;
+        if (btn->features & QStyleOptionButton::HasMenu) {
+          int mbi = pixelMetric(PM_MenuButtonIndicator, btn, w);
+          QStyleOptionButton newBtn = *btn;
+          newBtn.rect = QRect(r.right() - mbi-2, r.height()/2 - mbi/2, mbi, mbi);
+          drawPrimitive(PE_IndicatorArrowDown, &newBtn, p, w);
+        }
       }
-      case CE_DockWidgetTitle:
-        if (const QStyleOptionDockWidget *dwOpt = qstyleoption_cast<const QStyleOptionDockWidget *>(opt)) {
-          bool floating = false;
-          int menuOffset = 0; //used to center text when floated
-          QColor inactiveCaptionTextColor = opt->palette.color( QPalette::HighlightedText );
-          const QDockWidget *dockWidget = qobject_cast<const QDockWidget *>(w);
-          //Titlebar gradient
-          if (dockWidget) {
-            if ( dockWidget->isFloating() && dwOpt->movable) {
-              floating = true;
-              QColor top = opt->palette.color( QPalette::Highlight ).light();
-              QColor bottom = opt->palette.color( QPalette::Highlight );
-              menuOffset = 2;
-              QBrush fillBrush(bottom);
-              if (top != bottom) {
-                QPoint p1(dwOpt->rect.x(), dwOpt->rect.y());
-                QPoint p2(dwOpt->rect.x(), dwOpt->rect.bottom() );
-                QLinearGradient lg(p1, p2);
-                lg.setColorAt(0, top);
-                lg.setColorAt(1, bottom);
-                fillBrush = lg;
-              }
-              p->fillRect(dwOpt->rect.adjusted(0, 0, 0, -3), fillBrush);
-            }
-            else {
-              QRect r = dwOpt->rect.adjusted(0, 0, -1, -1); 
-              QColor bottom = opt->palette.color( QPalette::Window ),
-                     top =    bottom.dark( BUT_PERCENT_COL );
-              QRect aRect = dwOpt->rect;
-              QLinearGradient gr( aRect.x(), aRect.y(), aRect.x(), aRect.y()+aRect.height() );
-              gr.setColorAt( 0.0, top );
-              gr.setColorAt( 0.4, bottom );
-              gr.setColorAt( 0.6, bottom );
-              gr.setColorAt( 1.0, top );
-              p->fillRect( r, gr );
-
-              QColor aBrdTopCol = model()->color( Style_Model::TabBorderTop );     // Style_Model::border_tab_top_clr
-              QColor aBrdBotCol = model()->color( Style_Model::TabBorderBottom );  // Style_Model::border_tab_bot_clr
-              p->setPen( aBrdTopCol );
-              p->drawLine( r.x(), r.bottom(), r.x(), r.y() );
-              p->drawLine( r.x(), r.y(), r.right(), r.y() );
-              p->setPen( aBrdBotCol );
-              p->drawLine( r.x(), r.bottom(), r.right(), r.bottom() );
-              p->drawLine( r.right(), r.bottom(), r.right(), r.y() );
+      break;
+    }
+    case CE_DockWidgetTitle: {
+      if (const QStyleOptionDockWidget *dwOpt = qstyleoption_cast<const QStyleOptionDockWidget *>(opt)) {
+        bool floating = false;
+        int menuOffset = 0; //used to center text when floated
+        QColor inactiveCaptionTextColor = opt->palette.color( QPalette::HighlightedText );
+        const QDockWidget *dockWidget = qobject_cast<const QDockWidget *>(w);
+        //Titlebar gradient
+        if (dockWidget) {
+          if ( dockWidget->isFloating() && dwOpt->movable) {
+            floating = true;
+            QColor top = opt->palette.color( QPalette::Highlight ).light();
+            QColor bottom = opt->palette.color( QPalette::Highlight );
+            menuOffset = 2;
+            QBrush fillBrush(bottom);
+            if (top != bottom) {
+              QPoint p1(dwOpt->rect.x(), dwOpt->rect.y());
+              QPoint p2(dwOpt->rect.x(), dwOpt->rect.bottom() );
+              QLinearGradient lg(p1, p2);
+              lg.setColorAt(0, top);
+              lg.setColorAt(1, bottom);
+              fillBrush = lg;
             }
+            p->fillRect(dwOpt->rect.adjusted(0, 0, 0, -3), fillBrush);
           }
-          p->setPen(dwOpt->palette.color(QPalette::Light));
-
-          QString aTitle = dwOpt->title;
-          if (!aTitle.isEmpty()) {
-            int aMargin  = pixelMetric(QStyle::PM_DockWidgetTitleMargin, dwOpt, w);
-            const int indent = p->fontMetrics().descent();
-            QRect r = dwOpt->rect.adjusted(indent + 1, - menuOffset, -indent - 1, -1);
-            QPixmap aPxm = standardPixmap( SP_DockWidgetCloseButton, opt, w);
-            int aWidth = r.width() - aPxm.width()-2/*button margins*/;
-            aPxm = standardPixmap( SP_TitleBarNormalButton, opt, w);
-            aWidth = aWidth - aPxm.width()-2/*button margins*/;
-            r = QRect( r.x(), r.y(), aWidth-aMargin-2/*buttons separator*/-2/*margin from text*/, r.height() );
-
-            QFont oldFont = p->font();
-            QFont font = oldFont;
-            if (floating) {
-              font.setBold(true);
-              p->setFont(font);
-            }
-            aTitle = titleText( aTitle, r.width(), r.height(), font );
-
-            QPalette palette = dwOpt->palette;
-            palette.setColor(QPalette::Window, inactiveCaptionTextColor);
-            bool active = dwOpt->state & State_Active;
-            //const int indent = p->fontMetrics().descent();
-            drawItemText(p, r, Qt::AlignLeft | Qt::AlignVCenter, palette,
-                         dwOpt->state & State_Enabled, aTitle,
-                         floating ? (active ? QPalette::BrightText : QPalette::Window) : QPalette::WindowText);
-            p->setFont(oldFont);
+          else {
+            QRect r = dwOpt->rect.adjusted(0, 0, -1, -1); 
+            QColor bottom = opt->palette.color( QPalette::Window ),
+              top =    bottom.dark( BUT_PERCENT_COL );
+            QRect aRect = dwOpt->rect;
+            QLinearGradient gr( aRect.x(), aRect.y(), aRect.x(), aRect.y()+aRect.height() );
+            gr.setColorAt( 0.0, top );
+            gr.setColorAt( 0.4, bottom );
+            gr.setColorAt( 0.6, bottom );
+            gr.setColorAt( 1.0, top );
+            p->fillRect( r, gr );
+
+            QColor aBrdTopCol = model()->color( Style_Model::TabBorderTop );     // Style_Model::border_tab_top_clr
+            QColor aBrdBotCol = model()->color( Style_Model::TabBorderBottom );  // Style_Model::border_tab_bot_clr
+            p->setPen( aBrdTopCol );
+            p->drawLine( r.x(), r.bottom(), r.x(), r.y() );
+            p->drawLine( r.x(), r.y(), r.right(), r.y() );
+            p->setPen( aBrdBotCol );
+            p->drawLine( r.x(), r.bottom(), r.right(), r.bottom() );
+            p->drawLine( r.right(), r.bottom(), r.right(), r.y() );
           }
-          break;
         }
+        p->setPen(dwOpt->palette.color(QPalette::Light));
+
+        QString aTitle = dwOpt->title;
+        if (!aTitle.isEmpty()) {
+          int aMargin  = pixelMetric(QStyle::PM_DockWidgetTitleMargin, dwOpt, w);
+          const int indent = p->fontMetrics().descent();
+          QRect r = dwOpt->rect.adjusted(indent + 1, - menuOffset, -indent - 1, -1);
+          QPixmap aPxm = standardPixmap( SP_DockWidgetCloseButton, opt, w);
+          int aWidth = r.width() - aPxm.width()-2/*button margins*/;
+          aPxm = standardPixmap( SP_TitleBarNormalButton, opt, w);
+          aWidth = aWidth - aPxm.width()-2/*button margins*/;
+          r = QRect( r.x(), r.y(), aWidth-aMargin-2/*buttons separator*/-2/*margin from text*/, r.height() );
+
+          QFont oldFont = p->font();
+          QFont font = oldFont;
+          if (floating) {
+            font.setBold(true);
+            p->setFont(font);
+          }
+          aTitle = titleText( aTitle, r.width(), r.height(), font );
+
+          QPalette palette = dwOpt->palette;
+          palette.setColor(QPalette::Window, inactiveCaptionTextColor);
+          bool active = dwOpt->state & State_Active;
+          //const int indent = p->fontMetrics().descent();
+          drawItemText(p, r, Qt::AlignLeft | Qt::AlignVCenter, palette,
+                       dwOpt->state & State_Enabled, aTitle,
+                       floating ? (active ? QPalette::BrightText : QPalette::Window) : QPalette::WindowText);
+          p->setFont(oldFont);
+        }
+      }
+      break;
+    }
     case CE_Splitter: {
       BaseStyle::drawControl( ce, opt, p, w );
       QRect r = opt->rect;
@@ -913,7 +921,7 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
       drawHandle( p, r, horiz, true );
       break;
     }
-    case CE_TabBarTabShape:
+    case CE_TabBarTabShape: {
       if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) {
         if (tab->shape == QTabBar::RoundedNorth || tab->shape == QTabBar::RoundedEast ||
             tab->shape == QTabBar::RoundedSouth || tab->shape == QTabBar::RoundedWest) {
@@ -939,11 +947,14 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
                                 DELTA_H_TAB, aColor, aDarkColor,
                                 aBrdTopCol, aBrdBotCol, isSelected, isLast, isHover );
           p->restore();
-        } else
-           QCommonStyle::drawControl( ce, opt, p, w );
-        break;
+        }
+        else {
+          QCommonStyle::drawControl( ce, opt, p, w );
+        }
       }
-    case CE_TabBarTabLabel:
+      break;
+    }
+    case CE_TabBarTabLabel: {
       if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) {
         if ( tab->position == QStyleOptionTab::End ||
              tab->position == QStyleOptionTab::OnlyOneTab ) {
@@ -961,11 +972,13 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
           copyTab->rect = oldRect;
           BaseStyle::drawControl( ce, copyTab, p, w );
         }
-        else
+        else {
           BaseStyle::drawControl( ce, opt, p, w );
-        break;
+        }
       }
-    case CE_MenuBarItem:
+      break;
+    }
+    case CE_MenuBarItem: {
       if (const QStyleOptionMenuItem *mbi = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)) {
         if ( w )
           drawBackground( p, w->rect(), opt->palette.color( QPalette::Window ), true, true, true );
@@ -1001,11 +1014,13 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
           }
         }
         QCommonStyle::drawControl(ce, &newMbi, p, w);
-        break;
       }
-    case CE_MenuBarEmptyArea:
+      break;
+    }
+    case CE_MenuBarEmptyArea: {
       drawBackground( p, opt->rect, opt->palette.color( QPalette::Window ), true, true, true );
       break;
+    }
     case CE_ProgressBarGroove: {
       QColor aBgColor = opt->palette.color( QPalette::Window ),
         top =    aBgColor.light( BUT_PERCENT_ON ),
@@ -1016,8 +1031,8 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
                                SHADOW, Style_Tools::All, top, bottom, aBrdTopCol, aBrdBotCol,
                                model()->antialiasing(), true );
       break;
-      }
-    case CE_ProgressBarLabel:
+    }
+    case CE_ProgressBarLabel: {
       if (const QStyleOptionProgressBar *bar = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)) {
         // implementation from qplastiquestyle
         // The busy indicator doesn't draw a label
@@ -1032,7 +1047,7 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
         bool inverted = false;
         bool bottomToTop = false;
         // Get extra style options if version 2
-        if (const QStyleOptionProgressBarV2 *bar2 = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(opt)) {
+        if (const QStyleOptionProgressBar *bar2 = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)) {
           vertical = (bar2->orientation == Qt::Vertical);
           inverted = bar2->invertedAppearance;
           bottomToTop = bar2->bottomToTop;
@@ -1081,13 +1096,14 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
         p->restore();
       }
       break;
-    case CE_ProgressBarContents:
+    }
+    case CE_ProgressBarContents: {
       if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)) {
         QRect rect = pb->rect;
         bool vertical = false;
         bool inverted = false;
         // Get extra style options if version 2
-        const QStyleOptionProgressBarV2 *pb2 = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(opt);
+        const QStyleOptionProgressBar *pb2 = qstyleoption_cast<const QStyleOptionProgressBar *>(opt);
         if (pb2) {
           vertical = (pb2->orientation == Qt::Vertical);
           inverted = pb2->invertedAppearance;
@@ -1147,7 +1163,7 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
           int x = 0;
           int x0 = reverse ? rect.right() - ((unit_width > 1) ? unit_width : fw)
                            : rect.x() + fw;
-          QStyleOptionProgressBarV2 pbBits = *pb;
+          QStyleOptionProgressBar pbBits = *pb;
           pbBits.rect = rect;
           pbBits.palette = pal2;
           int myY = pbBits.rect.y();
@@ -1206,7 +1222,8 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
         }
       }
       break;
-    case CE_MenuItem:
+    }
+    case CE_MenuItem: {
       if (const QStyleOptionMenuItem *menuitem = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)) {
         const int windowsItemFrame    =  2; // definitions from qwindowstyle.cpp file
         const int windowsItemHMargin  =  3;
@@ -1327,38 +1344,40 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
           QFont font = menuitem->font;
           if (menuitem->menuItemType == QStyleOptionMenuItem::DefaultItem)
             font.setBold(true);
-            p->setFont(font);
-            if (dis && !act) {
-              p->setPen(menuitem->palette.light().color());
-              p->drawText(vTextRect.adjusted(1,1,1,1), text_flags, s.left(t));
-              p->setPen(discol);
-            }
-            p->drawText(vTextRect, text_flags, s.left(t));
-            p->restore();
-          }
-          if (menuitem->menuItemType == QStyleOptionMenuItem::SubMenu) {// draw sub menu arrow
-            int dim = (h - 2 * windowsItemFrame) / 2;
-            PrimitiveElement arrow;
-            arrow = (opt->direction == Qt::RightToLeft) ? PE_IndicatorArrowLeft :
-                     PE_IndicatorArrowRight;
-            xpos = x + width - windowsArrowHMargin - windowsItemFrame - dim;
-            QRect  vSubMenuRect = visualRect(opt->direction, menuitem->rect,
-                                             QRect(xpos, y + h / 2 - dim / 2, dim, dim));
-            QStyleOptionMenuItem newMI = *menuitem;
-            newMI.rect = vSubMenuRect;
-            newMI.state = dis ? State_None : State_Enabled;
-            if (act)
-              newMI.palette.setColor(QPalette::ButtonText,
-                                     newMI.palette.highlightedText().color());
-            drawPrimitive(arrow, &newMI, p, w);
+          p->setFont(font);
+          if (dis && !act) {
+            p->setPen(menuitem->palette.light().color());
+            p->drawText(vTextRect.adjusted(1,1,1,1), text_flags, s.left(t));
+            p->setPen(discol);
           }
+          p->drawText(vTextRect, text_flags, s.left(t));
+          p->restore();
         }
+        if (menuitem->menuItemType == QStyleOptionMenuItem::SubMenu) {// draw sub menu arrow
+          int dim = (h - 2 * windowsItemFrame) / 2;
+          PrimitiveElement arrow;
+          arrow = (opt->direction == Qt::RightToLeft) ? PE_IndicatorArrowLeft :
+            PE_IndicatorArrowRight;
+          xpos = x + width - windowsArrowHMargin - windowsItemFrame - dim;
+          QRect  vSubMenuRect = visualRect(opt->direction, menuitem->rect,
+                                           QRect(xpos, y + h / 2 - dim / 2, dim, dim));
+          QStyleOptionMenuItem newMI = *menuitem;
+          newMI.rect = vSubMenuRect;
+          newMI.state = dis ? State_None : State_Enabled;
+          if (act)
+            newMI.palette.setColor(QPalette::ButtonText,
+                                   newMI.palette.highlightedText().color());
+          drawPrimitive(arrow, &newMI, p, w);
+        }
+      }
       break;
-      /*
-    case CE_ToolBoxTab:
+    }
+    /*
+    case CE_ToolBoxTab: {
       QCommonStyle::drawControl( ce, opt, p, w );
       break;
-      */
+    }
+    */
     case CE_HeaderSection: {
       bool aStateOn = opt->state & State_On;
       QColor aColor = model()->color( Style_Model::Header );    // Style_Model::header_clr
@@ -1370,7 +1389,7 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
                        aBrdBotCol, model()->antialiasing(), true, aStateOn );
       break;
     }
-    case CE_ComboBoxLabel:
+    case CE_ComboBoxLabel: {
       if (const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) {
         QRect editRect = subControlRect(CC_ComboBox, cb, SC_ComboBoxEditField, w);
         p->save();
@@ -1407,16 +1426,17 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
         p->restore();
       }
       break;
+    }
     case CE_ScrollBarSubLine:
     case CE_ScrollBarAddLine: {
-        bool aStateOn = opt->state & ( State_Sunken | State_On );
-        QColor aBtnCol = opt->palette.color( QPalette::Button );
-        QColor top =    aBtnCol.light( BUT_PERCENT_COL ),
-               bottom = aBtnCol.dark( BUT_PERCENT_COL );
-        QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
-        QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
-        Style_Tools::shadowRect( p, opt->rect, 0, -1, 0, Style_Tools::All, top, bottom, aBrdTopCol,
-                                 aBrdBotCol, false, true, aStateOn, true );
+      bool aStateOn = opt->state & ( State_Sunken | State_On );
+      QColor aBtnCol = opt->palette.color( QPalette::Button );
+      QColor top =    aBtnCol.light( BUT_PERCENT_COL ),
+             bottom = aBtnCol.dark( BUT_PERCENT_COL );
+      QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
+      QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
+      Style_Tools::shadowRect( p, opt->rect, 0, -1, 0, Style_Tools::All, top, bottom, aBrdTopCol,
+                               aBrdBotCol, false, true, aStateOn, true );
       PrimitiveElement arrow;
       if (opt->state & State_Horizontal) {
         if (ce == CE_ScrollBarAddLine)
@@ -1432,7 +1452,7 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
       drawPrimitive(arrow, opt, p, w);
       break;
     }
-    case CE_ScrollBarSlider:
+    case CE_ScrollBarSlider: {
       if (const QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(opt)) {
         p->save();
         p->setRenderHint( QPainter::Antialiasing, true );
@@ -1442,7 +1462,7 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
         if ( hasHover() && enabled && (opt->state & State_MouseOver) )
          drawHoverRect(p, opt->rect, opt->palette.color( QPalette::Window ), aRad, Style_Tools::All, false);
         else {
-        QColor aColor = model()->color( Style_Model::Slider );      // Style_Model::slider_clr
+          QColor aColor = model()->color( Style_Model::Slider );      // Style_Model::slider_clr
           if ( !enabled )
             aColor = opt->palette.button().color();
           QColor top =    aColor.light( BUT_PERCENT_ON ),
@@ -1462,37 +1482,39 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
 
           p->fillPath( path, gr );
           p->strokePath( path, aBrdTopCol );
+        }
+        p->setRenderHint( QPainter::Antialiasing, false );
+        // draw handle
+        QRect aRect = opt->rect;
+        int aWidth = aRect.width(), aHeight = aRect.height();
+        if ( aWidth > aHeight + aRad )
+          aRect = QRect( aRect.x() + (int)((aWidth-aHeight)/2),
+                         aRect.y(), aHeight, aHeight );
+        else if ( aHeight > aWidth + aRad )
+          aRect = QRect( aRect.x(), aRect.y() + (int)((aHeight-aWidth)/2),
+                         aWidth, aWidth );
+        else {
+          int aRad2 = (int)(aRad/3);
+          aRect = QRect( aRect.x()+aRad2, aRect.y()+aRad2, aRect.width()-2*aRad2, aRect.height()-2*aRad2  );
+        }
+        drawHandle( p, aRect, horiz, true );
+        
+        p->restore();
       }
+      break;
+    }
+    case CE_ToolBar: {
+      QRect r = w->rect();
+      bool horiz = opt->state & State_Horizontal;
+      drawBackground( p, r, opt->palette.color( QPalette::Window ), true, true, horiz );
       p->setRenderHint( QPainter::Antialiasing, false );
-      // draw handle
-      QRect aRect = opt->rect;
-      int aWidth = aRect.width(), aHeight = aRect.height();
-      if ( aWidth > aHeight + aRad )
-        aRect = QRect( aRect.x() + (int)((aWidth-aHeight)/2),
-                       aRect.y(), aHeight, aHeight );
-      else if ( aHeight > aWidth + aRad )
-        aRect = QRect( aRect.x(), aRect.y() + (int)((aHeight-aWidth)/2),
-                       aWidth, aWidth );
-      else {
-        int aRad2 = (int)(aRad/3);
-        aRect = QRect( aRect.x()+aRad2, aRect.y()+aRad2, aRect.width()-2*aRad2, aRect.height()-2*aRad2  );
-      }
-      drawHandle( p, aRect, horiz, true );
-
-      p->restore();
+      drawBorder( p, r, horiz );
+      break;
+    }
+    default: {
+      BaseStyle::drawControl( ce, opt, p, w );
       break;
     }
-  case CE_ToolBar: {
-    QRect r = w->rect();
-    bool horiz = opt->state & State_Horizontal;
-    drawBackground( p, r, opt->palette.color( QPalette::Window ), true, true, horiz );
-    p->setRenderHint( QPainter::Antialiasing, false );
-    drawBorder( p, r, horiz );
-    break;
-  }
-  default:
-    BaseStyle::drawControl( ce, opt, p, w );
-    break;
   }
 }
 
@@ -1514,7 +1536,7 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
   const QPalette& pal = opt->palette;
   bool doRestore = false;
   switch ( pe ) {
-    case PE_FrameMenu:
+    case PE_FrameMenu: {
       if (qstyleoption_cast<const QStyleOptionFrame *>(opt)) {
         QColor aBtnCol = opt->palette.color( QPalette::Window ),
                top =    aBtnCol.light( BUT_PERCENT_ON ),
@@ -1523,8 +1545,9 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
         QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
         Style_Tools::shadowRect( p, opt->rect, 0, 0., SHADOW, Style_Tools::All, top,
                                  bottom, aBrdTopCol, aBrdBotCol, false, false, false, false );
-        break;
       }
+      break;
+    }
     case PE_PanelButtonTool : {
       if ( w && ( opt->state & State_Enabled ) && 
            ( ( qobject_cast<QToolBar*>( w->parentWidget() ) ) ||
@@ -1546,10 +1569,11 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
         }
         break;
       }
-      else
+      else {
         BaseStyle::drawPrimitive( pe, opt, p, w );
+      }
+      break;
     }
-    break;
     case PE_FrameFocusRect: {
       if (w && qobject_cast<QTabBar*>((QWidget*)w)) {
         QTabBar* tabBar = qobject_cast<QTabBar*>((QWidget*)w);
@@ -1636,9 +1660,8 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
         p->setPen(opt->palette.dark().color());
       else
         p->setPen(opt->palette.text().color());
-     } // Fall through!
-    case PE_IndicatorViewItemCheck:
-    {
+    } // Fall through!
+    case PE_IndicatorViewItemCheck: {
       if (!doRestore) {
         p->save();
         doRestore = true;
@@ -1692,7 +1715,7 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
         QPoint(10, 2), QPoint(10, 3), QPoint(11, 4), QPoint(11, 7), QPoint(10, 8), QPoint(10, 9), 
         QPoint(9, 10), QPoint(8, 10), QPoint(7, 11), QPoint(4, 11), QPoint(3, 10), QPoint(2, 10)
       };
-     // make sure the indicator is square
+      // make sure the indicator is square
       QRect ir = opt->rect;
       if (opt->rect.width() < opt->rect.height()) {
         ir.setTop(opt->rect.top() + (opt->rect.height() - opt->rect.width()) / 2);
@@ -1752,10 +1775,11 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
       p->restore();
       break;
     }
-    case PE_FrameDockWidget:
+    case PE_FrameDockWidget: {
       if ( qstyleoption_cast<const QStyleOptionFrame *>(opt))
         QCommonStyle::drawPrimitive( pe, opt, p, w );
       break;
+    }
     case PE_FrameLineEdit:
     case PE_PanelLineEdit: {
       if ( w ) {
@@ -1810,8 +1834,8 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
                                  model()->color( Style_Model::FieldLight ),
                                  opt->palette.color( QPalette::Dark ),
                                  aBrdTopCol, aBrdBotCol, false, false, false, false );
-        break;
       }
+      break;
     }
     case PE_IndicatorToolBarHandle: {
       p->save();
@@ -1836,7 +1860,7 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
       drawBackground( p, w->rect(), opt->palette.color( QPalette::Window ), false );
       break;
     }
-    case PE_FrameTabBarBase:
+    case PE_FrameTabBarBase: {
       // for a tabbar that isn't part of a tab widget(dockWidgets for example).
       if (const QStyleOptionTabBarBase *tbb
           = qstyleoption_cast<const QStyleOptionTabBarBase *>(opt)) {
@@ -1864,44 +1888,45 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
         QStyleOptionTabBarBase* copyOpt = (QStyleOptionTabBarBase*)tbb;
         copyOpt->selectedTabRect = aSelRect;
         QCommonStyle::drawPrimitive( pe, copyOpt, p, w );
-        break;
       }
+      break;
+    }
     case PE_IndicatorBranch: {
-        // This is _way_ too similar to the common style.
-        static const int decoration_size = 9;
-        int mid_h = opt->rect.x() + opt->rect.width() / 2;
-        int mid_v = opt->rect.y() + opt->rect.height() / 2;
-        int bef_h = mid_h;
-        int bef_v = mid_v;
-        int aft_h = mid_h;
-        int aft_v = mid_v;
-        if (opt->state & State_Children) {
-            int delta = decoration_size / 2;
-            bef_h -= delta;
-            bef_v -= delta;
-            aft_h += delta;
-            aft_v += delta;
-            p->drawLine(bef_h + 2, bef_v + 4, bef_h + 6, bef_v + 4);
-            if (!(opt->state & State_Open))
-                p->drawLine(bef_h + 4, bef_v + 2, bef_h + 4, bef_v + 6);
-            QPen oldPen = p->pen();
-            p->setPen(opt->palette.dark().color());
-            p->drawRect(bef_h, bef_v, decoration_size - 1, decoration_size - 1);
-            p->setPen(oldPen);
-        }
-        QBrush brush(opt->palette.dark().color(), Qt::Dense4Pattern);
-        if (opt->state & State_Item) {
-            if (opt->direction == Qt::RightToLeft)
-                p->fillRect(opt->rect.left(), mid_v, bef_h - opt->rect.left(), 1, brush);
-            else
-                p->fillRect(aft_h, mid_v, opt->rect.right() - aft_h + 1, 1, brush);
-        }
-        if (opt->state & State_Sibling)
-            p->fillRect(mid_h, aft_v, 1, opt->rect.bottom() - aft_v + 1, brush);
-        if (opt->state & (State_Open | State_Children | State_Item | State_Sibling))
-            p->fillRect(mid_h, opt->rect.y(), 1, bef_v - opt->rect.y(), brush);
-        break;
+      // This is _way_ too similar to the common style.
+      static const int decoration_size = 9;
+      int mid_h = opt->rect.x() + opt->rect.width() / 2;
+      int mid_v = opt->rect.y() + opt->rect.height() / 2;
+      int bef_h = mid_h;
+      int bef_v = mid_v;
+      int aft_h = mid_h;
+      int aft_v = mid_v;
+      if (opt->state & State_Children) {
+        int delta = decoration_size / 2;
+        bef_h -= delta;
+        bef_v -= delta;
+        aft_h += delta;
+        aft_v += delta;
+        p->drawLine(bef_h + 2, bef_v + 4, bef_h + 6, bef_v + 4);
+        if (!(opt->state & State_Open))
+          p->drawLine(bef_h + 4, bef_v + 2, bef_h + 4, bef_v + 6);
+        QPen oldPen = p->pen();
+        p->setPen(opt->palette.dark().color());
+        p->drawRect(bef_h, bef_v, decoration_size - 1, decoration_size - 1);
+        p->setPen(oldPen);
+      }
+      QBrush brush(opt->palette.dark().color(), Qt::Dense4Pattern);
+      if (opt->state & State_Item) {
+        if (opt->direction == Qt::RightToLeft)
+          p->fillRect(opt->rect.left(), mid_v, bef_h - opt->rect.left(), 1, brush);
+        else
+          p->fillRect(aft_h, mid_v, opt->rect.right() - aft_h + 1, 1, brush);
       }
+      if (opt->state & State_Sibling)
+        p->fillRect(mid_h, aft_v, 1, opt->rect.bottom() - aft_v + 1, brush);
+      if (opt->state & (State_Open | State_Children | State_Item | State_Sibling))
+        p->fillRect(mid_h, opt->rect.y(), 1, bef_v - opt->rect.y(), brush);
+      break;
+    }
     case PE_IndicatorDockWidgetResizeHandle: {
       QRect r = opt->rect;
       drawBorder( p, r, opt->state & State_Horizontal );
@@ -1987,18 +2012,18 @@ int Style_Salome::pixelMetric( PixelMetric metric, const QStyleOption* opt,
     }
     case PM_DockWidgetFrameWidth:
       aRes = 1;
-    break;
+      break;
     case PM_DockWidgetSeparatorExtent:
       aRes = 8;
-    break;
+      break;
     case PM_DockWidgetTitleMargin:
       aRes = 2;
-    break;
+      break;
     case PM_SplitterWidth:
       aRes = 6;
-    break;
+      break;
     default:
-    break;
+      break;
   }
   return aRes;
 }
@@ -2020,7 +2045,7 @@ QSize Style_Salome::sizeFromContents( ContentsType ct, const QStyleOption* opt,
   }
   QSize sz = BaseStyle::sizeFromContents( ct, opt, contentsSize, w );
   switch (ct) {
-    case CT_TabBarTab:
+    case CT_TabBarTab: {
       if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) {
         if ( tab->position == QStyleOptionTab::End ||
              tab->position == QStyleOptionTab::OnlyOneTab ) {
@@ -2033,31 +2058,33 @@ QSize Style_Salome::sizeFromContents( ContentsType ct, const QStyleOption* opt,
             sz.setHeight( sz.height() + aDelta );
           }
         }
-        break;
       }
       break;
-      case CT_Slider: {
-        int aValue = model()->sliderSize();
-        sz.setWidth( sz.width() + aValue );
-        sz.setHeight( sz.height() + aValue );
-        break;
+    }
+    case CT_Slider: {
+      int aValue = model()->sliderSize();
+      sz.setWidth( sz.width() + aValue );
+      sz.setHeight( sz.height() + aValue );
+      break;
+    }
+    case CT_ComboBox: {
+      if (const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) {
+        QRect res = QRect( 0, 0, sz.width(), sz.height() );
+        int aHalfRect = (int)Style_Tools::getMaxRect( res, 
+                                                      (int)model()->widgetRounding( Style_Model::EditRadius )/2 ); // left value
+        
+        QRect old_arrow = BaseStyle::subControlRect( CC_ComboBox, cmb,
+                                                     SC_ComboBoxArrow, w );
+        int aDelta = res.height() - old_arrow.width(); // right value
+        if ( cmb->editable )
+          aDelta += aHalfRect; // for right of line edit internal
+        sz.setWidth( res.width() + aDelta + aHalfRect );
       }
-      case CT_ComboBox:
-        if (const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) {
-          QRect res = QRect( 0, 0, sz.width(), sz.height() );
-          int aHalfRect = (int)Style_Tools::getMaxRect( res, 
-                             (int)model()->widgetRounding( Style_Model::EditRadius )/2 ); // left value
-
-          QRect old_arrow = BaseStyle::subControlRect( CC_ComboBox, cmb,
-                                                           SC_ComboBoxArrow, w );
-          int aDelta = res.height() - old_arrow.width(); // right value
-          if ( cmb->editable )
-            aDelta += aHalfRect; // for right of line edit internal
-          sz.setWidth( res.width() + aDelta + aHalfRect );
-        }
-        break;
-      default:
       break;
+    }
+    default: {
+      break;
+    }
   }
   return sz;
 }
@@ -2204,11 +2231,14 @@ QRect Style_Salome::subControlRect( ComplexControl cc, const QStyleOptionComplex
             res.setWidth( h );
             break;
           }
+          default: {
+            break;
+          }
         }
       }
       break;
     }
-    case CC_ScrollBar:
+    case CC_ScrollBar: {
       if (const QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(opt)) {
         QRect slider_r = BaseStyle::subControlRect( cc, opt, SC_ScrollBarSlider, wid );
         int aRect = Style_Tools::getMaxRect( slider_r, (int)model()->widgetRounding( Style_Model::ButtonRadius ) );
@@ -2228,8 +2258,9 @@ QRect Style_Salome::subControlRect( ComplexControl cc, const QStyleOptionComplex
           default:
             break;
         }
-        break;
       }
+      break;
+    }
     case CC_Slider: {
       if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(opt)) {
         switch ( sc ) {
@@ -2244,8 +2275,15 @@ QRect Style_Salome::subControlRect( ComplexControl cc, const QStyleOptionComplex
             }
             break;
           }
+          default: {
+            break;
+          }
         }
       }
+      break;
+    }
+    default: {
+      break;
     }
   }
   return res;
@@ -2289,6 +2327,8 @@ QRect Style_Salome::subElementRect( SubElement se, const QStyleOption* opt,
     case SE_ProgressBarContents:
     case SE_ProgressBarGroove:
       return opt->rect;
+    default:
+      break;
   }
   if( qobject_cast<const QRadioButton*>(wid) ||
       qobject_cast<const QCheckBox*>(wid) ) {
index 242a7815ee34ccb7ea2e19e6049f12be4117cd9b..ffc63afc458e774dba32a9f7d270d9ba441ce78c 100644 (file)
@@ -354,8 +354,9 @@ void Style_Tools::drawArrow( QStyle::PrimitiveElement type, QPainter* p, const Q
   p->translate( xc, yc );
   bool correct = false;
   switch( type ) {
-    case QStyle::PE_IndicatorArrowDown:
+    case QStyle::PE_IndicatorArrowDown: {
       correct = true;
+    } // fall through!
     case QStyle::PE_IndicatorArrowUp: {
       int widthArr2 = (int)(deltaX/3.);
       if ( correct )
@@ -374,8 +375,9 @@ void Style_Tools::drawArrow( QStyle::PrimitiveElement type, QPainter* p, const Q
       x11 = -deltaX; y11 = -deltaY; x12 = deltaX; y12 = deltaY;
       break;
     }
-    case QStyle::PE_IndicatorArrowLeft: // to change
+    case QStyle::PE_IndicatorArrowLeft: {
       correct = true;
+    } // fall through!
     case QStyle::PE_IndicatorArrowRight: {
       int widthArr2 = (int)(deltaX/3.);
       if ( correct )
@@ -392,8 +394,9 @@ void Style_Tools::drawArrow( QStyle::PrimitiveElement type, QPainter* p, const Q
       x11 = deltaX; y11 = deltaY; x12 = -deltaX; y12 = -deltaY;
       break;
     }
-    case QStyle::PE_IndicatorSpinDown:
+    case QStyle::PE_IndicatorSpinDown: {
       correct = true;
+    } // fall through!
     case QStyle::PE_IndicatorSpinUp: {
       aDelta = (int)(deltaY/2);
       if ( correct ) {
@@ -447,8 +450,9 @@ void Style_Tools::drawSign( QStyle::PrimitiveElement type, QPainter* p, const QR
   p->translate( xc, yc );
   bool correct = false;
   switch( type ) {
-    case QStyle::PE_IndicatorSpinMinus:
+    case QStyle::PE_IndicatorSpinMinus: {
       correct = true;
+    } // fall through!
     case QStyle::PE_IndicatorSpinPlus: {
       aDelta = (int)(deltaY/2);
       if ( correct ) {
@@ -694,7 +698,7 @@ void Style_Tools::drawFocus( QPainter* p, const QPainterPath& path, const QColor
 */
 void Style_Tools::drawSlider( QPainter* p, const QRect& r, const double rad,
                               SliderType type, const QColor& light, const QColor& dark,
-                              const QColor& border_top, const QColor& border_bot )
+                              const QColor& /*border_top*/, const QColor& border_bot )
 {
   p->save();
   QPainterPath path, bottomPath;
index 1be827f46c8191ce4db8bcbe3598575ddad384e9..c0cb8f472e27f6ea10b6dccaa5d1067a7f290aa4 100644 (file)
 bool ToolsGUI::GetVisibility( _PTR(SObject) theObj,
                               void*         theId )
 {
+  // todo: this function seems to be not used
   _PTR(GenericAttribute) anAttr;
   if ( theObj && theObj->FindAttribute( anAttr, "AttributeGraphic" ) )
   {
     _PTR(AttributeGraphic) aGraphic (anAttr);
-    return aGraphic->GetVisibility( (unsigned long)theId );
+    return aGraphic->GetVisibility( int(reinterpret_cast<long long>(theId)) ); // todo: unsafe - converting pointer to int can give non-unique result
   }
 
   return false;
@@ -62,6 +63,7 @@ bool ToolsGUI::SetVisibility( const char* theEntry,
                               const bool  theValue,
                               void*       theId )
 {
+  // todo: this function seems to be not used
   _PTR(Study) aStudy = ClientFactory::Study(KERNEL::getStudyServant());
   _PTR(SObject) anObj ( aStudy->FindObjectID( theEntry ) );
 
@@ -71,13 +73,13 @@ bool ToolsGUI::SetVisibility( const char* theEntry,
     if ( anObj->FindAttribute( aGAttr, "AttributeGraphic" ) )
     {
       _PTR(AttributeGraphic) anAttr ( aGAttr );
-      anAttr->SetVisibility( (unsigned long)theId, theValue );
+      anAttr->SetVisibility( int(reinterpret_cast<long long>(theId)), theValue ); // todo: unsafe - converting pointer to int can give non-unique result
     }
     else if ( theValue )
     {
       _PTR(StudyBuilder) aBuilder (aStudy->NewBuilder());
       _PTR(AttributeGraphic) anAttr (aBuilder->FindOrCreateAttribute(anObj, "AttributeGraphic"));
-      anAttr->SetVisibility( (unsigned long)theId, theValue );
+      anAttr->SetVisibility( int(reinterpret_cast<long long>(theId)), theValue ); // todo: unsafe - converting pointer to int can give non-unique result
     }
     return true;
   }
index bb7c0a44811b9d22be9d2753c0626649fa1920cf..886d7f194b6d916c0c3fea697bb7d8af3df026f3 100644 (file)
@@ -140,7 +140,7 @@ static Registry::Components_ptr GetRegistry( CORBA::ORB_ptr orb )
     if ( CORBA::is_nil( object ) ) throw CommException( "Unable to find the Registry service" );
     aRegistry = Registry::Components::_narrow( object );
   }
-  catch( const CORBA::Exception& ex )
+  catch( const CORBA::Exception& /*ex*/ ) //!< TODO: unused variable
   {
     MESSAGE( "Error: can't access Registry server" );
   }
@@ -279,7 +279,7 @@ ToolsGUI_RegWidget::ToolsGUI_RegWidget( CORBA::ORB_ptr orb, QWidget* parent )
 ToolsGUI_RegWidget::~ToolsGUI_RegWidget()
 {
   myRegWidgetPtr = 0;
-};
+}
 
 /*!
   \brief Get description text, containing information about the service.
@@ -351,7 +351,7 @@ void ToolsGUI_RegWidget::refresh()
 
     // update current services list
     myViews[Clients]->clear();
-    for ( int i = 0; i < myData[Clients]->length(); i++ ) {
+    for ( int i = 0; i < (int)myData[Clients]->length(); i++ ) { //!< TODO: mismatch signed/unsigned
       const Registry::Infos& c_info = (*myData[Clients])[i];
       time_t aStarted  = time_t( c_info.tc_start );
       time_t aLastPing = time_t( c_info.tc_hello );
@@ -367,7 +367,7 @@ void ToolsGUI_RegWidget::refresh()
 
     // update history
     myViews[History]->clear();
-    for ( int i = 0; i < myData[History]->length(); i++ ) {       
+    for ( int i = 0; i < (int)myData[History]->length(); i++ ) {  //!< TODO: mismatch signed/unsigned     
       const Registry::Infos& c_info = (*myData[History])[i];
       time_t aStarted  = time_t( c_info.tc_start );
       time_t aFinished = time_t( c_info.tc_end );
index 08d4394af13bc9d2a8efb2cd1b4d6a098a2a536c..d86c185352e02a7cc47911aa7c1ebbc6eed7991f 100644 (file)
@@ -52,10 +52,10 @@ public:
 
   
 protected:
-  virtual void preprocess(QStringList itemNameIdList) {
+  virtual void preprocess(QStringList /*itemNameIdList*/) {
       // Implement something to be executed at the begining of the process function
   };
-  virtual void postprocess(QStringList itemNameIdList) {
+  virtual void postprocess(QStringList /*itemNameIdList*/) {
       // Implement something to be executed at the end of the process function
   };
   // Implement what must be done with each DataObject during the process function
index a34ec6c044210ef0f5c5d0054914e22a084aa3dd..845f27068d004b7c0daee3c56231b2106200fb76 100644 (file)
@@ -116,7 +116,7 @@ void DockWidgets::setDataView(QTreeView * dataView) {
   _dwDataPanel->setWidget(_tvDataView);
 }
 
-void DockWidgets::setPropertiesView(QTreeView * propertiesView) {
+void DockWidgets::setPropertiesView(QTreeView * /*propertiesView*/) {
   // Not implemented yet
 }
 
index 67182851bc3fb77a8cec4bcf14d055d8ee7a5484..5d8b942e71610010aabb806f96f7f055bb85a734 100644 (file)
@@ -72,7 +72,7 @@ void TEST_DataModel() {
 //
 // =================================================================
 //
-int main(int argc, char * argv[ ])
+int main()
 {
   TEST_DataObject();
   //TEST_DataModel();
index 72c1314b4f57437a3dea6f150d19fe1b82ce46ad..a9c0c69a62b50666fa9fd6594638b0ad96c74ba7 100644 (file)
@@ -143,7 +143,7 @@ DataModel * TreeGuiManager::getDataModel() {
  */
 
 void TreeGuiManager::processItemList(QStringList itemNameIdList,
-                                    int actionId)
+                                    int /*actionId*/)
 {
   // WARN: THIS IS A DEFAULT IMPLEMENTATION GIVEN FOR DEMONSTRATION
   // OF WHAT TO DO WITH THE PARAMETERS
index 2d7c6583c8433dc951c90450bc3110b03c06b9ec..c59ef953131af2a598bdfbce56f906524801c998 100644 (file)
@@ -41,8 +41,8 @@ TreeView::TreeView(QWidget * parent)
   _lastActionId = 0;
 
   // Default actions for tests
-  int displayActionId = addAction(QObject::tr("Afficher"));
-  int editActionId    = addAction(QObject::tr("Editer"));
+  /*int displayActionId = */addAction(QObject::tr("Afficher"));
+  /*int editActionId    = */addAction(QObject::tr("Editer"));
 }
 
 TreeView::~TreeView() {
index 309fc81013c75009c5c60cf84eba25a4e4aaff2d..49e98cbac058150fb09a540442172119bca1d6dc 100644 (file)
@@ -54,7 +54,7 @@ int VTKViewer_POINT_SIZE = 5;
 int VTKViewer_LINE_WIDTH = 3;
 
 
-vtkStandardNewMacro(VTKViewer_Actor);
+vtkStandardNewMacro(VTKViewer_Actor)
 
 /*!
   Constructor
@@ -93,7 +93,7 @@ VTKViewer_Actor
 
   myTransformFilter->Delete();
 
-  for(int i = 0, iEnd = myPassFilter.size(); i < iEnd; i++)
+  for(size_t i = 0, iEnd = myPassFilter.size(); i < iEnd; i++)
     if(myPassFilter[i])
       myPassFilter[i]->Delete();
   
@@ -637,7 +637,7 @@ VTKViewer_Actor
 */
 void
 VTKViewer_Actor
-::SetMaterial(std::vector<vtkProperty*> theProps)
+::SetMaterial(std::vector<vtkProperty*> /*theProps*/)
 {
 }
 
@@ -770,4 +770,4 @@ vtkDataSet* VTKViewer_Actor::GetHighlightedDataSet() {
 
 
 
-vtkCxxSetObjectMacro(VTKViewer_Actor,PreviewProperty,vtkProperty);
+vtkCxxSetObjectMacro(VTKViewer_Actor,PreviewProperty,vtkProperty)
index fe6d2f0c10c899caca3bddd941d4daa937dcc28f..805eaca23dcb7958f39ba4f5f97a2d439d4da3e7 100644 (file)
@@ -76,7 +76,7 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
  public:
   static VTKViewer_Actor* New();
   
-  vtkTypeMacro(VTKViewer_Actor,vtkLODActor);
+  vtkTypeMacro(VTKViewer_Actor,vtkLODActor)
 
   //----------------------------------------------------------------------------
   //! Get its name
@@ -319,7 +319,7 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
   //! Is notified on enabling/disabling selection
   virtual
   void
-  EnableSelection( bool enable ) {}
+  EnableSelection( bool /*enable*/ ) {}
 
   //! Ask, if the descendant of the VTKViewer_Actor will implement its own highlight or not
   virtual
index 4011302e15908af1f0309da971a0decd359f7ae8..02f9195cda31670fe869aea55450fd58e157c149 100644 (file)
@@ -44,7 +44,7 @@
   #endif
 #endif
 
-vtkStandardNewMacro(VTKViewer_AppendFilter);
+vtkStandardNewMacro(VTKViewer_AppendFilter)
 
 VTKViewer_AppendFilter
 ::VTKViewer_AppendFilter() 
@@ -149,7 +149,7 @@ namespace
   {
     theInputID = theInputDataSetID = -1;
 
-    vtkIdType aNbInputs = theRanges.size();
+    vtkIdType aNbInputs = (int)theRanges.size(); //!< TODO: conversion from size_t to int
     if(theInputDataSetID < 0 || theInputDataSetID >= aNbInputs)
       return -1;
     
@@ -201,7 +201,7 @@ namespace
       return;
 
     vtkIdType aStartId = 0;
-    vtkIdType aNbInputs = theRanges.size();
+    vtkIdType aNbInputs = (int)theRanges.size(); //!< TODO: conversion from size_t to int
     for(vtkIdType aDataSetId = 0; aDataSetId < aNbInputs; ++aDataSetId){
       vtkIdType aRange = theRanges[aDataSetId];
       if(aRange > theOutputID){
index 25eb9e81d1e3f9d2f01556308895c752d33bcb2e..449f25d31bebd68f4f8da79d04480684ea24b6b9 100644 (file)
@@ -49,7 +49,7 @@ public:
   /*! \fn vtkTypeMacro(VTKViewer_AppendFilter, vtkAppendFilter)
    *  \brief VTK type revision macros.
    */
-  vtkTypeMacro(VTKViewer_AppendFilter, vtkAppendFilter);
+  vtkTypeMacro(VTKViewer_AppendFilter, vtkAppendFilter)
 
   void SetDoMappingFlag(const bool theFlag);
 
index 0f84d9056fed010af1ce0fd0c9c55e42c3aa40d4..ef848bda1ebcf89029e9db75dff2a803c9634059 100644 (file)
@@ -227,8 +227,8 @@ VTKViewer_ArcBuilder::VTKViewer_ArcBuilder(const Pnt& thePnt1,
                                            const Pnt& thePnt2,
                                            const Pnt& thePnt3,
                                            double theAngle):
-  myStatus(Arc_Error),
-  myAngle(theAngle)
+  myAngle(theAngle),
+  myStatus(Arc_Error)
 {
   Vec V1(thePnt2.GetXYZ().X()-thePnt1.GetXYZ().X(),
          thePnt2.GetXYZ().Y()-thePnt1.GetXYZ().Y(),
@@ -357,7 +357,7 @@ VTKViewer_ArcBuilder::~VTKViewer_ArcBuilder()
  */
 vtkUnstructuredGrid* VTKViewer_ArcBuilder::BuildGrid(const PntList& theList) const
 {
-  int aListsize = theList.size();  
+  int aListsize = (int)theList.size(); //!< TODO: conversion from size_t to int
   vtkUnstructuredGrid* aGrid = NULL;
   
   if(aListsize != 0) {
@@ -560,22 +560,22 @@ const std::vector<double>& VTKViewer_ArcBuilder::GetScalarValues()
 }
 
 VTKViewer_ArcBuilder::IncOrder VTKViewer_ArcBuilder::GetArcAngle( const double& P1, const double& P2, const double& P3,double* Ang){
-  IncOrder aResult;
+  IncOrder aResult = MINUS;
   if(P1 < P2 && P2 < P3){
     *Ang = P3 - P1;
-    aResult = VTKViewer_ArcBuilder::PLUS;
+    aResult = PLUS;
   }
   else if((P1 < P3 && P3 < P2) || (P2 < P1 && P1 < P3)){
     *Ang = 2*vtkMath::Pi() - P3 + P1;
-    aResult = VTKViewer_ArcBuilder::MINUS;
+    aResult = MINUS;
   }
   else if((P2 < P3 && P3 < P1) || (P3 < P1 && P1 < P2)){
     *Ang = 2*vtkMath::Pi() - P1 + P3;
-    aResult = VTKViewer_ArcBuilder::PLUS;
+    aResult = PLUS;
   }
   else if(P3 < P2 && P2 < P1){
     *Ang = P1 - P3;
-    aResult = VTKViewer_ArcBuilder::MINUS;
+    aResult = MINUS;
   }
   return aResult;
 }
@@ -597,7 +597,6 @@ vtkIdType Build1DArc(vtkIdType cellId, vtkUnstructuredGrid* input,
                      double myMaxArcAngle){
   
   vtkIdType aResult = -1;
-  vtkIdType *aNewPoints;
 
   vtkDataArray* inputScalars = input->GetPointData()->GetScalars();
   vtkDataArray* outputScalars = output->GetPointData()->GetScalars();
index b497d52eda3ccea063e77550e38579eb5dd2621b..f6058d000e536463368090d45617cc7e8f1d5840 100644 (file)
@@ -33,7 +33,7 @@
 #include <vtkPolyData.h>
 #include <vtkCellArray.h>
 
-vtkStandardNewMacro(VTKViewer_CellCenters);
+vtkStandardNewMacro(VTKViewer_CellCenters)
 
 /*!
  * Class       : VTKViewer_CellCenters
index 05d0e010a54a330126f83b4305fff03457e8298d..b0b0ec848520fd6b192c9af565152515d9effbf4 100644 (file)
@@ -39,7 +39,7 @@
 class VTKVIEWER_EXPORT VTKViewer_CellCenters : public vtkCellCenters
 {
 public:
-  vtkTypeMacro(VTKViewer_CellCenters,vtkCellCenters);
+  vtkTypeMacro(VTKViewer_CellCenters,vtkCellCenters)
 
   static VTKViewer_CellCenters *New();
 
index 315c60e67c804cbbae278c8cc92d58584787f98d..c950608323de57b1d8897efb3042c189d882f67a 100644 (file)
@@ -28,4 +28,4 @@
 
 #include <vtkObjectFactory.h>
 
-vtkStandardNewMacro(VTKViewer_CellLocationsArray);
+vtkStandardNewMacro(VTKViewer_CellLocationsArray)
index d7869ed1886b958106029eab273347f119cca6f7..e3db50ac3d0a9c51bd8c0f3ad4c713fa4b1496fd 100644 (file)
@@ -39,7 +39,7 @@ struct VTKVIEWER_EXPORT VTKViewer_CellLocationsArray : TCellLocationsArray
 {
   static VTKViewer_CellLocationsArray* New();
   
-  vtkTypeMacro(VTKViewer_CellLocationsArray,TCellLocationsArray);
+  vtkTypeMacro(VTKViewer_CellLocationsArray,TCellLocationsArray)
 };
 
 #undef TCellLocationsArray
index e8cd08c572a4680782520f36fd2e7f8ba5e0d420..ef39a661dcb1988e934987b242aec2037a4f7beb 100644 (file)
@@ -405,7 +405,7 @@ VTKViewer_Triangulator
             if(DEBUG_TRIA_EXECUTE) cout  << "; Added = FALSE" << endl;
           }
         }
-        int aNbPoints = aPointIds.size();
+        int aNbPoints = (int)aPointIds.size(); //!< TODO: conversion from size_t to int
         aCenter[0] /= aNbPoints;
         aCenter[1] /= aNbPoints;
         aCenter[2] /= aNbPoints;
@@ -523,7 +523,7 @@ VTKViewer_Triangulator
         }
 
         if(!aSortedPointIds.empty()){
-          int aNumFacePts = aSortedPointIds.size();
+          int aNumFacePts = (int)aSortedPointIds.size(); //!< TODO: conversion from size_t to int
           ::TConnectivities aConnectivities(aNumFacePts);
           TSortedPointIds::const_iterator anIter = aSortedPointIds.begin();
           TSortedPointIds::const_iterator anEndIter = aSortedPointIds.end();
@@ -544,7 +544,7 @@ VTKViewer_Triangulator
 
   // To check, whether the polygons give a convex polyhedron or not
   if(theIsCheckConvex){
-    int aNbPolygons = aPolygons.size();
+    int aNbPolygons = (int)aPolygons.size(); //!< TODO: conversion from size_t to int
     for (int aPolygonId = 0; aPolygonId < aNbPolygons; aPolygonId++) {
       ::TPolygon& aPolygon = aPolygons[aPolygonId];
       double* aNormal = aPolygon.myNormal;
@@ -569,7 +569,7 @@ VTKViewer_Triangulator
 
   // To pass resulting set of the polygons to the output
   {
-    int aNbPolygons = aPolygons.size();
+    int aNbPolygons = (int)aPolygons.size(); //!< TODO: conversion from size_t to int
     for (int aPolygonId = 0; aPolygonId < aNbPolygons; aPolygonId++) {
       ::TPolygon& aPolygon = aPolygons[aPolygonId];
       if(DEBUG_TRIA_EXECUTE) cout << "PoilygonId="<<aPolygonId<<" | ";
@@ -579,7 +579,7 @@ VTKViewer_Triangulator
           cout << aConnectivities[i] << ",";
         cout << endl;
       }
-      int aNbPoints = aConnectivities.size();
+      int aNbPoints = (int)aConnectivities.size(); //!< TODO: conversion from size_t to int
       vtkIdType aNewCellId = theOutput->InsertNextCell(VTK_POLYGON,aNbPoints,&aConnectivities[0]);
       if(theStoreMapping)
         VTKViewer_GeometryFilter::InsertId( theCellId, VTK_POLYGON, theVTK2ObjIds, theDimension2VTK2ObjIds );
index 45878797ea90237cbd27bfe79856ebdda8d38a7d..e5862952df31d0c216ce6a67e9f2dc6c6b367940 100644 (file)
@@ -23,7 +23,7 @@
 #include <vtkDataSetSurfaceFilter.h>
 #include <vtkObjectFactory.h>
 
-vtkStandardNewMacro(VTKViewer_DataSetMapper);
+vtkStandardNewMacro(VTKViewer_DataSetMapper)
 
 //----------------------------------------------------------------------------
 VTKViewer_DataSetMapper::VTKViewer_DataSetMapper()
index 316aeadaf11f439736937b847072a222e21cc70a..8515d5f3c9d0807f67cb155a082b1dddb2b817d9 100644 (file)
@@ -29,7 +29,7 @@ class VTKVIEWER_EXPORT VTKViewer_DataSetMapper : public vtkDataSetMapper
 {
 public:
   static VTKViewer_DataSetMapper *New();
-  vtkTypeMacro(VTKViewer_DataSetMapper,vtkDataSetMapper);
+  vtkTypeMacro(VTKViewer_DataSetMapper,vtkDataSetMapper)
 
   //! Set point marker enabled
   void SetMarkerEnabled( bool );
index 5cd12e23f0fce26bfecb59fa3b6e6516fdfe0e47..0b392acaa33e9d757ac1dfd57e08c34e9a992f2f 100644 (file)
@@ -47,7 +47,7 @@
 
 #define VTK_XVERSION (VTK_MAJOR_VERSION*10000+VTK_MINOR_VERSION*100+VTK_BUILD_VERSION)
 
-vtkStandardNewMacro(VTKViewer_ExtractUnstructuredGrid);
+vtkStandardNewMacro(VTKViewer_ExtractUnstructuredGrid)
 
 
 VTKViewer_ExtractUnstructuredGrid::VTKViewer_ExtractUnstructuredGrid():
@@ -287,9 +287,9 @@ inline int InsertCell(vtkUnstructuredGrid *theInput,
                       vtkIdTypeArray*& theFaces,
                       vtkIdTypeArray*& theFaceLocations,
                       vtkIdType theCellId,
-                      vtkIdList *theIdList,
+                      vtkIdList* /*theIdList*/,
                       bool theStoreMapping,
-                      vtkIdType theOutId,
+                      vtkIdType /*theOutId*/,
                       VTKViewer_ExtractUnstructuredGrid::TVectorId& theOut2InId/*,
                       VTKViewer_ExtractUnstructuredGrid::TMapId& theIn2OutId*/)
 {
@@ -346,7 +346,7 @@ inline void InsertPointCell(vtkCellArray *theConnectivity,
                             vtkIdType theCellId,
                             vtkIdList *theIdList,
                             bool theStoreMapping,
-                            vtkIdType theOutId
+                            vtkIdType /*theOutId*/
                             VTKViewer_ExtractUnstructuredGrid::TVectorId& theOut2InId/*,
                             VTKViewer_ExtractUnstructuredGrid::TMapId& theIn2OutId*/)
 {
index c64e28d70e1e60381a2bf1f707347d59b03cd662..64ff52fa04c27743459d67d7e874f25a3c38a526 100644 (file)
@@ -45,7 +45,7 @@ class VTKVIEWER_EXPORT VTKViewer_ExtractUnstructuredGrid : public vtkUnstructure
 {
 public:
   //! VTK type macros.
-  vtkTypeMacro( VTKViewer_ExtractUnstructuredGrid, vtkUnstructuredGridAlgorithm );
+  vtkTypeMacro( VTKViewer_ExtractUnstructuredGrid, vtkUnstructuredGridAlgorithm )
 
   //! \brief Construct with all types of clipping turned off.
   static VTKViewer_ExtractUnstructuredGrid *New();
index c7aa3ba3657fe580b778f8690efc01a8f178bc6f..4dd15b106f8a96c59bce2ef7f8a692ba115ab96c 100644 (file)
@@ -35,7 +35,7 @@
 
 class VTKViewer_Actor;
 
-DEFINE_STANDARD_HANDLE(VTKViewer_Filter, Standard_Transient);
+DEFINE_STANDARD_HANDLE(VTKViewer_Filter, Standard_Transient)
 
 /*
   Class       : VTKViewer_Filter
index d810958ce392a486219e125e2a6ad72d35acfdad..4b4ac0d632e89dce751cf23f091874563e72af32 100644 (file)
@@ -63,7 +63,7 @@ namespace
 }
 
 //==================================================================
-vtkStandardNewMacro(VTKViewer_FramedTextActor);
+vtkStandardNewMacro(VTKViewer_FramedTextActor)
 
 //==================================================================
 // function : VTKViewer_FramedTextActor
index 1999c5c772170990d3b063f69e2364c8d111f2d0..0035441a046cbe7c2b6d84bf6ff113dccc799a44 100644 (file)
@@ -41,7 +41,7 @@ public:
   enum LayoutType { Vertical = 0, Horizontal };
 
 public:
-  vtkTypeMacro(VTKViewer_FramedTextActor,vtkActor2D);
+  vtkTypeMacro(VTKViewer_FramedTextActor,vtkActor2D)
   static VTKViewer_FramedTextActor *New();
 
   virtual int                 RenderOpaqueGeometry(vtkViewport*);
index c273927ac245a4c8eb419f0b61c320d65131113a..a4ce3be23c0d5b1610d4e8dea2cb11144fbc2001 100644 (file)
@@ -92,7 +92,7 @@
 #endif
 ///////////////////////////////////////////////////////////////////////////////////////////////
 
-vtkStandardNewMacro(VTKViewer_GeometryFilter);
+vtkStandardNewMacro(VTKViewer_GeometryFilter)
 
 VTKViewer_GeometryFilter
 ::VTKViewer_GeometryFilter():
@@ -180,7 +180,7 @@ int
 VTKViewer_GeometryFilter
 ::UnstructuredGridExecute(vtkDataSet *dataSetInput,
                           vtkPolyData *output,
-                          vtkInformation *outInfo)
+                          vtkInformation */*outInfo*/)
 {
   vtkUnstructuredGrid *input= (vtkUnstructuredGrid *)dataSetInput;
   vtkCellArray *Connectivity = input->GetCells();
@@ -1229,7 +1229,7 @@ void
 VTKViewer_GeometryFilter
 ::InsertId( const vtkIdType theCellId,
             const vtkIdType theCellType,
-            TVectorId& theVTK2ObjIds,
+            TVectorId& /*theVTK2ObjIds*/,
             TMapOfVectorId& theDimension2VTK2ObjIds )
 {
   //theVTK2ObjIds.push_back( theCellId );
index 7f60f5fab53cf74a63a99aa12f695387eb8d1a86..9a641896f382353d592089a8f20b43940d8927e0 100644 (file)
@@ -48,7 +48,7 @@ public:
   /*! \fn vtkTypeMacro(VTKViewer_GeometryFilter, vtkGeometryFilter)
    *  \brief VTK type revision macros.
    */
-  vtkTypeMacro(VTKViewer_GeometryFilter, vtkGeometryFilter);
+  vtkTypeMacro(VTKViewer_GeometryFilter, vtkGeometryFilter)
   /*! \fn void SetInside(int theShowInside)
    * \brief Sets \a myShowInside flag. \a myShowInside is changed, call this->Modified().
    * \param theShowInside - used for changing value of \a myShowInside variable.
@@ -112,7 +112,7 @@ public:
 
   static void InsertId( const vtkIdType theCellId,
                         const vtkIdType theCellType,
-                        TVectorId& theVTK2ObjIds,
+                        TVectorId& /*theVTK2ObjIds*/,
                         TMapOfVectorId& theDimension2VTK2ObjIds );
 
 protected:
index cd67ed70ce09de02dcef5b84291edb8f600d644d..0a74de2ef24ba0bf49d95632123e8265a2e7c824 100644 (file)
@@ -74,7 +74,7 @@ static int GetEdgeId(vtkPicker *thePicker, SALOME_Actor *theActor, int theObjId)
 }
 */
 
-vtkStandardNewMacro(VTKViewer_InteractorStyle);
+vtkStandardNewMacro(VTKViewer_InteractorStyle)
 
 
 /*!Constructor.*/
@@ -1197,7 +1197,7 @@ void VTKViewer_InteractorStyle::onOperation(QPoint mousePos)
     {
       if (!myCursorState)
         setCursor(VTK_INTERACTOR_STYLE_CAMERA_SELECT);
-    }
+    } // fall through!
   case VTK_INTERACTOR_STYLE_CAMERA_FIT:
     {
       myOtherPoint = mousePos;
@@ -1221,7 +1221,7 @@ void VTKViewer_InteractorStyle::OnSelectionModeChanged()
 /*! called when user moves mouse inside viewer window and there is no active viewer operation \n
  * (!put necessary processing here!)
  */
-void VTKViewer_InteractorStyle::onCursorMove(QPoint mousePos) {
+void VTKViewer_InteractorStyle::onCursorMove(QPoint /*mousePos*/) {
   // processing highlighting
 //  SUIT_Study* anActiveStudy = SUIT_Application::getDesktop()->getActiveStudy();
 //  SALOME_Selection* Sel = SALOME_Selection::Selection( anActiveStudy->getSelection() );
index 5ecd8f23b147c58b8a13c9fecf385b7faafcbd0b..8a2fe13f77c2a726f798937ca329ba785d81c4d7 100644 (file)
@@ -72,7 +72,7 @@ class VTKVIEWER_EXPORT VTKViewer_InteractorStyle : public QObject, public vtkInt
 {
  public:
   static VTKViewer_InteractorStyle *New();
-  vtkTypeMacro(VTKViewer_InteractorStyle, vtkInteractorStyle);
+  vtkTypeMacro(VTKViewer_InteractorStyle, vtkInteractorStyle)
 
   virtual void SetInteractor(vtkRenderWindowInteractor *theInteractor);
   void setViewWnd(VTKViewer_ViewWindow* theViewWnd);
@@ -113,7 +113,7 @@ class VTKVIEWER_EXPORT VTKViewer_InteractorStyle : public QObject, public vtkInt
  protected:
   VTKViewer_InteractorStyle();
   ~VTKViewer_InteractorStyle();
-  VTKViewer_InteractorStyle(const VTKViewer_InteractorStyle&) {};
+  VTKViewer_InteractorStyle(const VTKViewer_InteractorStyle&): QObject(), vtkInteractorStyle() {};
   void operator=(const VTKViewer_InteractorStyle&) {};
 
   void RotateXY(int dx, int dy);
@@ -152,7 +152,7 @@ class VTKVIEWER_EXPORT VTKViewer_InteractorStyle : public QObject, public vtkInt
   void startRotate();
   void startFitArea();
   void startSpin();
-  void SetTDxStyle(vtkTDxInteractorStyle *tdxStyle) {}
+  void SetTDxStyle(vtkTDxInteractorStyle* /*tdxStyle*/) {}
   bool needsRedrawing();
 
  protected:
@@ -161,7 +161,7 @@ class VTKVIEWER_EXPORT VTKViewer_InteractorStyle : public QObject, public vtkInt
   virtual void onStartOperation();
   virtual void onFinishOperation();
   virtual void onOperation(QPoint mousePos);
-  virtual void onCursorMove(QPoint mousePos);
+  virtual void onCursorMove(QPoint /*mousePos*/);
   virtual void setCursor(const int operation);
 
   void drawRect();
index f23783936edf97b36371e920598f5c60ddbe0991..fe0f6e6ea1094732610d618df75299c0e95ef318 100644 (file)
@@ -72,7 +72,7 @@ namespace VTK
       aHeight++;
     }
 
-    if( theMarkerTexture.size() != aWidth * aHeight )
+    if( (int)theMarkerTexture.size() != aWidth * aHeight )
       return false;
 
     theMarkerTexture.push_front( aWidth );
index b40aeb7ba9f5d2876c7b22ed703e160e2539523d..696daedae516ba5c4b427661e9312575bb91e11c 100644 (file)
@@ -238,7 +238,7 @@ namespace GUI_OPENGL
                if( count > 0 )
                {
                  content = ( char* )malloc( sizeof( char ) * ( count + 1 ) );
-                 count = fread( content, sizeof( char ), count, file );
+                 count = (int)fread( content, sizeof( char ), count, file ); //!< TODO: conversion from size_t to int
                  content[ count ] = '\0';
                }
                fclose( file );
index 59706c968b54afe6de6926a57ca2626c7ed2e9a2..03314e672b617d5b3b636dcfc84c8ec88006c94d 100644 (file)
@@ -47,7 +47,7 @@
 
 #include <Basics_Utils.hxx>
 
-vtkStandardNewMacro(VTKViewer_OpenGLRenderer);
+vtkStandardNewMacro(VTKViewer_OpenGLRenderer)
 
 VTKViewer_OpenGLRenderer::VTKViewer_OpenGLRenderer()
 {
index c78d8e8f8213e3ce8f8a94613b18355f10af02a4..ed5e8e9fe2e5d8de1bddcf57b08c67c35d4728f9 100644 (file)
@@ -43,7 +43,7 @@ public:
 
 public:
   static VTKViewer_OpenGLRenderer *New();
-  vtkTypeMacro(VTKViewer_OpenGLRenderer,vtkOpenGLRenderer);
+  vtkTypeMacro(VTKViewer_OpenGLRenderer,vtkOpenGLRenderer)
 
   virtual void SetGradientType( const int );
 
index f4adef411a7f1a6e47221ac1ed9dc203976f6086..f5f7723230472b0d37c138e424a6b99419533607 100644 (file)
@@ -77,7 +77,7 @@ void * glXGetProcAddressARB (const GLubyte *name)
 #endif
 
 #ifndef VTK_IMPLEMENT_MESA_CXX
-vtkStandardNewMacro(VTKViewer_PolyDataMapper);
+vtkStandardNewMacro(VTKViewer_PolyDataMapper)
 #endif
 
 // some definitions for what the polydata has in it
@@ -103,13 +103,13 @@ typedef GLfloat TBall;
 
 
 
-void MessageCallback( GLenum source,
+void MessageCallback( GLenum /*source*/,
                       GLenum type,
-                      GLuint id,
+                      GLuint /*id*/,
                       GLenum severity,
-                      GLsizei length,
+                      GLsizei /*length*/,
                       const GLcharARB* message,
-                      const void* userParam )
+                      const void* /*userParam*/ )
 {
   fprintf( stderr, "GL CALLBACK: %s type = 0x%x, severity = 0x%x, message = %s\n",
            ( type == GL_DEBUG_TYPE_ERROR ? "** GL ERROR **" : "" ),
@@ -667,7 +667,7 @@ namespace VTK
 
     virtual
     void
-    get( TVertex& theVertex, vtkIdType thePointId, vtkIdType theCellId )
+    get( TVertex& theVertex, vtkIdType /*thePointId*/, vtkIdType /*theCellId*/ )
     {
       theVertex.r = myColor[0];
       theVertex.g = myColor[1];
@@ -715,7 +715,7 @@ namespace VTK
 
     virtual
     vtkIdType
-    GetTupleId( vtkIdType thePointId, vtkIdType theCellId )
+    GetTupleId( vtkIdType thePointId, vtkIdType /*theCellId*/ )
     {
       return thePointId;
     }
@@ -731,7 +731,7 @@ namespace VTK
 
     virtual
     vtkIdType
-    GetTupleId( vtkIdType thePointId, vtkIdType theCellId )
+    GetTupleId( vtkIdType /*thePointId*/, vtkIdType theCellId )
     {
       return theCellId;
     }
@@ -829,7 +829,6 @@ int VTKViewer_PolyDataMapper::Draw( vtkRenderer* ren, vtkActor* act )
 #else
 //-----------------------------------------------------------------------------
 void VTKViewer_PolyDataMapper::RenderPieceDraw( vtkRenderer* ren, vtkActor* act ) {
-  int noAbort = 1;
   if( (!this->MarkerEnabled || this->MarkerType == VTK::MT_NONE || !this->ImageData.GetPointer()) && !this->BallEnabled) {
     MAPPER_SUPERCLASS::RenderPieceDraw( ren, act );
     return;
index c8661cdbe7dc6aebefa72ec3aeca94eda830c9de..76272dbd4445be5901b71619e55499b6a9e46cb8 100644 (file)
@@ -66,7 +66,7 @@ public:
 
 public:
   static VTKViewer_PolyDataMapper* New();
-  vtkTypeMacro( VTKViewer_PolyDataMapper, MAPPER_SUPERCLASS );
+  vtkTypeMacro( VTKViewer_PolyDataMapper, MAPPER_SUPERCLASS )
 
   //! Set point marker enabled
   void SetMarkerEnabled( bool );
index 5ee5ac0f3cb838ea8dccdac65319b4e8688a60ec..5b6e571020f9b904a9311c447a20ac0d7d51f792 100644 (file)
@@ -62,13 +62,13 @@ VTKViewer_RenderWindow::~VTKViewer_RenderWindow()
 }
 
 /*!Call Render method for render window field.*/
-void VTKViewer_RenderWindow::paintEvent(QPaintEvent* theEvent
+void VTKViewer_RenderWindow::paintEvent(QPaintEvent* /*theEvent*/
 {
   myRW->Render();
 }
 
 /*!Resize render window.*/
-void VTKViewer_RenderWindow::resizeEvent(QResizeEvent* theEvent
+void VTKViewer_RenderWindow::resizeEvent(QResizeEvent* /*theEvent*/
 {
   int aWidth = myRW->GetSize()[0], aHeight = myRW->GetSize()[1];
   if(vtkRenderWindowInteractor* aRWI = myRW->GetInteractor())
index 3743b31429194990f0350b38204b9ccb16e87fb4..59933dcb53b1884a27386035adf178161381ba39 100644 (file)
@@ -462,14 +462,14 @@ void VTKViewer_RenderWindowInteractor::RightButtonReleased(const QMouseEvent *ev
 /*!Reaction on button pressed.
  *\warning Do nothing.
  */
-void VTKViewer_RenderWindowInteractor::ButtonPressed(const QMouseEvent *event) {
+void VTKViewer_RenderWindowInteractor::ButtonPressed(const QMouseEvent* /*event*/) {
   return ;
 }
 
 /*!Reaction on button released..
  *\warning Do nothing.
  */
-void VTKViewer_RenderWindowInteractor::ButtonReleased(const QMouseEvent *event) {
+void VTKViewer_RenderWindowInteractor::ButtonReleased(const QMouseEvent* /*event*/) {
   return ;
 }
 
@@ -577,7 +577,7 @@ void VTKViewer_RenderWindowInteractor::DisplayAll()
 }
 
 /*!Do nothing*/
-void VTKViewer_RenderWindowInteractor::Erase( VTKViewer_Actor* SActor, bool update)
+void VTKViewer_RenderWindowInteractor::Erase( VTKViewer_Actor* /*SActor*/, bool /*update*/)
 {
 }
 
@@ -632,7 +632,7 @@ void VTKViewer_RenderWindowInteractor::Display( VTKViewer_Actor* theActor, bool
 /*!
   default key press event (empty implementation)
 */
-void VTKViewer_RenderWindowInteractor::KeyPressed(QKeyEvent *event)
+void VTKViewer_RenderWindowInteractor::KeyPressed(QKeyEvent* /*event*/)
 {
   /// NOT_IMPLEMENTED
 }
index 63e9985dd60369178490fe02b986f3e3e2e6cb67..ca321e38cb70eaf5f3ea4ee852e98c2517445097 100644 (file)
@@ -61,7 +61,7 @@ class VTKVIEWER_EXPORT VTKViewer_RenderWindowInteractor : public QObject, public
 public:
   static VTKViewer_RenderWindowInteractor *New();
 
-  vtkTypeMacro(VTKViewer_RenderWindowInteractor,vtkRenderWindowInteractor);
+  vtkTypeMacro(VTKViewer_RenderWindowInteractor,vtkRenderWindowInteractor)
 
   void PrintSelf(ostream& os, vtkIndent indent);
 
@@ -163,16 +163,16 @@ public:
 
   void setViewWindow( VTKViewer_ViewWindow* theViewWnd );
 
-  void setCellData(const int& theIndex,
-                   VTKViewer_Actor* theMapActor,
-                   VTKViewer_Actor* theActor) {}
-  void setEdgeData(const int& theCellIndex,
-                   VTKViewer_Actor* theMapActor,
-                   const int& theEdgeIndex,
-                   VTKViewer_Actor* theActor ) {} //NB
-  void setPointData(const int& theIndex,
-                    VTKViewer_Actor* theMapActor,
-                    VTKViewer_Actor* theActor) {}
+  void setCellData(const int& /*theIndex*/,
+                   VTKViewer_Actor* /*theMapActor*/,
+                   VTKViewer_Actor* /*theActor*/) {}
+  void setEdgeData(const int& /*theCellIndex*/,
+                   VTKViewer_Actor* /*theMapActor*/,
+                   const int& /*theEdgeIndex*/,
+                   VTKViewer_Actor* /*theActor*/ ) {} //NB
+  void setPointData(const int& /*theIndex*/,
+                    VTKViewer_Actor* /*theMapActor*/,
+                    VTKViewer_Actor* /*theActor*/) {}
 
   typedef void (*TUpdateActor)(const TColStd_IndexedMapOfInteger& theMapIndex,
                                VTKViewer_Actor* theMapActor,
index f53a2ac1ba140a26ad3da262627f35dabd6ba397..9d7d8d6a3051e6f04aa867813a0fe3641bf03efc 100644 (file)
@@ -35,7 +35,7 @@
 #include <vtkInformation.h>
 #include <vtkInformationVector.h>
 
-vtkStandardNewMacro(VTKViewer_ShrinkFilter);
+vtkStandardNewMacro(VTKViewer_ShrinkFilter)
 
 /*!Constructor. Sets store mapping to zero.*/
 VTKViewer_ShrinkFilter::VTKViewer_ShrinkFilter(): 
index 90c47ff0aa0785ead2b8c1ab201912299129dfd3..b19c19a84b3e839054c45e76f96afd2ee4b70f13 100644 (file)
@@ -41,7 +41,7 @@ class VTKVIEWER_EXPORT VTKViewer_ShrinkFilter : public vtkShrinkFilter
 public:
   /*!Create new instance of VTKViewer_ShrinkFilter.*/
   static VTKViewer_ShrinkFilter *New();
-  vtkTypeMacro(VTKViewer_ShrinkFilter, vtkShrinkFilter);
+  vtkTypeMacro(VTKViewer_ShrinkFilter, vtkShrinkFilter)
 
   void SetStoreMapping(int theStoreMapping);
   /*!Gets store mapping flag.*/
index 8893414eaab170739cf7a073d02376fce9d1d235..8ac63b5414e5b6c11afa8d78763df74c3cad2379 100644 (file)
@@ -41,7 +41,7 @@
 #include "vtkOpenGL.h"
 #include <vtkObjectFactory.h>
 
-vtkStandardNewMacro(VTKViewer_Texture);
+vtkStandardNewMacro(VTKViewer_Texture)
 
 
 // ----------------------------------------------------------------------------
index 6dae20e229f1028354b70f51c176c5f58b8a88b5..231eaf93f4098c28e5ccd0c85e1845cb1f7f26a9 100644 (file)
@@ -39,7 +39,7 @@ public:
 
 public:
   static VTKViewer_Texture *New();
-  vtkTypeMacro(VTKViewer_Texture,vtkOpenGLTexture);
+  vtkTypeMacro(VTKViewer_Texture,vtkOpenGLTexture)
 
   virtual void Load(vtkRenderer *ren);
 
index dd8026bb8720aa2a5a2d5702f4182340e6d53534..1077e5818688aa6c62d33f73ac5b0707da9fade0 100644 (file)
@@ -33,7 +33,7 @@
 static double EPS = 10e-4;
 
 
-vtkStandardNewMacro(VTKViewer_Transform);
+vtkStandardNewMacro(VTKViewer_Transform)
 
 /*!Sets matrix scale.*/
 void VTKViewer_Transform::SetMatrixScale(double theScaleX, double theScaleY, double theScaleZ){ 
index 798114598b52d04f466e93ed449cf8473ec78af5..3f354ca616d54a295142f1f7f1d5fcbdaebf6a9d 100644 (file)
@@ -35,7 +35,7 @@ class VTKVIEWER_EXPORT VTKViewer_Transform : public vtkTransform
 public:
   /*!Create new instance of VTKViewer_Transform.*/
   static VTKViewer_Transform *New();
-  vtkTypeMacro( VTKViewer_Transform, vtkTransform );
+  vtkTypeMacro( VTKViewer_Transform, vtkTransform )
 
   int  IsIdentity();
   //merge with V2_2_0_VISU_improvements:void SetScale( float theScaleX, float theScaleY, float theScaleZ );
@@ -46,7 +46,7 @@ protected:
   /*!Constructor.*/
   VTKViewer_Transform() {/*!Do nothing*/}
   /*!Copy contructor.*/
-  VTKViewer_Transform(const VTKViewer_Transform&) {/*!Do nothing*/}
+  VTKViewer_Transform(const VTKViewer_Transform&): vtkTransform() {/*!Do nothing*/}
   /*!Destructor.*/
   ~VTKViewer_Transform() {/*!Do nothing*/}
 
index 11b71d08ac096f0048a6393510273bfbbdcb558a..88ac87a226f2ebebb543ffe7c3d7ab365b144ef1 100644 (file)
@@ -36,7 +36,7 @@
 #include <vtkInformation.h>
 #include <vtkInformationVector.h>
 
-vtkStandardNewMacro(VTKViewer_TransformFilter);
+vtkStandardNewMacro(VTKViewer_TransformFilter)
 
 /*!Execution method. Calculate output.*/
 int VTKViewer_TransformFilter::RequestData(
index 916b4b1387578d91f59c941f668ba7426f1a75ee..7a4b72ab47961df38f3a1788664def7f4eea6d20 100644 (file)
@@ -35,7 +35,7 @@ class VTKVIEWER_EXPORT VTKViewer_TransformFilter : public vtkTransformFilter
 public:
   /*!Create new instance of VTKViewer_TransformFilter.*/
   static VTKViewer_TransformFilter *New();
-  vtkTypeMacro(VTKViewer_TransformFilter,vtkTransformFilter);
+  vtkTypeMacro(VTKViewer_TransformFilter,vtkTransformFilter)
 
 protected:
   /*!Constructor.*/
@@ -43,7 +43,7 @@ protected:
   /*!Destructor.*/
   ~VTKViewer_TransformFilter() {/*!Do nothing*/}
   /*!Copy constructor.*/
-  VTKViewer_TransformFilter(const VTKViewer_TransformFilter&) {/*!Do nothing*/}
+  VTKViewer_TransformFilter(const VTKViewer_TransformFilter&): vtkTransformFilter() {/*!Do nothing*/}
   /*!Operator = */
   void operator=(const VTKViewer_TransformFilter&) {/*!Do nothing*/}
 
index a9691cb79b0a120445cbe351918646d9d64c8076..a4c94a60b1c54e8f66d38df7762b354b2f0df17e 100644 (file)
@@ -47,7 +47,7 @@
 // QT includes
 #include <QtGlobal>
 
-vtkStandardNewMacro(VTKViewer_UnScaledActor);
+vtkStandardNewMacro(VTKViewer_UnScaledActor)
 
 /*!Constructor*/
 VTKViewer_UnScaledActor::VTKViewer_UnScaledActor() 
@@ -105,14 +105,14 @@ void VTKViewer_UnScaledActor::Render(vtkRenderer *theRenderer)
   vtkFollower::Render(theRenderer);
 }
 
-vtkStandardNewMacro(VTKViewer_LineActor);
+vtkStandardNewMacro(VTKViewer_LineActor)
 
 #ifdef IPAL21440
 vtkCxxSetObjectMacro(VTKViewer_LineActor,LabelActor,vtkTextActor);
 #else
-vtkCxxSetObjectMacro(VTKViewer_LineActor,LabelActor,VTKViewer_UnScaledActor);
+vtkCxxSetObjectMacro(VTKViewer_LineActor,LabelActor,VTKViewer_UnScaledActor)
 #endif
-vtkCxxSetObjectMacro(VTKViewer_LineActor,ArrowActor,vtkFollower);
+vtkCxxSetObjectMacro(VTKViewer_LineActor,ArrowActor,vtkFollower)
 
 /*!Adds Label and Arrow actors to \a theRenderer.*/
 void VTKViewer_LineActor::Render(vtkRenderer *theRenderer)
@@ -354,11 +354,11 @@ protected:
   VTKViewer_XAxis();
   VTKViewer_XAxis(const VTKViewer_XAxis&);
 public:
-  vtkTypeMacro(VTKViewer_XAxis,VTKViewer_Axis);
+  vtkTypeMacro(VTKViewer_XAxis,VTKViewer_Axis)
   static VTKViewer_XAxis *New();
 };
 
-vtkStandardNewMacro(VTKViewer_XAxis);
+vtkStandardNewMacro(VTKViewer_XAxis)
 
 /*!Initialize X Axis*/
 VTKViewer_XAxis::VTKViewer_XAxis(){ 
@@ -380,11 +380,11 @@ protected:
   VTKViewer_YAxis();
   VTKViewer_YAxis(const VTKViewer_YAxis&);
 public:
-  vtkTypeMacro(VTKViewer_YAxis,VTKViewer_Axis);
+  vtkTypeMacro(VTKViewer_YAxis,VTKViewer_Axis)
   static VTKViewer_YAxis *New();
 };
 
-vtkStandardNewMacro(VTKViewer_YAxis);
+vtkStandardNewMacro(VTKViewer_YAxis)
 
 /*!Initialize Y Axis*/
 VTKViewer_YAxis::VTKViewer_YAxis()
@@ -408,11 +408,11 @@ protected:
   VTKViewer_ZAxis();
   VTKViewer_ZAxis(const VTKViewer_ZAxis&);
 public:
-  vtkTypeMacro(VTKViewer_ZAxis,VTKViewer_Axis);
+  vtkTypeMacro(VTKViewer_ZAxis,VTKViewer_Axis)
   static VTKViewer_ZAxis *New();
 };
 
-vtkStandardNewMacro(VTKViewer_ZAxis);
+vtkStandardNewMacro(VTKViewer_ZAxis)
 
 /*!Initialize Z Axis*/
 VTKViewer_ZAxis::VTKViewer_ZAxis()
@@ -427,7 +427,7 @@ VTKViewer_ZAxis::VTKViewer_ZAxis()
   SetColor(0.0,0.0,1.0);
 }
 
-vtkStandardNewMacro(VTKViewer_Trihedron);
+vtkStandardNewMacro(VTKViewer_Trihedron)
 
 /*!
   Constructor
index e2fe380d6a50f689e2e87c3ae48edacbf5ffd7cf..98718ac8c2b3920957686f9fd9fb732a7698d5ba 100644 (file)
@@ -65,7 +65,7 @@ class VTKVIEWER_EXPORT VTKViewer_UnScaledActor: public vtkFollower
   
 public:
   
-  vtkTypeMacro(VTKViewer_UnScaledActor,vtkFollower);
+  vtkTypeMacro(VTKViewer_UnScaledActor,vtkFollower)
   
   /*!Create new instance of VTKViewer_UnScaledActor.*/
   static VTKViewer_UnScaledActor *New();
@@ -91,7 +91,7 @@ class VTKVIEWER_EXPORT VTKViewer_LineActor: public vtkFollower
   
 public:
   /*!vtk type macros.*/
-  vtkTypeMacro(VTKViewer_LineActor,vtkFollower);
+  vtkTypeMacro(VTKViewer_LineActor,vtkFollower)
   
   /*!Create new instance of VTKViewer_LineActor.*/
   static VTKViewer_LineActor *New();
@@ -155,7 +155,7 @@ protected:
 
 public:
   /*!vtk type macros.*/
-  vtkTypeMacro(VTKViewer_Trihedron,vtkObject);
+  vtkTypeMacro(VTKViewer_Trihedron,vtkObject)
   
   /*!Create new instance of VTKViewer_Trihedron.*/
   static VTKViewer_Trihedron *New();
@@ -232,7 +232,7 @@ protected:
   
 public:
   /*!vtk type macros.*/
-  vtkTypeMacro(VTKViewer_Axis,vtkObject);
+  vtkTypeMacro(VTKViewer_Axis,vtkObject)
   
   /*! Add to \a theRenderer actors: myLineActor,myLabelActor,myArrowActor
    */
index b1070d9e90ede5d05366f457d701347d04c12be1..89d97c4c1753ee244de719452a18bf175a8d5e22 100644 (file)
@@ -31,7 +31,7 @@ class QtxAction;
 
 class VIEWERTOOLS_EXPORT ViewerTools_DialogBase : public QDialog
 {
-  Q_OBJECT;
+  Q_OBJECT
 
 public:
   ViewerTools_DialogBase(QtxAction* theAction,
index 598171467b4f93223143f7a96a43820faba20c2c..bf99b1156c2883552bd9ff0d68f364cf1aa36576 100644 (file)
@@ -102,7 +102,7 @@ void ViewerTools_FontWidgetBase::onColor()
 }
 
 void ViewerTools_FontWidgetBase::SetData( const QColor& theColor,
-                                          const int theFamily,
+                                          const int /*theFamily*/,
                                           const bool theBold,
                                           const bool theItalic,
                                           const bool theShadow )
@@ -115,7 +115,7 @@ void ViewerTools_FontWidgetBase::SetData( const QColor& theColor,
 }
 
 void ViewerTools_FontWidgetBase::GetData( QColor& theColor,
-                                          int& theFamily,
+                                          int& /*theFamily*/,
                                           bool& theBold,
                                           bool& theItalic,
                                           bool& theShadow ) const
index dfea9083f450c73f10f97ecd499e539d0d903aff..b63a69e35536e60959504faeb00339995dbd381e 100644 (file)
@@ -47,7 +47,7 @@ namespace
         throw CURVEPLOT::Exception(msg);
       }
   }
-};
+}
 
 namespace CURVEPLOT
 {
index b527cbb7644e2186de52743fdfe3368e90dffe42..bb7254ccaf64b0a41b2992faa9a4df08e743d5f6 100644 (file)
@@ -67,7 +67,7 @@ void TestCurvePlot::onClicked()
 //  std::string s = xx.toStdString();
 //  std::cout << "test xx: " << s << std::endl;
   std::cout << "setting X label " << CurvePlot::SetXLabel("tôtô") << std::endl;
-  PlotID crv_id = CurvePlot::AddCurve(xx, yy, ps_id, "the cérve", "th x", "the y-s", false);
+  /*PlotID crv_id = */CurvePlot::AddCurve(xx, yy, ps_id, "the cérve", "th x", "the y-s", false);
   std::cout << "setting X label " << CurvePlot::SetXLabel("tôtô") << std::endl;
 }
 
index 51df36c3361523f18313561454595f0f4593a39f..0e96b0a7712e9626b4fc8e7f85d69092de3479a7 100644 (file)
@@ -38,7 +38,7 @@ class QEventLoop;
 
 class PYCONSOLE_EXPORT PyConsole_Editor : public QTextEdit
 {
-  Q_OBJECT;
+  Q_OBJECT
 
 public:
   PyConsole_Editor( QWidget* = 0 );
index e09ea96b1129c721d70e04fa15a0a3f3168a6824..11dec0679366d2097c7e36e8c735f25039e219cd 100644 (file)
@@ -35,7 +35,7 @@
   \brief Constructor.
   \param parent Parent widget.
 */
-PyEditor_Widget::PyEditor_Widget( QWidget* parent )
+PyEditor_Widget::PyEditor_Widget( QWidget* parent ) : QWidget( parent )
 {
   // Create editor.
   myEditor = new PyEditor_Editor( this );
index 38369cc3840227d44a665e41f93e9054b10a9ac9..38f5223106460ea895f8dbe703cedb60bee8ce8b 100644 (file)
@@ -401,7 +401,7 @@ std::string
 __join(const std::vector<std::string>& v, int begin=0, int end=-1)
 {
   if (end == -1)
-    end = v.size();
+    end = (int)v.size(); //!< TODO: conversion from size_t to int
   std::stringstream ss;
   for (int i = begin; i < end; ++i) {
     if (i != begin)