#include <TDF_Delta.hxx>
#include <TDF_ListIteratorOfDeltaList.hxx>
+#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx>
/*!
if ( app && !app->stdApp().IsNull() )
{
try {
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+ OCC_CATCH_SIGNALS;
+#endif
TColStd_SequenceOfExtendedString formats;
- app->stdApp()->Formats( formats );
+ app->stdApp()->Formats( formats );
if ( !formats.IsEmpty() )
app->stdApp()->NewDocument( formats.First(), myStdDoc );
}
bool status = false;
try {
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+ OCC_CATCH_SIGNALS;
+#endif
status = app->Open( CAF_Tools::toExtString( fname ), myStdDoc ) == CDF_RS_OK;
}
catch ( Standard_Failure ) {
bool status = false;
try {
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+ OCC_CATCH_SIGNALS;
+#endif
if ( save )
status = app->Save( stdDoc() ) == CDF_SS_OK;
else
bool res = true;
try {
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+ OCC_CATCH_SIGNALS;
+#endif
if ( myStdDoc->HasOpenCommand() )
myStdDoc->AbortCommand();
bool res = true;
try {
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+ OCC_CATCH_SIGNALS;
+#endif
myStdDoc->AbortCommand();
- update();
+ update();
}
catch ( Standard_Failure ) {
res = false;
bool res = true;
try {
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+ OCC_CATCH_SIGNALS;
+#endif
myStdDoc->CommitCommand();
if ( canUndo() )
{
Handle(TDF_Delta) d = myStdDoc->GetUndos().Last();
- if ( !d.IsNull() )
+ if ( !d.IsNull() )
d->SetName( CAF_Tools::toExtString( name ) );
}
}
*/
bool CAF_Study::undo()
{
- if ( myStdDoc.IsNull() )
+ if ( myStdDoc.IsNull() )
return false;
try {
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+ OCC_CATCH_SIGNALS;
+#endif
myStdDoc->Undo();
undoModified(); /* decrement modification counter */
}
catch ( Standard_Failure ) {
- SUIT_MessageBox::error1( application()->desktop(), tr( "ERR_ERROR" ),
- tr( "ERR_DOC_UNDO" ), tr ( "BUT_OK" ) );
- return false;
- }
+ SUIT_MessageBox::error1(application()->desktop(), tr( "ERR_ERROR" ),
+ tr( "ERR_DOC_UNDO" ), tr ( "BUT_OK" ));
+ return false;
+ }
return true;
}
*/
bool CAF_Study::redo()
{
- if ( myStdDoc.IsNull() )
+ if ( myStdDoc.IsNull() )
return false;
try {
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+ OCC_CATCH_SIGNALS;
+#endif
myStdDoc->Redo();
doModified(); /* increment modification counter */
}
if ( theUnits && *theUnits && strcmp( theUnits, "%" ) )
{
try {
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+ OCC_CATCH_SIGNALS;
+#endif
aRetValue = UnitsAPI::AnyToSI( theValue, theUnits );
}
catch( Standard_Failure ) {
if ( theUnits && *theUnits && strcmp( theUnits, "%" ) )
{
try {
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+ OCC_CATCH_SIGNALS;
+#endif
aRetValue = UnitsAPI::AnyFromSI( theValue, theUnits );
}
catch( Standard_Failure ) {
*/
bool SUITApp_Application::notify( QObject* receiver, QEvent* e )
{
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) < 0x060101
// Disable GUI user actions while python command is executed
if (SUIT_Session::IsPythonExecuted()) {
// Disable mouse and keyboard events
aType == QEvent::Accel || aType == QEvent::AccelOverride)
return false;
}
+#endif
return myExceptHandler ? myExceptHandler->handle( receiver, e ) :
QApplication::notify( receiver, e );
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include "SalomeApp_ExceptionHandler.h"
-#include "CASCatch.hxx"
#include <OSD.hxx>
#include <qstring.h>
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+ #include <Standard_ErrorHandler.hxx>
+ #include <Standard_Failure.hxx>
+#else
+ #include "CASCatch.hxx"
+#endif
+
/*!Constructor. Initialize by \a floatSignal.*/
SalomeApp_ExceptionHandler::SalomeApp_ExceptionHandler( const bool floatSignal )
: SUIT_ExceptionHandler()
/*!Try to call SUIT_ExceptionHandler::internalHandle(o, e), catch if failure.*/
bool SalomeApp_ExceptionHandler::handleSignals( QObject* o, QEvent* e )
{
- CASCatch_TRY {
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+ try {
+ OCC_CATCH_SIGNALS;
+#else
+ CASCatch_TRY {
+#endif
SUIT_ExceptionHandler::internalHandle( o, e );
}
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+ catch(Standard_Failure) {
+#else
CASCatch_CATCH(Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+#endif
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
throw Standard_Failure( aFail->GetMessageString() );
}
-
+
return true;
}
BIN_SERVER_IDL =
BIN_CLIENT_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Component.idl SALOME_Registry.idl SALOME_ModuleCatalog.idl SALOME_Exception.idl SALOME_GenericObj.idl
-CPPFLAGS += $(QT_MT_INCLUDES) $(PYTHON_INCLUDES) $(HDF5_INCLUDES) $(BOOST_CPPFLAGS) $(KERNEL_CXXFLAGS) -I$(OCC_INCLUDES)
+CPPFLAGS += $(QT_MT_INCLUDES) $(PYTHON_INCLUDES) $(HDF5_INCLUDES) $(BOOST_CPPFLAGS) $(KERNEL_CXXFLAGS) $(OCC_INCLUDES)
CXXFLAGS += $(OCC_CXXFLAGS) $(BOOST_CPPFLAGS)
LDFLAGS += $(QT_MT_LIBS) $(KERNEL_LDFLAGS) -lSalomeNS -lsuit -lSalomeLifeCycleCORBA -lOpUtil -lSALOMELocalTrace -lwith_loggerTraceCollector -lEvent -lSalomeCatalog -lSalomeDSClient $(CAS_KERNEL)
virtual bool notify( QObject* receiver, QEvent* e )
{
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) < 0x060101
// Disable GUI user actions while python command is executed
if (SUIT_Session::IsPythonExecuted()) {
// Disable mouse and keyboard events
aType == QEvent::Accel || aType == QEvent::AccelOverride)
return false;
}
+#endif
return myHandler ? myHandler->handle( receiver, e ) :
QApplication::notify( receiver, e );