From: mkr Date: Mon, 27 Oct 2008 07:09:09 +0000 (+0000) Subject: Correct the logic of TestRecorder usage inside Salome. X-Git-Tag: V5_1_0a3~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c10d085c1f2e3f4bc0f3fc9305b8b686a993f248;p=modules%2Fgui.git Correct the logic of TestRecorder usage inside Salome. --- diff --git a/adm_local/unix/config_files/check_TestRecorder.m4 b/adm_local/unix/config_files/check_TestRecorder.m4 index ff87acf7d..7b937bf84 100644 --- a/adm_local/unix/config_files/check_TestRecorder.m4 +++ b/adm_local/unix/config_files/check_TestRecorder.m4 @@ -1,6 +1,6 @@ # # Check existence of Test recorder sources and libraries. -# Set DISABLE_TESTRECORDER to yes|no +# Set ENABLE_TESTRECORDER to yes|no # # Author : Margarita KARPUNINA (OCN, 2008) # @@ -31,7 +31,7 @@ AS_IF([test "x$with_testrecorder" != xno || test "$with_testrecorder" != "no"],[ TESTRECORDER_INCLUDES="" TESTRECORDER_LIBS="" - DISABLE_TESTRECORDER="yes" + ENABLE_TESTRECORDER="no" TestRecorder_ok=no @@ -88,7 +88,7 @@ AS_IF([test "x$with_testrecorder" != xno || test "$with_testrecorder" != "no"],[ AC_MSG_WARN(TestRecorder is not found or not properly installed) else AC_MSG_RESULT(for TestRecorder: yes) - DISABLE_TESTRECORDER="no" + ENABLE_TESTRECORDER="yes" fi AC_SUBST(TESTRECORDER_INCLUDES) diff --git a/configure.ac b/configure.ac index 4d86c95fa..68bb07b8e 100644 --- a/configure.ac +++ b/configure.ac @@ -558,7 +558,7 @@ AM_CONDITIONAL(ENABLE_OCCVIEWER, [test "$DISABLE_OCCVIEWER" = no]) AM_CONDITIONAL(ENABLE_VTKVIEWER, [test "$DISABLE_VTKVIEWER" = no]) AM_CONDITIONAL(ENABLE_SALOMEOBJECT, [test "$DISABLE_SALOMEOBJECT" = no]) AM_CONDITIONAL(ENABLE_QXGRAPHVIEWER, [test "$DISABLE_QXGRAPHVIEWER" = no]) -AM_CONDITIONAL(ENABLE_TESTRECORDER, [test "$DISABLE_TESTRECORDER" = no]) +AM_CONDITIONAL(ENABLE_TESTRECORDER, [test "$ENABLE_TESTRECORDER" = yes]) echo echo --------------------------------------------- diff --git a/src/SUIT/Makefile.am b/src/SUIT/Makefile.am index 0e3d53627..253d9e53a 100755 --- a/src/SUIT/Makefile.am +++ b/src/SUIT/Makefile.am @@ -119,9 +119,7 @@ nodist_salomeres_DATA = \ libsuit_la_CPPFLAGS = $(QT_INCLUDES) -I$(srcdir)/../Qtx -I$(srcdir)/../ObjBrowser if ENABLE_TESTRECORDER - libsuit_la_CPPFLAGS+= $(TESTRECORDER_INCLUDES) -else !ENABLE_TESTRECORDER - libsuit_la_CPPFLAGS+= -DDISABLE_TESTRECORDER + libsuit_la_CPPFLAGS+= -DENABLE_TESTRECORDER $(TESTRECORDER_INCLUDES) endif libsuit_la_LDFLAGS = $(QT_MT_LIBS) diff --git a/src/SUIT/SUIT_ExceptionHandler.cxx b/src/SUIT/SUIT_ExceptionHandler.cxx index babe67e69..cee4dcb51 100755 --- a/src/SUIT/SUIT_ExceptionHandler.cxx +++ b/src/SUIT/SUIT_ExceptionHandler.cxx @@ -20,7 +20,7 @@ #include "SUIT_MessageBox.h" -#ifndef DISABLE_TESTRECORDER +#ifdef ENABLE_TESTRECORDER #include #endif @@ -43,7 +43,7 @@ bool SUIT_ExceptionHandler::handle( QObject* o, QEvent* e ) */ bool SUIT_ExceptionHandler::internalHandle( QObject* o, QEvent* e ) { -#ifndef DISABLE_TESTRECORDER +#ifdef ENABLE_TESTRECORDER TestApplication* aTApp = qobject_cast(qApp); return aTApp ? aTApp->TestApplication::notify( o, e ) : false; #else diff --git a/src/SUITApp/Makefile.am b/src/SUITApp/Makefile.am index 5fa2dd43d..d8e1334ee 100644 --- a/src/SUITApp/Makefile.am +++ b/src/SUITApp/Makefile.am @@ -43,10 +43,8 @@ libSUITApp_la_CPPFLAGS = $(QT_INCLUDES) $(PYTHON_INCLUDES) \ -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx -I$(srcdir)/../Style if ENABLE_TESTRECORDER - libSUITApp_la_CPPFLAGS+= $(TESTRECORDER_INCLUDES) -else !ENABLE_TESTRECORDER - libSUITApp_la_CPPFLAGS+= -DDISABLE_TESTRECORDER - MOC_FLAGS = -DDISABLE_TESTRECORDER + libSUITApp_la_CPPFLAGS+= -DENABLE_TESTRECORDER $(TESTRECORDER_INCLUDES) + MOC_FLAGS = -DENABLE_TESTRECORDER endif libSUITApp_la_LDFLAGS = $(QT_MT_LIBS) @@ -70,9 +68,7 @@ SUITApp_CPPFLAGS = $(QT_INCLUDES) $(PYTHON_INCLUDES) \ -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx -I$(srcdir)/../Style if ENABLE_TESTRECORDER - SUITApp_CPPFLAGS+= $(TESTRECORDER_INCLUDES) -else !ENABLE_TESTRECORDER - SUITApp_CPPFLAGS+= -DDISABLE_TESTRECORDER + SUITApp_CPPFLAGS+= -DENABLE_TESTRECORDER $(TESTRECORDER_INCLUDES) endif SUITApp_LDADD = libSUITApp.la ../Qtx/libqtx.la ../SUIT/libsuit.la ../Style/libSalomeStyle.la diff --git a/src/SUITApp/SUITApp_Application.cxx b/src/SUITApp/SUITApp_Application.cxx index df551d580..7975b0367 100644 --- a/src/SUITApp/SUITApp_Application.cxx +++ b/src/SUITApp/SUITApp_Application.cxx @@ -35,7 +35,7 @@ Constructor */ SUITApp_Application::SUITApp_Application( int& argc, char** argv, SUIT_ExceptionHandler* hand ) -#ifndef DISABLE_TESTRECORDER +#ifdef ENABLE_TESTRECORDER : TestApplication( argc, argv ), #else : QApplication( argc, argv ), @@ -56,7 +56,7 @@ myExceptHandler( hand ) Constructor */ SUITApp_Application::SUITApp_Application( int& argc, char** argv, Type type, SUIT_ExceptionHandler* hand ) -#ifndef DISABLE_TESTRECORDER +#ifdef ENABLE_TESTRECORDER : TestApplication( argc, argv ), #else : QApplication( argc, argv, type ), @@ -77,7 +77,7 @@ myExceptHandler( hand ) bool SUITApp_Application::notify( QObject* receiver, QEvent* e ) { return myExceptHandler ? myExceptHandler->handle( receiver, e ) : -#ifndef DISABLE_TESTRECORDER +#ifdef ENABLE_TESTRECORDER TestApplication::notify( receiver, e ); #else QApplication::notify( receiver, e ); diff --git a/src/SUITApp/SUITApp_Application.h b/src/SUITApp/SUITApp_Application.h index bb27322b5..ceda6a191 100644 --- a/src/SUITApp/SUITApp_Application.h +++ b/src/SUITApp/SUITApp_Application.h @@ -19,7 +19,7 @@ #ifndef SUITAPP_APPLICATION_H #define SUITAPP_APPLICATION_H -#ifndef DISABLE_TESTRECORDER +#ifdef ENABLE_TESTRECORDER #include #else #include @@ -27,7 +27,7 @@ class SUIT_ExceptionHandler; -#ifndef DISABLE_TESTRECORDER +#ifdef ENABLE_TESTRECORDER class SUITApp_Application : public TestApplication #else class SUITApp_Application : public QApplication diff --git a/src/Session/Makefile.am b/src/Session/Makefile.am index 781aedd20..01f69bf20 100755 --- a/src/Session/Makefile.am +++ b/src/Session/Makefile.am @@ -55,9 +55,7 @@ libSalomeSession_la_CPPFLAGS = $(QT_MT_INCLUDES) $(PYTHON_INCLUDES) \ -I$(srcdir)/../Style @LIBXML_INCLUDES@ if ENABLE_TESTRECORDER - libSalomeSession_la_CPPFLAGS+= $(TESTRECORDER_INCLUDES) -else !ENABLE_TESTRECORDER - libSalomeSession_la_CPPFLAGS+= -DDISABLE_TESTRECORDER + libSalomeSession_la_CPPFLAGS+= -DENABLE_TESTRECORDER $(TESTRECORDER_INCLUDES) endif libSalomeSession_la_LDFLAGS = $(QT_MT_LIBS) $(KERNEL_LDFLAGS) -lSalomeNS \ diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index 18365ce9f..26a873857 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -35,7 +35,7 @@ #include #include -#ifndef DISABLE_TESTRECORDER +#ifdef ENABLE_TESTRECORDER #include #endif @@ -249,14 +249,14 @@ protected: } }; -#ifndef DISABLE_TESTRECORDER +#ifdef ENABLE_TESTRECORDER class SALOME_QApplication : public TestApplication #else class SALOME_QApplication : public QApplication #endif { public: -#ifndef DISABLE_TESTRECORDER +#ifdef ENABLE_TESTRECORDER SALOME_QApplication( int& argc, char** argv ) : TestApplication( argc, argv ), myHandler ( 0 ) {} #else SALOME_QApplication( int& argc, char** argv ) : QApplication( argc, argv ), myHandler ( 0 ) {} @@ -278,7 +278,7 @@ public: } #endif -#ifndef DISABLE_TESTRECORDER +#ifdef ENABLE_TESTRECORDER return myHandler ? myHandler->handle( receiver, e ) : TestApplication::notify( receiver, e ); #else