From 762abdfad7461da17a72045a84aa26a8bd806fc0 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 30 Mar 2016 15:17:29 +0300 Subject: [PATCH] Remove deprecated support of TestRecorder --- src/SUIT/CMakeLists.txt | 6 ------ src/SUIT/SUIT_ExceptionHandler.cxx | 9 --------- src/SUITApp/CMakeLists.txt | 6 ------ src/SUITApp/SUITApp_Application.cxx | 12 ------------ src/SUITApp/SUITApp_Application.h | 20 ++++++-------------- src/Session/CMakeLists.txt | 6 ------ src/Session/SALOME_Session_Server.cxx | 19 +------------------ 7 files changed, 7 insertions(+), 71 deletions(-) diff --git a/src/SUIT/CMakeLists.txt b/src/SUIT/CMakeLists.txt index 6b42a3512..18217d615 100644 --- a/src/SUIT/CMakeLists.txt +++ b/src/SUIT/CMakeLists.txt @@ -30,15 +30,9 @@ INCLUDE_DIRECTORIES( # additional preprocessor / compiler flags ADD_DEFINITIONS(${QT_DEFINITIONS}) -IF(ENABLE_TESTRECORDER) - ADD_DEFINITIONS("-DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}") -ENDIF() # libraries to link to SET(_link_LIBRARIES ${PLATFORM_LIBS} ${QT_LIBRARIES} qtx ObjBrowser) -IF(ENABLE_TESTRECORDER) - LIST(APPEND _link_LIBRARIES ${TESTRECORDER_LIBS}) -ENDIF() # --- headers --- diff --git a/src/SUIT/SUIT_ExceptionHandler.cxx b/src/SUIT/SUIT_ExceptionHandler.cxx index 0d1516047..e1438bc39 100755 --- a/src/SUIT/SUIT_ExceptionHandler.cxx +++ b/src/SUIT/SUIT_ExceptionHandler.cxx @@ -24,10 +24,6 @@ #include "SUIT_MessageBox.h" -#ifdef ENABLE_TESTRECORDER - #include -#endif - #include /*!\class SUIT_ExceptionHandler @@ -47,12 +43,7 @@ bool SUIT_ExceptionHandler::handle( QObject* o, QEvent* e ) */ bool SUIT_ExceptionHandler::internalHandle( QObject* o, QEvent* e ) { -#ifdef ENABLE_TESTRECORDER - TestApplication* aTApp = qobject_cast(qApp); - return aTApp ? aTApp->TestApplication::notify( o, e ) : false; -#else return qApp ? qApp->QApplication::notify( o, e ) : false; -#endif } /*! diff --git a/src/SUITApp/CMakeLists.txt b/src/SUITApp/CMakeLists.txt index ee4df9e13..2b4336541 100755 --- a/src/SUITApp/CMakeLists.txt +++ b/src/SUITApp/CMakeLists.txt @@ -34,18 +34,12 @@ INCLUDE_DIRECTORIES( # additional preprocessor / compiler flags ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) -IF(ENABLE_TESTRECORDER) - ADD_DEFINITIONS("-DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}") -ENDIF() # libraries to link to SET(_link_LIBRARIES ${PLATFORM_LIBS} ${QT_LIBRARIES} qtx suit SalomeStyle) IF(SALOME_USE_PYCONSOLE) LIST(APPEND _link_LIBRARIES ${PYTHON_LIBRARIES}) ENDIF() -IF(ENABLE_TESTRECORDER) - LIST(APPEND _link_LIBRARIES ${TESTRECORDER_LIBS}) -ENDIF() # --- headers --- diff --git a/src/SUITApp/SUITApp_Application.cxx b/src/SUITApp/SUITApp_Application.cxx index e2b68f741..22a36dcc6 100644 --- a/src/SUITApp/SUITApp_Application.cxx +++ b/src/SUITApp/SUITApp_Application.cxx @@ -40,9 +40,6 @@ Constructor */ SUITApp_Application::SUITApp_Application( int& argc, char** argv, SUIT_ExceptionHandler* hand ) -#ifdef ENABLE_TESTRECORDER - : TestApplication( argc, argv ), -#else #ifndef WIN32 // san: Opening an X display and choosing a visual most suitable for 3D visualization // in order to make SALOME viewers work with non-native X servers @@ -50,7 +47,6 @@ SUITApp_Application::SUITApp_Application( int& argc, char** argv, SUIT_Exception #else : QApplication( argc, argv ), #endif -#endif myExceptHandler( hand ) { } @@ -59,11 +55,7 @@ myExceptHandler( hand ) Constructor */ SUITApp_Application::SUITApp_Application( int& argc, char** argv, Type type, SUIT_ExceptionHandler* hand ) -#ifdef ENABLE_TESTRECORDER - : TestApplication( argc, argv ), -#else : QApplication( argc, argv, type ), -#endif myExceptHandler( hand ) { } @@ -77,11 +69,7 @@ myExceptHandler( hand ) bool SUITApp_Application::notify( QObject* receiver, QEvent* e ) { return myExceptHandler ? myExceptHandler->handle( receiver, e ) : -#ifdef ENABLE_TESTRECORDER - TestApplication::notify( receiver, e ); -#else QApplication::notify( receiver, e ); -#endif } /*! diff --git a/src/SUITApp/SUITApp_Application.h b/src/SUITApp/SUITApp_Application.h index fb3cbb386..7491d55a6 100644 --- a/src/SUITApp/SUITApp_Application.h +++ b/src/SUITApp/SUITApp_Application.h @@ -23,11 +23,7 @@ #ifndef SUITAPP_APPLICATION_H #define SUITAPP_APPLICATION_H -#ifdef ENABLE_TESTRECORDER - #include -#else - #include -#endif +#include class SUIT_ExceptionHandler; @@ -41,22 +37,18 @@ class SUIT_ExceptionHandler; # define SUITAPP_EXPORT #endif -#ifdef ENABLE_TESTRECORDER - class SUITAPP_EXPORT SUITApp_Application : public TestApplication -#else - class SUITAPP_EXPORT SUITApp_Application : public QApplication -#endif +class SUITAPP_EXPORT SUITApp_Application : public QApplication { Q_OBJECT public: - SUITApp_Application( int& argc, char** argv, SUIT_ExceptionHandler* = 0 ); - SUITApp_Application( int& argc, char** argv, Type type, SUIT_ExceptionHandler* = 0 ); + SUITApp_Application( int&, char**, SUIT_ExceptionHandler* = 0 ); + SUITApp_Application( int&, char**, Type, SUIT_ExceptionHandler* = 0 ); virtual bool notify( QObject* receiver, QEvent* e ); - SUIT_ExceptionHandler* handler() const; - void setHandler( SUIT_ExceptionHandler* ); + SUIT_ExceptionHandler* handler() const; + void setHandler( SUIT_ExceptionHandler* ); private: SUIT_ExceptionHandler* myExceptHandler; diff --git a/src/Session/CMakeLists.txt b/src/Session/CMakeLists.txt index 3cd6618f6..301c927e2 100755 --- a/src/Session/CMakeLists.txt +++ b/src/Session/CMakeLists.txt @@ -49,9 +49,6 @@ ADD_DEFINITIONS( ${CAS_DEFINITIONS} ${OMNIORB_DEFINITIONS} ) -IF(ENABLE_TESTRECORDER) - ADD_DEFINITIONS("-DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}") -ENDIF() # libraries to link to SET(_link_LIBRARIES @@ -72,9 +69,6 @@ SET(_link_LIBRARIES ${KERNEL_SALOMEBasics} qtx suit Event SalomeStyle SalomeApp SalomeIDLGUI ) -IF(ENABLE_TESTRECORDER) - LIST(APPEND _link_LIBRARIES ${TESTRECORDER_LIBS}) -ENDIF() # --- headers --- diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index 1eae0a0e4..4b583e818 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -34,10 +34,6 @@ #include #include -#ifdef ENABLE_TESTRECORDER - #include -#endif - #include #include #include @@ -242,16 +238,9 @@ public: } }; -#ifdef ENABLE_TESTRECORDER - class SALOME_QApplication : public TestApplication -#else - class SALOME_QApplication : public QApplication -#endif +class SALOME_QApplication : public QApplication { public: -#ifdef ENABLE_TESTRECORDER - SALOME_QApplication( int& argc, char** argv ) : TestApplication( argc, argv ), myHandler ( 0 ) {} -#else SALOME_QApplication( int& argc, char** argv ) #ifndef WIN32 // san: Opening an X display and choosing a visual most suitable for 3D visualization @@ -261,15 +250,10 @@ public: : QApplication( argc, argv ), #endif myHandler ( 0 ) {} -#endif virtual bool notify( QObject* receiver, QEvent* e ) { -#ifdef ENABLE_TESTRECORDER - return myHandler ? myHandler->handle( receiver, e ) : - TestApplication::notify( receiver, e ); -#else try { return myHandler ? myHandler->handle( receiver, e ) : QApplication::notify( receiver, e ); } @@ -288,7 +272,6 @@ public: std::cerr << "Unknown exception caught in Qt handler: it's probably a bug in SALOME platform" << std::endl; } return false; // return false when exception is caught -#endif } SUIT_ExceptionHandler* handler() const { return myHandler; } void setHandler( SUIT_ExceptionHandler* h ) { myHandler = h; } -- 2.39.2