17 #ifndef GEPETTO_GUI_SAFEAPPLICATION_HH 18 #define GEPETTO_GUI_SAFEAPPLICATION_HH 24 #include <QApplication> 34 virtual bool safeNotify (QApplication* app, QObject* receiver, QEvent* e) = 0;
43 bool impl_notify(QApplication* app, QObject* receiver, QEvent* e)
46 return app->QApplication::notify(receiver, e);
58 : QApplication(argc, argv) {}
60 bool notify(QObject* receiver, QEvent* e)
66 bool safeNotify (QApplication*, QObject*, QEvent*) { assert(
false);
return false; };
71 #endif // GEPETTO_GUI_SAFEAPPLICATION_HH Definition: safeapplication.hh:54
Definition: safeapplication.hh:28
Definition: action-search-bar.hh:27
virtual bool safeNotify(QApplication *app, QObject *receiver, QEvent *e)=0
Inherited classes must call impl_notify method surronded by a try/catch.
bool impl_notify(QApplication *app, QObject *receiver, QEvent *e)
Definition: safeapplication.hh:43
bool notify(QObject *receiver, QEvent *e)
Definition: safeapplication.hh:60
SafeApplication(int &argc, char **argv)
Definition: safeapplication.hh:57
void addAsLeaf(SlotExceptionCatch *child)
Definition: safeapplication.hh:36
SlotExceptionCatch()
Definition: safeapplication.hh:31
SlotExceptionCatch * child_
Definition: safeapplication.hh:51