| 29 | } |
| 30 | |
| 31 | bool DSApplication::notify(QObject *receiver_, QEvent *event_) |
| 32 | { |
| 33 | try { |
| 34 | return QApplication::notify(receiver_, event_); |
| 35 | } catch ( std::exception& e ) { |
| 36 | QMessageBox msg(NULL); |
| 37 | msg.setText(tr("Application Error")); |
| 38 | msg.setInformativeText(e.what()); |
| 39 | msg.setStandardButtons(QMessageBox::Ok); |
| 40 | msg.setIcon(QMessageBox::Warning); |
| 41 | msg.exec(); |
| 42 | } catch (...) { |
| 43 | QMessageBox msg(NULL); |
| 44 | msg.setText(tr("Application Error")); |
| 45 | msg.setInformativeText(tr("An unexpected error occurred")); |
| 46 | msg.setStandardButtons(QMessageBox::Ok); |
| 47 | msg.setIcon(QMessageBox::Warning); |
| 48 | msg.exec(); |
| 49 | } |
| 50 | return false; |
| 51 | } |