Salome HOME
*** empty log message ***
[modules/gui.git] / src / SUIT / SUIT_ExceptionHandler.cxx
1 #include "SUIT_ExceptionHandler.h"
2
3 #include "SUIT_MessageBox.h"
4
5 #include <qapplication.h>
6
7 bool SUIT_ExceptionHandler::handle( QObject* o, QEvent* e )
8 {
9   return internalHandle( o, e );
10 }
11
12 bool SUIT_ExceptionHandler::internalHandle( QObject* o, QEvent* e )
13 {
14   return qApp ? qApp->QApplication::notify( o, e ) : false;
15 }
16
17 void SUIT_ExceptionHandler::showMessage( const QString& title, const QString& msg )
18 {
19   if ( !qApp )
20     return;
21
22   SUIT_MessageBox::error1( qApp->mainWidget(), title, msg, "OK" );
23 }