33 lines
910 B
C++
33 lines
910 B
C++
#include "sapplication.h"
|
|
|
|
SApplication::SApplication(int &argc, char **argv, int nFlags)
|
|
:QApplication(argc, argv, nFlags)
|
|
{
|
|
|
|
}
|
|
|
|
|
|
bool SApplication::notify(QObject* pObject, QEvent* pEvent)
|
|
{
|
|
|
|
try {
|
|
return QApplication::notify(pObject, pEvent);
|
|
} catch (std::exception &e) {
|
|
qFatal("Error %s sending pEvent %s to object %s (%s)",
|
|
e.what(), typeid(*pEvent).name(), qPrintable(pObject->objectName()),
|
|
typeid(*pObject).name());
|
|
} catch (...) {
|
|
qFatal("Error <unknown> sending pEvent %s to object %s (%s)",
|
|
typeid(*pEvent).name(), qPrintable(pObject->objectName()),
|
|
typeid(*pObject).name());
|
|
}
|
|
|
|
// qFatal aborts, so this isn't really necessary
|
|
// but you might continue if you use a different logging lib
|
|
//int a=0;
|
|
//return false;
|
|
|
|
|
|
return true;
|
|
}
|