From: jfa Date: Thu, 11 Aug 2011 13:23:23 +0000 (+0000) Subject: Porting to OCCT6.5.1 X-Git-Tag: OpenCV_demo1~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d1e63ead319ae2518f397a46786ea97581c6a88f;p=modules%2Fgui.git Porting to OCCT6.5.1 --- diff --git a/src/CAF/CAF_Study.cxx b/src/CAF/CAF_Study.cxx index f83afd4dc..5b1bf5fb5 100755 --- a/src/CAF/CAF_Study.cxx +++ b/src/CAF/CAF_Study.cxx @@ -18,13 +18,14 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// #include "CAF_Study.h" #include "CAF_Tools.h" #include "CAF_Application.h" +#include + #include #include #include @@ -106,7 +107,7 @@ bool CAF_Study::createDocument( const QString& doc ) if ( res && app && !app->stdApp().IsNull() ) { try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 +#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; #endif TColStd_SequenceOfExtendedString formats; @@ -147,7 +148,7 @@ bool CAF_Study::openDocument( const QString& fname ) bool status = false; try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 +#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; #endif status = app->Open( CAF_Tools::toExtString( fname ), myStdDoc ) == CDF_RS_OK; @@ -178,7 +179,7 @@ bool CAF_Study::saveDocumentAs( const QString& fname ) bool status = false; try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 +#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; #endif if ( save ) @@ -218,7 +219,7 @@ bool CAF_Study::openTransaction() bool res = true; try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 +#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; #endif if ( myStdDoc->HasOpenCommand() ) @@ -244,7 +245,7 @@ bool CAF_Study::abortTransaction() bool res = true; try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 +#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; #endif myStdDoc->AbortCommand(); @@ -267,7 +268,7 @@ bool CAF_Study::commitTransaction( const QString& name ) bool res = true; try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 +#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; #endif myStdDoc->CommitCommand(); @@ -372,7 +373,7 @@ bool CAF_Study::undo() return false; try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 +#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; #endif myStdDoc->Undo(); @@ -396,7 +397,7 @@ bool CAF_Study::redo() return false; try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 +#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; #endif myStdDoc->Redo(); diff --git a/src/CAF/Makefile.am b/src/CAF/Makefile.am index 70cd292f5..b07cad561 100755 --- a/src/CAF/Makefile.am +++ b/src/CAF/Makefile.am @@ -18,13 +18,12 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# # File : Makefile.in # Author : Vladimir Klyachin (OCN) # Module : caf # $Header$ -# + include $(top_srcdir)/adm_local/unix/make_common_starter.am lib_LTLIBRARIES = libcaf.la @@ -46,13 +45,14 @@ MOC_FILES = \ CAF_Application_moc.cxx \ CAF_Operation_moc.cxx \ CAF_Study_moc.cxx + nodist_libcaf_la_SOURCES = $(MOC_FILES) nodist_salomeres_DATA = \ CAF_msg_en.qm \ CAF_msg_fr.qm -libcaf_la_CPPFLAGS = $(QT_INCLUDES) $(CAS_CPPFLAGS) -I$(srcdir)/../STD -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx +libcaf_la_CPPFLAGS = $(QT_INCLUDES) $(CAS_CPPFLAGS) -I$(srcdir)/../CASCatch \ + -I$(srcdir)/../STD -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx libcaf_la_LDFLAGS = $(QT_MT_LIBS) $(CAS_OCAF) $(CAS_OCAFVIS) libcaf_la_LIBADD = ../Qtx/libqtx.la ../SUIT/libsuit.la ../STD/libstd.la - diff --git a/src/CASCatch/CASCatch_OCCTVersion.hxx b/src/CASCatch/CASCatch_OCCTVersion.hxx new file mode 100644 index 000000000..45b02a0ef --- /dev/null +++ b/src/CASCatch/CASCatch_OCCTVersion.hxx @@ -0,0 +1,40 @@ +// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + +// File : CASCatch.hxx +// Author : Julia DOROVSKIKH, Open CASCADE S.A.S (julia.dorovskikh@opencascade.com) + +#ifndef CASCATCH_OCCTVERSION_HXX +#define CASCATCH_OCCTVERSION_HXX + +#include + +#ifdef OCC_VERSION_SERVICEPACK +# define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK) +#else +# ifdef OCC_VERSION_DEVELOPMENT +# define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | 1) +# else +# define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8) +# endif +#endif + +#endif // CASCATCH_OCCTVERSION_HXX diff --git a/src/CASCatch/Makefile.am b/src/CASCatch/Makefile.am index 859fe8e91..f4b5321aa 100644 --- a/src/CASCatch/Makefile.am +++ b/src/CASCatch/Makefile.am @@ -18,18 +18,18 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# # File : Makefile.am # Author : Sergey RUIN, Open CASCADE S.A.S (sergey.ruin@opencascade.com) -# + include $(top_srcdir)/adm_local/unix/make_common_starter.am salomeinclude_HEADERS = CASCatch.hxx \ CASCatch_CatchSignals.hxx \ CASCatch_ErrorHandler.hxx \ - CASCatch_Failure.hxx + CASCatch_Failure.hxx \ + CASCatch_OCCTVersion.hxx lib_LTLIBRARIES = libCASCatch.la libCASCatch_la_SOURCES = \ diff --git a/src/DDS/DDS_Dictionary.cxx b/src/DDS/DDS_Dictionary.cxx index c52f2f9bb..6abf709c1 100644 --- a/src/DDS/DDS_Dictionary.cxx +++ b/src/DDS/DDS_Dictionary.cxx @@ -18,12 +18,13 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// #include "DDS_Dictionary.h" #include "DDS_KeyWords.h" +#include + #include #include @@ -551,7 +552,7 @@ Standard_Real DDS_Dictionary::ToSI( const Standard_Real theValue, const Standard if ( theUnits && *theUnits && strcmp( theUnits, "%" ) ) { try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 +#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; #endif aRetValue = UnitsAPI::AnyToSI( theValue, theUnits ); @@ -578,7 +579,7 @@ Standard_Real DDS_Dictionary::FromSI( const Standard_Real theValue, const Standa if ( theUnits && *theUnits && strcmp( theUnits, "%" ) ) { try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 +#if OCC_VERSION_LARGE > 0x06010000 OCC_CATCH_SIGNALS; #endif aRetValue = UnitsAPI::AnyFromSI( theValue, theUnits ); diff --git a/src/DDS/Makefile.am b/src/DDS/Makefile.am index 273c4116b..dba615090 100755 --- a/src/DDS/Makefile.am +++ b/src/DDS/Makefile.am @@ -18,13 +18,12 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# # File : Makefile.in # Author : Alexander SOLOVYOV (OCN) # Module : DDS # $Header: /home/server/cvs/GUI/GUI_SRC/src/DDS/Makefile.in -# + include $(top_srcdir)/adm_local/unix/make_common_starter.am lib_LTLIBRARIES = libDDS.la @@ -42,9 +41,6 @@ dist_libDDS_la_SOURCES = \ DDS_Dictionary.cxx \ DDS_KeyWords.cxx -libDDS_la_CPPFLAGS = $(CAS_CPPFLAGS) +libDDS_la_CPPFLAGS = $(CAS_CPPFLAGS) -I$(srcdir)/../CASCatch libDDS_la_LDFLAGS = $(CAS_KERNEL) $(CAS_OCAF) - - - diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index c1c5606cb..ba6000033 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -18,12 +18,11 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// // File: LightApp_Application.cxx // Created: 6/20/2005 18:39:45 PM // Author: Natalia Donis -// + #ifdef WNT // E.A. : On windows with python 2.6, there is a conflict // E.A. : between pymath.h and Standard_math.h which define @@ -56,6 +55,8 @@ #include "LightApp_DataObject.h" #include "LightApp_WgViewModel.h" +#include + #include #include @@ -184,12 +185,6 @@ #include -#ifdef OCC_VERSION_SERVICEPACK -#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK) -#else -#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8) -#endif - #define ToolBarMarker 0 #define DockWidgetMarker 1 diff --git a/src/LightApp/Makefile.am b/src/LightApp/Makefile.am index 32df37be9..cafedf19b 100755 --- a/src/LightApp/Makefile.am +++ b/src/LightApp/Makefile.am @@ -18,13 +18,12 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# # File : Makefile.in # Author : OCC team (OCN) # Module : LightApp # $Header$ -# + include $(top_srcdir)/adm_local/unix/make_common_starter.am EXTRA_DIST += images @@ -183,7 +182,8 @@ nodist_salomeres_DATA = \ libLightApp_la_CPPFLAGS = $(PYTHON_INCLUDES) $(QT_INCLUDES) $(CAS_CPPFLAGS) \ $(HDF5_INCLUDES) @KERNEL_CXXFLAGS@ -I$(srcdir)/../SUIT -I$(srcdir)/../STD \ -I$(srcdir)/../CAM -I$(srcdir)/../ObjBrowser -I$(srcdir)/../LogWindow \ - -I$(srcdir)/../Prs -I$(srcdir)/../Qtx -I$(srcdir)/../Event -I$(srcdir)/../Style + -I$(srcdir)/../Prs -I$(srcdir)/../Qtx -I$(srcdir)/../Event -I$(srcdir)/../Style \ + -I$(srcdir)/../CASCatch libLightApp_la_LDFLAGS = $(QT_MT_LIBS) if ENABLE_VTKVIEWER @@ -240,7 +240,7 @@ if ENABLE_VTKVIEWER endif else !ENABLE_SALOMEOBJECT libLightApp_la_CPPFLAGS += -DDISABLE_SALOMEOBJECT - + endif libLightApp_la_LIBADD = ../SUIT/libsuit.la ../STD/libstd.la ../CAM/libCAM.la \ diff --git a/src/OCCViewer/Makefile.am b/src/OCCViewer/Makefile.am index 1b13c944d..bd4f7becd 100755 --- a/src/OCCViewer/Makefile.am +++ b/src/OCCViewer/Makefile.am @@ -18,13 +18,12 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# # File : Makefile.in # Author : Vladimir Klyachin (OCN) # Module : OCCViewer # $Header$ -# + include $(top_srcdir)/adm_local/unix/make_common_starter.am lib_LTLIBRARIES = libOCCViewer.la @@ -126,7 +125,7 @@ nodist_salomeres_DATA = \ libOCCViewer_la_CPPFLAGS = $(QT_INCLUDES) $(OGL_INCLUDES) $(CAS_CPPFLAGS) \ -I$(srcdir)/../SUIT -I$(srcdir)/../ViewerTools -I$(srcdir)/../Qtx \ - -I$(srcdir)/../OpenGLUtils + -I$(srcdir)/../OpenGLUtils -I$(srcdir)/../CASCatch libOCCViewer_la_LDFLAGS = $(OGL_LIBS) $(QT_MT_LIBS) $(CAS_KERNEL) $(CAS_VIEWER) libOCCViewer_la_LIBADD = ../Qtx/libqtx.la ../SUIT/libsuit.la \ diff --git a/src/OCCViewer/OCCViewer_CubeAxesDlg.cxx b/src/OCCViewer/OCCViewer_CubeAxesDlg.cxx index b87d0d708..c2aa154b4 100644 --- a/src/OCCViewer/OCCViewer_CubeAxesDlg.cxx +++ b/src/OCCViewer/OCCViewer_CubeAxesDlg.cxx @@ -18,7 +18,6 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// #include "OCCViewer_CubeAxesDlg.h" @@ -29,18 +28,12 @@ #include "QtxAction.h" #include "QtxIntSpinBox.h" +#include + #include #include #include -#include - -#ifdef OCC_VERSION_SERVICEPACK -#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK) -#else -#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8) -#endif - /*! \class OCCViewer_CubeAxesDlg::AxisWidget \brief Axis tab widget of the "Graduated axis" dialog box diff --git a/src/OCCViewer/OCCViewer_ViewPort3d.cxx b/src/OCCViewer/OCCViewer_ViewPort3d.cxx index 7a5948356..f570b83b0 100755 --- a/src/OCCViewer/OCCViewer_ViewPort3d.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort3d.cxx @@ -18,7 +18,6 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// #include "OCCViewer_ViewPort3d.h" @@ -26,6 +25,8 @@ #include "OCCViewer_ViewWindow.h" #include "OCCViewer_ViewModel.h" +#include + #include #include @@ -52,13 +53,7 @@ static int sx = 0; static int sy = 0; static Standard_Boolean zRotation = Standard_False; -#include - -#ifdef OCC_VERSION_SERVICEPACK -#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK) -#else -#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8) -#endif +//#include /*! Constructor diff --git a/src/OCCViewer/OCCViewer_ViewWindow.cxx b/src/OCCViewer/OCCViewer_ViewWindow.cxx index c7746c51d..8b67dc1c4 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -18,11 +18,10 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// // File : OCCViewer_ViewWindow.cxx // Author : -// + #include "OCCViewer_ViewWindow.h" #include "OCCViewer_ViewModel.h" #include "OCCViewer_ViewPort3d.h" @@ -34,6 +33,8 @@ #include "OCCViewer_AxialScaleDlg.h" #include "OCCViewer_CubeAxesDlg.h" +#include + #include #include #include @@ -54,33 +55,28 @@ #include #include -#include -#include -#include -#include -#include - #include #include #include #include +#include #include -#include #include -#include #include #include #include -#include +#include +#include +#include -#ifdef OCC_VERSION_SERVICEPACK -#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK) -#else -#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8) -#endif +#include +#include +#include + +#include static QEvent* l_mbPressEvent = 0; @@ -1822,18 +1818,29 @@ void OCCViewer_ViewWindow::setCuttingPlane( bool on, const double x, const doub // try to use already existing plane or create a new one Handle(V3d_Plane) clipPlane; view->InitActivePlanes(); - if ( view->MoreActivePlanes() ) + + // calculate new a,b,c,d values for the plane + gp_Pln pln (gp_Pnt(x, y, z), gp_Dir(dx, dy, dz)); + double a, b, c, d; + pln.Coefficients(a, b, c, d); + +#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 + if (view->MoreActivePlanes()) { + clipPlane = view->ActivePlane(); + clipPlane->SetPlane(a, b, c, d); + } + else + clipPlane = new V3d_Plane (a, b, c, d); +#else + if (view->MoreActivePlanes()) clipPlane = view->ActivePlane(); else - clipPlane = new V3d_Plane( viewer ); + clipPlane = new V3d_Plane (viewer); - // set new a,b,c,d values for the plane - gp_Pln pln( gp_Pnt( x, y, z ), gp_Dir( dx, dy, dz ) ); - double a, b, c, d; - pln.Coefficients( a, b, c, d ); - clipPlane->SetPlane( a, b, c, d ); + clipPlane->SetPlane(a, b, c, d); +#endif - view->SetPlaneOn( clipPlane ); + view->SetPlaneOn(clipPlane); } else view->SetPlaneOff(); diff --git a/src/SalomeApp/Makefile.am b/src/SalomeApp/Makefile.am index 1be304fd1..45060daec 100755 --- a/src/SalomeApp/Makefile.am +++ b/src/SalomeApp/Makefile.am @@ -18,13 +18,12 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# # File : Makefile.in # Author : Vladimir Klyachin (OCN) # Module : SalomeApp # $Header$ -# + include $(top_srcdir)/adm_local/unix/make_common_starter.am if CPPUNIT_IS_OK diff --git a/src/SalomeApp/SalomeApp_ExceptionHandler.cxx b/src/SalomeApp/SalomeApp_ExceptionHandler.cxx index 2628a77ce..9d787ae3a 100644 --- a/src/SalomeApp/SalomeApp_ExceptionHandler.cxx +++ b/src/SalomeApp/SalomeApp_ExceptionHandler.cxx @@ -18,10 +18,11 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// #include "SalomeApp_ExceptionHandler.h" + #include "CASCatch.hxx" +#include "CASCatch_OCCTVersion.hxx" #include @@ -30,7 +31,7 @@ #include -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 +#if OCC_VERSION_LARGE > 0x06010000 #include #include #else @@ -54,7 +55,7 @@ SalomeApp_ExceptionHandler::SalomeApp_ExceptionHandler( const bool floatSignal ) /*!Try to call SUIT_ExceptionHandler::internalHandle(o, e), catch if failure.*/ bool SalomeApp_ExceptionHandler::handleSignals( QObject* o, QEvent* e ) { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 +#if OCC_VERSION_LARGE > 0x06010000 try { OCC_CATCH_SIGNALS; #else @@ -62,7 +63,7 @@ bool SalomeApp_ExceptionHandler::handleSignals( QObject* o, QEvent* e ) #endif SUIT_ExceptionHandler::internalHandle( o, e ); } -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 +#if OCC_VERSION_LARGE > 0x06010000 catch(Standard_Failure) { #else CASCatch_CATCH(Standard_Failure) { diff --git a/src/Session/Makefile.am b/src/Session/Makefile.am index a8d298a0f..506472893 100755 --- a/src/Session/Makefile.am +++ b/src/Session/Makefile.am @@ -18,14 +18,13 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# # SALOME Session : implementation of Session.idl # File : Makefile.in # Author : Paul RASCLE, EDF # Module : SALOME # $Header$ -# + include $(top_srcdir)/adm_local/unix/make_common_starter.am lib_LTLIBRARIES = libSalomeSession.la @@ -52,7 +51,7 @@ libSalomeSession_la_CPPFLAGS = $(QT_MT_INCLUDES) $(PYTHON_INCLUDES) \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ \ -I$(top_builddir)/idl \ -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT -I$(srcdir)/../Event \ - -I$(srcdir)/../Style @LIBXML_INCLUDES@ + -I$(srcdir)/../Style -I$(srcdir)/../CASCatch @LIBXML_INCLUDES@ if ENABLE_TESTRECORDER libSalomeSession_la_CPPFLAGS+= -DENABLE_TESTRECORDER $(TESTRECORDER_INCLUDES) diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index 849113e1c..82b17cf60 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -18,42 +18,32 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// // SALOME Session : implementation of Session.idl // File : SALOME_Session_Server.cxx // Author : Paul RASCLE, EDF // Module : SALOME -// -#include -#include -#include + #include #include -#include -#include -#include #include +#include + +#include + +#include +#include +#include #ifdef ENABLE_TESTRECORDER #include #endif -#include -#include -#include -#include -#include -#include -#include - +#include +#include +#include #include #include -#include - -#include -#include CORBA_SERVER_HEADER(SALOME_Session) -#include CORBA_SERVER_HEADER(SALOMEDS) #include #include "Session_ServerLauncher.hxx" @@ -61,7 +51,9 @@ #include #include + #include + #include #include #include @@ -69,7 +61,17 @@ #include #include -#include +#include +#include CORBA_SERVER_HEADER(SALOME_Session) +#include CORBA_SERVER_HEADER(SALOMEDS) + +#include +#include +#include +#include +#include +#include +#include /*! - read arguments, define list of server to launch with their arguments. * - wait for naming service @@ -272,7 +274,7 @@ public: virtual bool notify( QObject* receiver, QEvent* e ) { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) < 0x060101 +#if OCC_VERSION_LARGE < 0x06010100 // Disable GUI user actions while python command is executed if (SUIT_Session::IsPythonExecuted()) { // Disable mouse and keyboard events