Recent version of clang (3.7) start complain about such code:
void send(QObject *obj)
{
QKeyEvent *event = new QKeyEvent(QEvent::KeyRelease, Qt::Key_Tab, Qt::NoModifier); qApp->postEvent(obj, event);
}
warning: Potential leak of memory pointed to by 'event'
This is false positive, because of according to Qt documentation Qt take care about memory allocated for QEvent:
http://doc.qt.io/qt-4.8/qcoreapplication.html#postEvent
Because of Qt popular enought I suggest to handle postEvent case in MallocChecker
Shouldn't you use == instead of endswith here?