What to look out for when reimplementing notify
function in multi threaded Qt application?
This is an example implementation. Currently there are no errors, but I am worried that an error could arise since multi threading in Qt uses signal slot for communication which uses notify function.
TApplication::notify(QObject *receiver, QEvent *event)
{
bool returnValue(false);
try
{
returnValue = QApplication::notify(receiver, event);
}
catch (IExceptionBase& e)
{
if (!fMain.isNull())
{
//report error to output and file log
}
else
{
//report error to output
}
}
catch (...)
{
if (!fMain.isNull())
{
//report error to output and file log
}
else
{
//report error to output
}
}
return returnValue;
}
fMain
is a module with reporting functionality