#include <ConnectionManager_i.hxx>
#include <RegistryService.hxx>
-#ifdef ENABLE_TESTRECORDER
- #include <TestApplication.h>
-#endif
-
#include <OpUtil.hxx>
#include <Utils_ORB_INIT.hxx>
#include <Utils_SINGLETON.hxx>
}
};
-#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 )
// TODO (QT5 PORTING) Below is a temporary solution, to allow compiling with Qt 5
#if !defined WIN32 && QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
: 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 );
}
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; }