]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Correct the logic of TestRecorder usage inside Salome.
authormkr <mkr@opencascade.com>
Mon, 27 Oct 2008 07:09:09 +0000 (07:09 +0000)
committermkr <mkr@opencascade.com>
Mon, 27 Oct 2008 07:09:09 +0000 (07:09 +0000)
adm_local/unix/config_files/check_TestRecorder.m4
configure.ac
src/SUIT/Makefile.am
src/SUIT/SUIT_ExceptionHandler.cxx
src/SUITApp/Makefile.am
src/SUITApp/SUITApp_Application.cxx
src/SUITApp/SUITApp_Application.h
src/Session/Makefile.am
src/Session/SALOME_Session_Server.cxx

index ff87acf7da165f7570b7de04539d110b9116409a..7b937bf8418b0602fb0178b4df69546f7f14c068 100644 (file)
@@ -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)
index 4d86c95fa7eb62a6fc881dceafcfa7346b86f4be..68bb07b8ed5cf497c294a29e4763f6ead87d0000 100644 (file)
@@ -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 ---------------------------------------------
index 0e3d536279f050af613d6e0a2a460478c248b959..253d9e53ae68bbeea74d3c4304031f8782ac061a 100755 (executable)
@@ -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)
index babe67e6990d181d21c59b3c328c95ec1a006ca5..cee4dcb514e60615ddce664320dcfe6d43556036 100755 (executable)
@@ -20,7 +20,7 @@
 
 #include "SUIT_MessageBox.h"
 
-#ifndef DISABLE_TESTRECORDER
+#ifdef ENABLE_TESTRECORDER
   #include <TestApplication.h>
 #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<TestApplication*>(qApp);
   return aTApp ? aTApp->TestApplication::notify( o, e ) : false;
 #else
index 5fa2dd43da90f24f6cd6e3e3e991a65313f9c800..d8e1334ee033f748a5bea1bd960f4c9dc41473e9 100644 (file)
@@ -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
index df551d580c06c658da7df8561c2c1a5cebe6f47d..7975b03671d14f9aefaf71bd5d2f81fd7793c96e 100644 (file)
@@ -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 );
index bb27322b53841d02b8ef99720aab51da0fdaed8d..ceda6a1913712d62dc9e71b60e13eb0daf312e37 100644 (file)
@@ -19,7 +19,7 @@
 #ifndef SUITAPP_APPLICATION_H
 #define SUITAPP_APPLICATION_H
 
-#ifndef DISABLE_TESTRECORDER
+#ifdef ENABLE_TESTRECORDER
   #include <TestApplication.h>
 #else
   #include <QApplication>
@@ -27,7 +27,7 @@
 
 class SUIT_ExceptionHandler;
 
-#ifndef DISABLE_TESTRECORDER
+#ifdef ENABLE_TESTRECORDER
   class SUITApp_Application : public TestApplication
 #else
   class SUITApp_Application : public QApplication
index 781aedd202f326dea781678f17a3ffdf5b4e6b4e..01f69bf20f453f3dad48aeb661c195d6813380ef 100755 (executable)
@@ -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       \
index 18365ce9f1b158e9b31c9241abd6e15a3b7463f6..26a87385722036037ae75c6a94722541ef99aee0 100755 (executable)
@@ -35,7 +35,7 @@
 #include <ConnectionManager_i.hxx>
 #include <SALOME_LifeCycleCORBA.hxx>
 
-#ifndef DISABLE_TESTRECORDER
+#ifdef ENABLE_TESTRECORDER
   #include <TestApplication.h>
 #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